Paramters of type float getting cor

werg8009 at uxa.cso.uiuc.edu werg8009 at uxa.cso.uiuc.edu
Fri Nov 2 04:32:00 AEST 1990


I ran into this problem a little while ago too.

The reason you're number is corrupted is that when you pass a float as an
argument it gets converted to a double before it gets put on the
stack.

Therefore there are two solutions:
1. Change the defintion of the arguments in the receiving function to be 
   doubles.

2. Pass around pointers to floats instead of actual floats.

Bill Reynen 
(werg8009 at uxa.cso.uiuc.edu)



More information about the Comp.lang.c mailing list