| Store | Cart

Re: some thoughts on inf and nan

From: <sisy...@optusnet.com.au>
Thu, 21 Aug 2014 12:13:30 +1000
-----Original Message----- 
From: Father Chrysostomos
Sent: Thursday, August 21, 2014 5:51 AM

> And it would prevent those of us who reach for POSIX::strtod to work> around perl's broken number parsing from doing so, wouldn't it?

Yes - which might then prompt someone to fix perl's broken number parsing 
;-)

AIUI the main point of having perl do it's own number parsing is to avoid 
reliance on such things as POSIX::strtod - and perhaps with good reason.
For some floating point values, POSIX::strtod sets wrong values for perls 
built with the mingw.org ports of gcc. These are the only POSIX::strtod 
failings I've come across, but who is to say that there aren't others.

And this sort of reliance on POSIX::strtod doesn't help at all if nvtype is 
long double. POSIX::strtod cannot be relied upon to provide the correct 
values in that case, and there is no POSIX::strtold.
Because of this, I wrote Math::NV::nv() which calls either strtod or strtold 
(as appropriate) - but Math::NV is not a core module. It also doesn't fix 
the problem with mingw.org compilers - which is the reason I now use 
mingw.64 compilers on Windows.

This thread is perhaps not the right place to raise it, but I think that if 
perl's number parsing is not going to be fixed, we should at least provide a 
POSIX::strtold function.

Cheers,
Rob 

Recent Messages in this Thread
Jarkko Hietaniemi Aug 20, 2014 04:53 pm
Father Chrysostomos Aug 20, 2014 07:51 pm
Jarkko Hietaniemi Aug 20, 2014 07:57 pm
Jarkko Hietaniemi Aug 20, 2014 08:39 pm
Jarkko Hietaniemi Aug 20, 2014 08:41 pm
Glenn Golden Aug 20, 2014 08:18 pm
Karl Williamson Aug 20, 2014 08:36 pm
sisy...@optusnet.com.au Aug 21, 2014 02:13 am
Jarkko Hietaniemi Aug 21, 2014 03:17 am
sisy...@optusnet.com.au Aug 21, 2014 03:47 am
Jarkko Hietaniemi Aug 21, 2014 03:33 pm
Jarkko Hietaniemi Aug 21, 2014 03:40 pm
sisy...@optusnet.com.au Aug 22, 2014 12:36 am
Jarkko Hietaniemi Aug 22, 2014 02:34 pm
sisy...@optusnet.com.au Aug 23, 2014 02:58 am
bulk88 Aug 31, 2014 10:11 pm
Jarkko Hietaniemi Aug 31, 2014 10:38 pm
bulk88 Sep 01, 2014 08:29 am
Jarkko Hietaniemi Sep 01, 2014 12:31 pm
Messages in this thread