Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^7: Avoiding perl's Atof when assigning floating point values

by syphilis (Archbishop)
on Jul 29, 2018 at 13:38 UTC ( [id://1219430]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Avoiding perl's Atof when assigning floating point values
in thread Avoiding perl's Atof when assigning floating point values

Failed 2 tests out of 2458, 99.92% okay. ../ext/POSIX/t/posix.t run/locale.t

Yes, the first thing I tried when I discovered I could reproduce the failures was to test a build configured with -Ud_strtod.
I got the same results as you.

I apologise for not having tried a bit harder to reproduce the lib/locale.t failure.
I assumed that Carlos' smoker would be using the same locale setting for all of the systems that it tested. That is, I assumed that the reason that some systems passed and others didn't was because of some difference in the systems.
But, of course, it was the difference in the locale settings. It was a bad assumption on my part. (They always are.)

As I mentioned in my last post, I'm confident that the correct fix is to modify lib/locale.t and that's the solution I'll be pushing when I get things organized.
Here's the patch:
--- git/bleadperl/lib/locale.t 2018-07-15 10:33:46 +1000 +++ locale.t 2018-07-29 22:21:25 +1000 @@ -2167,8 +2167,8 @@ my $first_c_test = $locales_test_number; $test_names{++$locales_test_number} = 'Verify that a different lo +cale radix works when doing "==" with a constant'; - if ($Config{usequadmath}) { - print "# Skip: no locale radix with usequadmath ($test_names{ +$locales_test_number})\n"; + if ($Config{usequadmath} || ($Config{uselongdouble} && $Config{d_ +strtold}) || (!$Config{uselongdouble} && $Config{d_strtod})) { + print "# Skip: no locale radix with Perl_strtod ($test_names{ +$locales_test_number})\n"; report_result($Locale, $locales_test_number, 1); } else { report_result($Locale, $locales_test_number, $ok3); @@ -2176,8 +2176,8 @@ } $test_names{++$locales_test_number} = 'Verify that a different lo +cale radix works when doing "==" with a scalar'; - if ($Config{usequadmath}) { - print "# Skip: no locale radix with usequadmath ($test_names{ +$locales_test_number})\n"; + if ($Config{usequadmath} || ($Config{uselongdouble} && $Config{d_ +strtold}) || (!$Config{uselongdouble} && $Config{d_strtod})) { + print "# Skip: no locale radix with Perl_strtod ($test_names{ +$locales_test_number})\n"; report_result($Locale, $locales_test_number, 1); } else { report_result($Locale, $locales_test_number, $ok4); @@ -2198,8 +2198,8 @@ $test_names{$locales_test_number} = 'Verify that "==" with a scal +ar still works in inner no locale'; $test_names{++$locales_test_number} = 'Verify that "==" with a sc +alar and an intervening sprintf still works in inner no locale'; - if ($Config{usequadmath}) { - print "# Skip: no locale radix with usequadmath ($test_names{ +$locales_test_number})\n"; + if ($Config{usequadmath} || ($Config{uselongdouble} && $Config{d_ +strtold}) || (!$Config{uselongdouble} && $Config{d_strtod})) { + print "# Skip: no locale radix with Perl_strtod ($test_names{ +$locales_test_number})\n"; report_result($Locale, $locales_test_number, 1); } else { report_result($Locale, $locales_test_number, $ok8); @@ -2218,8 +2218,8 @@ $problematical_tests{$locales_test_number} = 1; $test_names{++$locales_test_number} = 'Verify that after a no-loc +ale block, a different locale radix still works when doing "==" with +a scalar and an intervening sprintf'; - if ($Config{usequadmath}) { - print "# Skip: no locale radix with usequadmath ($test_names{ +$locales_test_number})\n"; + if ($Config{usequadmath} || ($Config{uselongdouble} && $Config{d_ +strtold}) || (!$Config{uselongdouble} && $Config{d_strtod})) { + print "# Skip: no locale radix with Perl_strtod ($test_names{ +$locales_test_number})\n"; report_result($Locale, $locales_test_number, 1); } else { report_result($Locale, $locales_test_number, $ok11); @@ -2465,8 +2465,8 @@ } } - if ($Config{usequadmath}) { - print "# Skip: no locale radix with usequadmath ($Locale) +\n"; + if ($Config{usequadmath} || ($Config{uselongdouble} && $Confi +g{d_strtold}) || (!$Config{uselongdouble} && $Config{d_strtod})) { + print "# Skip: no locale radix with Perl_strtod ($Locale) +\n"; report_result($Locale, $locales_test_number, 1); } else { report_result($Locale, $locales_test_number, @f == 0);
(Safest to avoid line wrapping by electing to "download")

If you apply that patch to the lib/locale.t that shipped with blead_patched.tar.gz then all tests should (hopefully) pass.

Thanks again for the help you've provided. I much appreciate it.

Cheers,
Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1219430]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 19:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found