MATH Error in MS C 5.0
Jim A. Pisano
jap7g at psy3b2.psyc.Virginia.EDU
Wed Apr 6 06:34:31 AEST 1988
I'm writing a simple program that times keypresses using MicroSoft C V 5.0.
The times are obtained using the 'ftime()' functions. I then convert the
times (in integer form) to floating point #'s (doubles) & display the
times of keypresses & elapsed time between presses.
After the program runs (it runs correctly), I get the error:
run-time error M6101: MATH
- floating-point error: invalid
The manual says that I tried to calculate infinity (I already know what
infinity is) or I operated on a NAN (Not A Number).
Here's my question: How can I find out where that NAN is? I have CodeView,
but I haven't figured out how to trap this math error short of checking
every variable everywhere. Is there a way to set a tracepoint when the
math emulator is used?
Thanks,
Jim Pisano Psychology Department University of Virginia
jap7g at virginia
More information about the Comp.lang.c
mailing list