[DGD] Re: Math kfuns

Gregory D Lewis glewis at maths.adelaide.edu.au
Mon May 11 06:28:18 CEST 1998


> | Greetings again.
> | 
> | After looking at the source with the idea of implementing a math kfun
> | package, I noticed that there's a whole slew of math functions which are
> | effectively negated with a #if 0.  Why is this?  Is it safe to enable those
> | functions?
> 
> My guess would be that as they would be implemented using whichever C
> implementations are available at the current operating systems, which
> may mean that their result (with respect to rounding and number of
> decimals being used) cannot be guaranteed to be the same within DGD on
> various platforms.

I suspect, without testing, that most compilers stick to the relevant
IEEE/ANSI standard on this.  I think it would be useful to at least have
a kfun package which included say the trig functions and a pow function.
While compilers may not produce _exactly_ the same result they will all be
"close enough" for almost all intents and purposes.

On a related note, why is fabs a kfun?  Surely this is a one line trivial
piece of LPC?  This isn't a complaint, I'm just wondering why it has been
chosen for kfun status.

-- 
Greg Lewis                              Applied Maths Department
Email : glewis at maths.adelaide.edu.au    University of Adelaide
--
"All my friends and I are crazy.  That's the only thing that keeps us sane."



List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list