[comp.lang.c] Turbo-C oddity

bg0l+@andrew.cmu.edu (Bruce E. Golightly) (01/23/90)

I just got hold of Turbo-C, and am having a little problem. I cannot get
the function atof to behave properly. I am probably doing something wrong,
but have not been able to find the solution.

In particular, a program that references atof compiles and links cleanly,
but fails at run time with a message about the floating point formats not
being linked. The program does include the math.h header file, and appears
to be linking the math libraries correctly, along with the floating point
emulation software supplied by Borland.

Any suggestions?

bg0l@andrew.cmu.edu

AKA Bruce E. Golightly

semicon@watsci.uwaterloo.ca (Robert Adsett) (01/23/90)

In article <QZinytG00WB7IjnWNO@andrew.cmu.edu> bg0l+@andrew.cmu.edu (Bruce E. Golightly) writes:
>I just got hold of Turbo-C, and am having a little problem. I cannot get
  ...
>In particular, a program that references atof compiles and links cleanly,
>but fails at run time with a message about the floating point formats not
>being linked. The program does include the math.h header file, and appears
   This is a bug in Turbo-C.  There is a patch available for it (in the
directory PD1:<msdos.turbo-c> on SIMTEL20 and probably elsewhere).   A
temporary work around until you get & apply the patch is to place the line
  (void)exp(1.0);
in your code.  That will force the loading of the appropriate formats.
  

--
		Robert Adsett  <semicon@watsci.UWaterloo.ca>
		Dept. of Phys, Univ. of Waterloo, Waterloo Ont. Canada