Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

syphilis's scratchpad

by syphilis (Bishop)
on Dec 03, 2006 at 10:20 UTC ( #587490=scratchpad: print w/replies, xml ) Need Help??

--- numeric.c_orig 2018-06-28 19:03:33 +1000 +++ numeric.c_linux 2018-06-28 20:02:08 +1000 @@ -1119,7 +1119,7 @@ return TRUE; } -#ifndef USE_QUADMATH +#ifndef Perl_strtod STATIC NV S_mulexp10(NV value, I32 exponent) { @@ -1215,7 +1215,7 @@ } return negative ? value / result : value * result; } -#endif /* #ifndef USE_QUADMATH */ +#endif /* #ifndef Perl_strtod */ NV Perl_my_atof(pTHX_ const char* s) @@ -1226,7 +1226,7 @@ PERL_ARGS_ASSERT_MY_ATOF; -#ifdef USE_QUADMATH +#ifdef Perl_strtod Perl_my_atof2(aTHX_ s, &x); @@ -1369,11 +1369,11 @@ { const char* s = orig; NV result[3] = {0.0, 0.0, 0.0}; -#if defined(USE_PERL_ATOF) || defined(USE_QUADMATH) +#if defined(USE_PERL_ATOF) || defined(Perl_strtod) const char* send = s + strlen(orig); /* one past the last */ bool negative = 0; #endif -#if defined(USE_PERL_ATOF) && !defined(USE_QUADMATH) +#if defined(USE_PERL_ATOF) && !defined(Perl_strtod) UV accumulator[2] = {0,0}; /* before/after dp */ bool seen_digit = 0; I32 exp_adjust[2] = {0,0}; @@ -1386,7 +1386,7 @@ I32 sig_digits = 0; /* noof significant digits seen so far */ #endif -#if defined(USE_PERL_ATOF) || defined(USE_QUADMATH) +#if defined(USE_PERL_ATOF) || defined(Perl_strtod) PERL_ARGS_ASSERT_MY_ATOF2; /* leading whitespace */ @@ -1403,12 +1403,12 @@ } #endif -#ifdef USE_QUADMATH +#ifdef Perl_strtod { char* endp; if ((endp = S_my_atof_infnan(aTHX_ s, negative, send, value)) +) return endp; - result[2] = strtoflt128(s, &endp); + result[2] = Perl_strtod(s, &endp); if (s != endp) { *value = negative ? -result[2] : result[2]; return endp;
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2019-09-21 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (269 votes). Check out past polls.

    Notices?