Mail Archives: djgpp/1997/09/25/08:30:23
The NiBBLeR wrote:
>
> Hello,
>
> I've got a little problem:
> I'm writing a 3d-engine, and I'm using floating point...
> what can be wrong if I get a Floating Point Exception ???(Note: I don't
> divide)
> Can somebody please tell what the reason could be ???
After taking a deep breath, relaxing into the infinity of the universe
and gathering all my pscychokinetic forces I came up with the following
answer:
It could be
- mixing %f and %lf in ?scanf()
- a dangling pointer pointing some integer or character that,
when seen as a float, makes only little, if any, sense.
- an old libm.a that has the bug in exp()
- virtually anything that may go wrong in programming.
My advice:
Compile everything with -g (yes, it is for the weak, but sometimes
helps), run the program and try to figure out with symify why it
crashes when.
Compile with -Wall and -pedantic and try to resolve each and every
warning (Yeah, this is for them Pascal whimps, but sometimes
really helps)
Add some information or code snippets that exhibits the problem.
My (and probably most people's) programming capabilities outperform
my seer's capabilities. So we'd have half a chance to say something
reasonable ;-)
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -