Mail Archives: djgpp/1994/10/05/03:47:50
On 28 Sep 1994, Brian Acton wrote:
> Hello All,
>
> I'm compiling with the flags "-mno-486"
>
> The lines of code that appear to generate the floating point exception are:
>
> int i;
> int j;
>
> for (i=0; i < 40000; i++) {
> if (i < j ) j++;
> }
>
> Any help would be greatly appreciated
>
> Brian Acton
>
Off hand I don't know what the "-mno-486" flag does but by ANSI C
definitions, an signed integer as you have declared "i" to be; has the
maximum and minimum values of -32,767 to 32,767. You want to declare "i"
as a unsigned int ( now i can be from 0 to 65000 ) or a unsinged long or
long int which gives you 4 million for the unsigned long or +/- 2million
for the signed long int.
Hope this helps,
Don ;)
/////////////////////////////////////////////////////
Don L.
Institute for Simulation and Training
lopez AT vsl DOT ist DOT ucf DOT edu
http://www.vsl.ist.ucf.edu/~lopez
Nothing is real......
Reality is like a broken glass....
The harder you try and put it together....
The worse it looks....
/////////////////////////////////////////////////////
- Raw text -