summaryrefslogtreecommitdiffstats
path: root/profile.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-10-07 08:57:27 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-10-07 09:26:08 -0700
commit8ba5423e65b59163080c5ccee8e40d0c5e5a42b6 (patch)
treec32e2a693a88e0fdd6bd0ecd29195564208936e2 /profile.h
parent79f907eb277227c2d386c1474985391d3d65009d (diff)
downloadsubsurface-8ba5423e65b59163080c5ccee8e40d0c5e5a42b6.tar.gz
ascii_strtod that actually does what we need
Dirk's ascii_strtod was blindly copied from other GPL code and didn't do what was the main purpose (i.e. ignore the locale and still accept the numbers we have in our data files). This implementation does *not* care about INF/NaN, and it does *not* try to handle some strange conditions (overflow/underflow), and I do *not* guarantee that it doesn't have rounding issues. That said, for our native format, we never print odd FP numbers anyway (since we use fixed-point integer arithmetic), and while we *do* care about exponents for some of the odder import formats (I remember seeing them in jdivelog output), we don't care about the crazy cases. So rather than worry about getting the edge cases right for the max double exponents (around +-308), it just says "screw you" and gives you something close enough. So what it *does* try to do is handle the actual parsing right, and get the right answer for all the reasonable cases. Works-For-Me(tm). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.h')
0 files changed, 0 insertions, 0 deletions