Skip to main content

A package to handle binary fractions

Project description

Binary fractions

This is really small package to handle binary fractions.

It has 2 functions:

  • float2bin, which converts floats to binary fractions represented in strings
  • bin2float, which converts binary fractions represented in strings to floats
valid binary fraction: "100111.110001"

float2bin:
  arguments: (float_number: float)
  optional_argument: (binary_places: int) # This specifies the precision of the returned bin. Default 50

bin2float:
  arguments: (bin_number: string)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

binary_fractions-0.0.3.tar.gz (1.9 kB view details)

Uploaded Source

File details

Details for the file binary_fractions-0.0.3.tar.gz.

File metadata

  • Download URL: binary_fractions-0.0.3.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for binary_fractions-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5d96080b066675f508bf307144ad260c046329eaf09b107846c48ae08453ce2e
MD5 a78fbd5084db95b5d4740d32ed909333
BLAKE2b-256 af39f2c1ad700e4e1f89f97be8f7d3a1732a3fda14e255fe67b8318953192b9a

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page