Skip to content
Snippets Groups Projects
Commit ec92e198 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

ENH: handle underflow (rounding) of float/double as zero (issue #625)

- The problem occurs when using atof to parse values such as "1e-39"
  since this is out of range for a float and _can_ set errno to
  ERANGE.

  Similar to parsing of integers, now parse with the longest floating
  point representation "long double" via strtold (guaranteed to be
  part of C++11) and verify against the respective VGREAT values for
  overflow. Treat anything smaller than VSMALL to be zero.
parent 34a8b56f
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment