Mail Archives: djgpp/2001/03/17/02:27:18
On Saturday, March 17, 2001 12:28 PM, James W Sager Iii
[SMTP:sager+@andrew.cmu.edu] wrote:
|
| I'm sorry, I wasn't using commas... but at the same time I wasn't
| using
| .0. so perhaps it was being type casted wrong.
|
| but I tested it
| a=sqrt(10001.0);
|
| returns 100516
|
| Ok, that makes no sense what so ever
FYI, I just tried this small program and it worked perfectly for me.
#include <math.h>
#include <stdio.h>
int main()
{
double x = 10001.0;
printf ("%lf", sqrt (x));
return 0;
}
I got the result 100.005000, which looks ok.
Command line I used was:
gcc -o test test.c -lm
So, it's not a bug in the library.
--
Prashant TR <tr AT midpec DOT com>
Web: http://www.midpec.com/
----------------------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please
contact the sender and delete the material from any computer.
----------------------------------------------------------------------------------------------------------------------------
- Raw text -