Q: mathfp goals.
Thu Mar 16 00:04:00 GMT 2000
If the goal is speed, then in some places 'mathfp' seems strange. Consider,
for example, code for 'fabs'
=== mathfp ===
_DEFUN (fabs, (double),
switch (numtest (x))
errno = EDOM;
errno = ERANGE;
return (x < 0.0 ? -x : x);
=== math ===
double fabs(double x)
I believe that on many processors the 'math' version is (much) faster due to
abscence of branches.
Did somebody *actually* compare speeds of both math versions? Are the results
Am I missing something?
Ranjith Kumaran <email@example.com> writes:
> The main reason for mathfp is to have a libm that uses floating point
> routines where available instead of (slower) floating point emulation.
> On 14 Mar 2000, Sergei Organov wrote:
> > Hello,
> > What are goals of development of 'mathfp'? Is it speed/code size or
> > independence of availability of IEEE floating point or what? In other words
> > what are the main differences between 'math' and 'mathfp'?
> > Thanks in advance.
> > Sergei Organov.
More information about the Newlib