All Projects → abolz → Drachennest

abolz / Drachennest

Licence: BSL-1.0 license
Different algorithms for converting binary to decimal floating-point numbers

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to Drachennest

fpzip
Lossless compressor of multidimensional floating-point arrays
Stars: ✭ 58 (-3.33%)
Mutual labels:  floating-point
FpDebug
Dynamic Program Analysis based on Valgrind to find Floating-Point Accuracy Problems
Stars: ✭ 19 (-68.33%)
Mutual labels:  floating-point
float eq-rs
Compare IEEE floating point values for equality.
Stars: ✭ 34 (-43.33%)
Mutual labels:  floating-point
documentation
Documentation on how to get everything to work and entry point for new users.
Stars: ✭ 72 (+20%)
Mutual labels:  ryu
Turbo-Transpose
Transpose: SIMD Integer+Floating Point Compression Filter
Stars: ✭ 50 (-16.67%)
Mutual labels:  floating-point
shellmath
Yes, Virginia, you can do floating-point arithmetic in Bash!
Stars: ✭ 33 (-45%)
Mutual labels:  floating-point
DoubleFloats.jl
math with more good bits
Stars: ✭ 102 (+70%)
Mutual labels:  floating-point
Guide-to-Swift-Numbers-Sample-Code
Xcode Playground Sample Code for the Flight School Guide to Swift Numbers
Stars: ✭ 92 (+53.33%)
Mutual labels:  floating-point
DecFP.jl
Julia IEEE decimal floating-point via the Intel decimal-float library
Stars: ✭ 49 (-18.33%)
Mutual labels:  floating-point
FPChecker
A dynamic analysis tool to detect floating-point errors in HPC applications.
Stars: ✭ 26 (-56.67%)
Mutual labels:  floating-point
multipath
Multipath routing with Ryu and Pyretic SDN Controllers
Stars: ✭ 56 (-6.67%)
Mutual labels:  ryu
Ryu-SDN-IP
SDN-IP project implemented by Ryu SDN framework.
Stars: ✭ 33 (-45%)
Mutual labels:  ryu
floaxie
Floating point printing and parsing library based on Grisu2 and Krosh algorithms
Stars: ✭ 28 (-53.33%)
Mutual labels:  floating-point
Number Precision
🚀1K tiny & fast lib for doing addition, subtraction, multiplication and division operations precisely
Stars: ✭ 3,345 (+5475%)
Mutual labels:  floating-point
fpzip
Cython bindings for fpzip, a floating point image compression algorithm.
Stars: ✭ 24 (-60%)
Mutual labels:  floating-point
ChangePrecision.jl
macro to change the default floating-point precision in Julia code
Stars: ✭ 28 (-53.33%)
Mutual labels:  floating-point
herbie
Optimize floating-point expressions for accuracy
Stars: ✭ 614 (+923.33%)
Mutual labels:  floating-point
verificarlo
A tool for debugging and assessing floating point precision and reproducibility.
Stars: ✭ 51 (-15%)
Mutual labels:  floating-point
decimal
An arbitrary-precision decimal floating-point arithmetic package for Go
Stars: ✭ 28 (-53.33%)
Mutual labels:  floating-point
deep-pensieve
A Deep Learning Framework for the Posit Number System
Stars: ✭ 19 (-68.33%)
Mutual labels:  floating-point

Build Status Build status codecov

Converting binary floating-point to decimal floating-point numbers.


Grisu / Dragon

Contains an implementation of the Grisu2 and Grisu3 algorithms as described in

The Grisu3 implementation uses the Dragon4 algorithm as a fallback.

Ryu

Contains an implementation of the Ryu algorithm as described in

The implemenation also contains a (fast!) strtod implementation, which can be used to convert decimal numbers with at most 17 significant decimal digits back into binary floating-point numbers. (Note that none of the algorithms here will ever produce more than 17 significant digits.)

Schubfach

Contains an implementation of the Schubfach algorithm as described in

The name of this algorithm "deliberately departs from a long lineage of fabulous drakes".

Dragonbox

Contains a slightly modified version the reference implementation of Junekey Jeon's Dragonbox algorithm.


Grisu3, Ryu, Schubfach, and Dragonbox are optimal, i.e. the output string

  1. rounds back to the input number when read in,
  2. is as short as possible,
  3. is as close to the input number as possible.

These algorithms (currently) assume that the input rounding algorithm uses round-to-nearest-even to break ties. Grisu2 only is optimal for ~99% of all floating point numbers, though it guarantees the first property for all of its inputs, regardless of how the input rounding mode breaks ties.


Benchmarks

Benchmarks were run on an Intel Core i7-9750H, using Visual Studio 2019 16.7.7, Clang 10.0, 64-bit.

Timings are in ns.


For this benchmark uniformly distributed random doubles in the range [1,2] have been generated. These numbers were then rounded to N significant digits and converted to decimal using the given algorithm.

BenchDigits


Uniformly distributed random numbers in the range [10^i, 10^(i+1)] for i=-12,...,12.

BenchUniform


Uniformly distributed random numbers in the range [0, 10^10]. Each benchmark is run 10 times (using different numbers each run).

BenchUniformE10


Random bit patterns. Each benchmark is run 10 times (using different numbers each run).

BenchRandom

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].