math module bug

Joe Armstrong (AL/EAB) joe.armstrong@REDACTED
Fri May 13 14:03:29 CEST 2005



> -----Original Message-----
> From: owner-erlang-questions@REDACTED
> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Bjorn 
> Gustavsson
> Sent: den 13 maj 2005 10:09
> To: erlang-questions@REDACTED
> Subject: Re: math module bug
> 
> 
> Yes, providing our own implementation is indeed the cleanest 
> thing to do.
> We might do that.
> 
> But one question first. What are the functions used for?
> I have alwayws wondered why they were included in Erlang. (Joe?)
> 

I've no idea :-) If I recall math was added when we needed a sine or cosine or
something so we quickly added an inteface to the C libraries and interfaced the
functions we needed without thinking much. Then we added functions when we needed them.

Floats were added so that I could generate fractal trees and draw pretty pictures of them.

/Joe


> /Bjorn
> 
> "Vlad Dumitrescu XX \(LN/EAB\)" 
> <vlad.xx.dumitrescu@REDACTED> writes:
> 
> > Hi,
> > 
> > From: Richard A. O'Keefe
> > >Why not provide default implementations of the missing functions?
> > >Link them after libm, and you get the libm versions if they exist
> > >or the default ones if they don't.
> > 
> > I didn't need a very exact implementation, nor a fast one, 
> so I ended implementing them in Erlang, using linear interpolation.
> > 
> > A C implementation can be found at 
> http://www.ks.uiuc.edu/Research/namd/doxygen/erf_8C-source.htm
l, if the Sun copyright notice is kept.
> 
> regards,
> Vlad
> 

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list