das
65b5df780e
Make strtof() respect the current rounding mode.
2008-09-03 07:32:06 +00:00
das
2732388653
Merge gdtoa 20080831. This fixes several bugs, including an infinite
...
loop pointed out by cognet@ that occurs when calling strtod() with a
string representing a number between DBL_MAX and 2*DBL_MAX, when the
rounding mode is anything other than the default.
2008-09-03 07:23:57 +00:00
das
e839fcc5ee
Bring in the vendor's fix for a bug in strtod() whereby
...
strtod("0xyz", &endp) resulted in endp pointing to "0xyz"
instead of "xyz".
Reported by: Tony Finch <dot@dotat.at>
MFC after: 1 week
2008-06-21 19:27:54 +00:00
das
a1995f0037
On platforms where long is 64 bits, make sure gdtoa doesn't use a
...
long when it really wants an int.
2007-12-17 00:19:49 +00:00
das
218b1f5292
Fix previous commit: We should only mask the top bit in the STRTOG_NaNBits
...
case, not the STRTOG_Normal case.
2007-12-16 23:31:55 +00:00
das
70cdf6a574
Fix strto{f,d,ld}() so they don't return signaling NaNs. C99
...
says they are never supposed to, and the fact that they did could
cause apps that run with unmasked FP exceptions to SIGFPE after a
scanf() or strtod(). The vendor stated that he will not be fixing
this, citing portability concerns.
2007-12-16 21:14:33 +00:00
das
b2367c2d0b
Some changes the vendor didn't want:
...
- Accept the '0x' prefix so strtod("nan(0x...)", NULL) returns the same
thing as gcc's builtin nan("0x...") for such strings.
- Don't return uninitialized memory.
- Finish processing the string up to the closing ')' (provided it's
lexically valid) for compatibility with C99 and *scanf().
2007-12-16 21:13:54 +00:00
das
94ddd9f41e
Merge local diffs.
2007-01-03 04:59:33 +00:00
das
a0129a3c83
This commit was generated by cvs2svn to compensate for changes in r165743,
...
which included commits to RCS files with non-trunk default branches.
2007-01-03 04:58:54 +00:00
das
5bc737f352
Import of the latest gdtoa sources, which include fixes for minor
...
problems relating to NaNs and rounding.
2007-01-03 04:58:54 +00:00
das
bc257052e5
Configure gdtoa so that floating-point numbers are correctly rounded
...
when they are printed in non-default rounding modes.
2005-01-18 18:56:18 +00:00
das
2b54587e52
Import gdtoa 20040118. This revision addresses some corner cases in
...
denormal and locale handling in strtod().
2004-01-19 05:14:12 +00:00
das
b735e2a8ee
This commit was generated by cvs2svn to compensate for changes in r124703,
...
which included commits to RCS files with non-trunk default branches.
2004-01-19 05:14:12 +00:00
das
502b55c20b
Userland spinlocks bad. Sleep locks good.
...
Use the latter for gdtoa.
Requested by: deischen (far too long ago)
2003-06-21 08:20:14 +00:00
das
b2471a5039
Add some missing prototypes to eliminate some warnings. These already
...
appear without leading underscores in gdtoa.h, but this approach avoids
removing that file from the vendor branch and unduly rearranging things.
Prodded by: nectar
2003-04-09 06:04:35 +00:00
das
67eff66578
Add missing prototype for gdtoa().
2003-04-05 22:09:26 +00:00
das
ac4cce98d0
Import new sources. The only material change in this update is to
...
add locale support for hexadecimal floating point conversions.
Noticed by: ache
Reviewed by: mike (mentor)
2003-03-25 17:55:07 +00:00
das
3ea4e0447c
This commit was generated by cvs2svn to compensate for changes in r112620,
...
which included commits to RCS files with non-trunk default branches.
2003-03-25 17:55:07 +00:00
das
cfb004fe95
Enable locale support in strtod() and dtoa().
...
Noticed by: ache
Reviewed by: mike (mentor)
2003-03-19 20:25:45 +00:00
das
375d3f8cdb
Import gdtoa sources dated 20030318, which contain several locale fixes.
...
Reviewed by: mike (mentor)
2003-03-19 20:23:29 +00:00
das
afe8e24972
This commit was generated by cvs2svn to compensate for changes in r112415,
...
which included commits to RCS files with non-trunk default branches.
2003-03-19 20:23:29 +00:00
das
b2697c9471
Local patches:
...
- include extra system headers and add appropriate #defines
- use a spinlock to synchronize parts of gdtoa
- protect exported symbols with leading underscores
Reviewed by: bde (briefly), mike (mentor), obrien
2003-03-12 20:20:22 +00:00
das
db3a0f1435
Initial import of David Gay's gdtoa library for conversion between
...
strings and floating point.
2003-03-12 20:18:32 +00:00