syphilis has asked for the wisdom of the Perl Monks concerning the following question:
But Gconvert() doesn't DWIM when nvtype is __float128, so I've altered that code to:Gconvert (SvNVX (sv), NV_DIG, 0, enc->cur);
I've chosen "33" (== the value of NV_DIG on quadmath builds) because Gconvert uses NV_DIG for both "double" builds of perl (where NV_DIG is 15) and "long double" builds of perl (where NV_DIG is 18).#ifdef USE_QUADMATH quadmath_snprintf(enc->cur, NV_DIG, "%.33Qg", SvNVX (sv)); /* NV_DIG i +s 33 for quadmath builds */ #else Gconvert (SvNVX (sv), NV_DIG, 0, enc->cur); #endif
Before I investigate that test failure, I just want to check that NV_DIG (33) is the correct value to be specifying in the "%Qg" formatting ??t/11_pc_expo.t .......... 1/8 # Failed test 'digit 1.01e+30' # at t/11_pc_expo.t line 35. # '[1010000000000000000000000000000]' # doesn't match '(?^:\[1.01[Ee]\+0?30\])' # Looks like you failed 1 test of 8.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: JSON-XS on quadmath builds of perl
by kikuchiyo (Hermit) on Sep 20, 2024 at 08:20 UTC | |
by syphilis (Archbishop) on Sep 20, 2024 at 09:14 UTC | |
by afoken (Chancellor) on Sep 20, 2024 at 18:30 UTC | |
by syphilis (Archbishop) on Sep 22, 2024 at 06:55 UTC |