ocaml_input_float /

Filename Size Date modified Message
46 B
161 B
941 B
798 B
1.1 KB
523 B
704 B
363 B
16.6 KB
174.4 KB
(* DO NOT EDIT (digest: 648405e3b013d4217e1366d5b2cd4fce) *)

input_float - Input floating point numbers with rounding and locale support

See the file [INSTALL.txt](INSTALL.txt) for building and installation

Copyright and license

input_float is distributed under the terms of the GNU Lesser General Public
License version 2.1 with OCaml linking exception.


  Proper decimal rounding of floating point numbers is an extremely hard task,
when precise result is needed.  For example, author
http://www.exploringbinary.com/ blog shows horrors that will be raised
in front of naive implementer of floating point parsing algorithm.

  Author of this mini-library had a much simpler task: read strings in decimal
notation and produce rounded floats of given precision.  So here numbers are
prepared (rounded too), then given to [float_of_string] OCaml function, which
internally uses [strtod].  No custom parsing of floats is actually done.
[strtod] is a "point of trust" here.