mau@alice.CSELT.STET.IT (01/24/91)
A lot of time ago (our Internet gateway in this period is not very good) I
posted a message about calling single precision math routines in a C
program. Indeed, I read the wrong manual: my fault was in the call of the
function.. A correct algorithm is shown below:
----- begin of program -----
#include <stdio.h>
#include <math.h>
FLOATFUNCTIONTYPE r_exp_();
main()
{
float * y;
double x;
FLOATFUNCTIONTYPE x1;
y = 2.04;
x = exp(*y);
/* x1 = r_exp_(y); THIS IS WRONG!!! */
ASSIGNFLOAT(x1, r_exp_(y)); /* the right way to call function */
printf ("double prec: %f - single prec: %f \n", x, x1);
}
Many thanks to all who kindly answered me:
dgh@validgh.com
pln@egret1.Stanford.EDU
turtle@sciences.sdsu.edu (Andrew Scherpbier)
poffen@sj.ate.slb.com (Russ Poffenberger)
Brent Alan Wiese <brent@curie.ssctr.bcm.tmc.edu>
edmund@syd.dms.csiro.au
i2unix!erix.ericsson.se!per (Per Hedeland)
Regards, .mau.