> Take a look at the source for the Perl_sv_2nv() function in sv.c
> in the two distributions.
> Also check for differences in the perl config
> items that impact that code.

Back from a first dive.
There are significant differences between 5.6.2 and 5.8.8 with respect
to how PVs are translated to NVs.

The function Perl_sv_2nv differs strongly between the 2 versions. It
might be enough to say that it has doubled in size, contain many more
branches (and a few more comments ;).

One thing attracted my attention (but it might be a false lead and I
may be wrong): perl 5.6.2 ultimately converts a string of chars to a
double (64 bits on my hardware) with one of the functions strtold,
atolf or sscanf, depending on what's available.

In 5.8.8, perl calls atof or (and that's the default) an own
implementation of atof called Perl_my_atof2, located in numeric.c.

So in my case, it seems 5.6.2 gets its string-to-float answer from the
standard linux libraries, while 5.8.* gets it from its own algorithm.
Fishy smell, ain't it?

We are kind of living the realm of DBI here, so I will continue this
thread on the perl-porters mailing list and see what we can get there.

/Erwan

Reply via email to