diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-15 14:09:31 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-04-15 14:09:31 +0000 |
commit | 55954f198635e48806cb76596014125260048264 (patch) | |
tree | 57f230c6482158594af0bede2ecaae0eb028f13a /numeric.c | |
parent | fb189484f11842c8d45ba7469f6c64347beeadf3 (diff) | |
download | perl-55954f198635e48806cb76596014125260048264.tar.gz |
Big patch from Alan Burlison to make Solaris long doubles work.
(Also spreads more <stdlib.h> joy.)
Needs backporting to metaconfig units and introducing the new
symbols to non-Configure lands.
p4raw-id: //depot/perl@19218
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -972,3 +972,19 @@ Perl_my_atof2(pTHX_ const char* orig, NV* value) return s; } +#if ! defined(HAS_MODFL) && defined(HAS_AINTL) && defined(HAS_COPYSIGNL) +long double +Perl_my_modfl(long double x, long double *ip) +{ + *ip = aintl(x); + return (x == *ip ? copysignl(0.0L, x) : x - *ip); +} +#endif + +#if ! defined(HAS_FREXPL) && defined(HAS_ILOGBL) && defined(HAS_SCALBNL) +long double +Perl_my_frexpl(long double x, int *e) { + *e = x == 0.0L ? 0 : ilogbl(x) + 1; + return (scalbnl(x, -*e)); +} +#endif |