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.1.tar.gz (1.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: binary_fractions-0.0.1.tar.gz
  • Upload date:
  • Size: 1.3 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.1.tar.gz
Algorithm Hash digest
SHA256 11683a99f5a418b6a9fcdc04104d8ee87947804f7e09347195706dd9b68c33db
MD5 e09367d8bc6b6cba3a0a923156990dc4
BLAKE2b-256 37545ac6c381740c62acc425b4437ebacc85c77cd63b69ae2e94dcaab4519f95

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