NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/45020: strtold(3) does not detect NaN
On Jun 4, 9:55am, jruohonen%iki.fi@localhost (Jukka Ruohonen) wrote:
-- Subject: lib/45020: strtold(3) does not detect NaN
| >Description:
|
| The saga of strtod(3) bugs continues: the long double variant does not
| detect NaN on amd64.
|
| >How-To-Repeat:
|
| ...
|
| long double ld;
|
| ld = strtold("NaN", NULL);
|
| if (isnan(ld) == 0)
| printf("fail");
|
| ...
Looks like a compiler bug to me. Either use -ffloat-store, or call isnanl()
directly.
christos
Home |
Main Index |
Thread Index |
Old Index