Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
turborium committed Nov 11, 2023
2 parents faaec71 + 712e014 commit 88f864d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
**The main feature of the algorithm that underlies this implementation is the trade-off between simplicity, accuracy, and speed.**

**PureParseFloat** provides accurate conversion of numbers with a mantissa up to 31 digits, in the exponent range from -291 to +308, otherwise the conversion can have a maximum error of 1 ULP, which means that for most numbers encountered in practice the conversion will be absolutely accurate.
In general, this implementation adheres to the idea of "a fairly good and at the same time simple floating point parser."
In general, this implementation adheres to the idea of a "fairly good and at the same time simple floating point parser."

There are two "reference" implementations available in this repository, for Pascal and C. Both implementations are covered with tests on millions of values, however the "main" implementation is the Pascal version.

User ports in [```Ports/```](https://github.com/turborium/PureParseFloat/tree/main/Ports) dir.

Pascal version tested on Delphi and FreePascal, C version tested on TDM-GCC.
Pascal version was tested on Delphi and FreePascal, C version was tested on TDM-GCC.

Warning: the algorithm needs double aritmetic exactly matching the ieee standard, so before using the ParseFloat function, you must set the FPU precision to Double/64bit and rounding to Nearest. In ObjectPascal there are standard function for this, which are used by the Pascal reference implementation, but for C you need to do this yourself.
Warning: the algorithm needs double aritmetic exactly matching the IEEE standard, so before using the ParseFloat function, you must set the FPU precision to Double/64bit and rounding to the closest. In ObjectPascal there are standard functions for this, which are used by the Pascal reference implementation, but for C you need to do this yourself.

# PureParseFloat [ru]

Expand Down

0 comments on commit 88f864d

Please sign in to comment.