On Sat, Dec 29, 2001 at 11:10:30PM +0000, Nicholas Clark wrote:
> Obviously finding one for Sparc (IIRC Solaris also didn't have one) would be
> a good thing. But we still need to fix the logic.
> Can we roll our own modf? [Would it be numerically stable for extreme
> values] Unpack's use of modf for checksums can be replaced with fmod, IIRC.
> Do Sparc Solaris and Sparc Linux have a long double modf?

The modf man page says it returns a double.  g++ has long double modf,
but that's all I can see.

schwern@usf-cf-sparc-linux-1:~$ rgrep 'modf' /usr/include/   
/usr/include/bits/mathcalls.h:__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
/usr/include/g++-3/cmath:float modf (float, float*);
/usr/include/g++-3/cmath:long double modf (long double, long double*);


Solaris/Sparc 8 doesn't look like it has an ld modf either.
$ find /usr/include -name '*.h' | xargs grep modf
/usr/include/sys/scsi/targets/osesio.h:uchar_t  modfail : 1,    /* module has failed */
/usr/include/sys/scsi/targets/osesio.h: modfail : 1;    /* module has failed */
/usr/include/iso/math_iso.h:extern double modf __P((double, double *));
/usr/include/iso/math_iso.h:#pragma does_not_read_global_data(frexp, ldexp, modf)
/usr/include/iso/math_iso.h:#pragma does_not_write_global_data(frexp, ldexp, modf)
/usr/include/math.h:using std::modf;
/usr/include/math.h: * Orphan(s); frexp, ldexp, modf and modff are part of libc 
nowadays.
/usr/include/math.h:extern float modff __P((float, float *));
/usr/include/math.h:#pragma does_not_read_global_data(modff)
/usr/include/math.h:#pragma does_not_write_global_data(modff)


> On Sat, Dec 29, 2001 at 04:56:33PM -0500, Michael G Schwern wrote:
> > I'm just a monkey with a lot of hammers, I wouldn't know where to
> > start looking. :(
> 
> Hammers are good. Select the right hammer for your job though. :-)
> Claw hammers, ball pane hammers, club hammers, sledge hammers are all the
> types I can think of offhand.
> 
> [Oh, and "Birmingham screwdriver" which is a hammer by another name]

Rubber mallets, rock hammers, jackhammers, Mike Hammer, Hammer Time...

Friend of the family who's a carpenter had a small one-handed sledge
hammer he called "The Persuader".  If something didn't fit quite
right, he "persuaded" it.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
yes i am hungry
yes lick my fucking kitchen
all i have is paste
        -- Fmh

Reply via email to