At 09:11 AM 05-06-99 -0600, you wrote:
>RTLinux support FP . If you don't set use_fp, then you are relying
>on good luck.
>
I did indeed set use_fp. The RT task uses the FPU and therefore rtl_sched
_must_ save and restore the FPU register stack. That's understood.
I also tried a floating point divide by 0.0 and the task still survives. A
integer divide by zero results in the expected nasty crash.
I notice that sqrt(-1.0) seems to return an extremely small number, whereas
the divide by 0.0 seems to return a very large number.
Is it possible Linux is configuring the FPU to return the nearest floating
point number that makes sense? Does it mean we never get floating point
exceptions? I think these are important questions.
Regards
>On Sat, Jun 05, 1999 at 11:00:17AM -0400, Pierre Cloutier wrote:
>>
>>
>> Hi:
>>
>> I compiled a task with GCC 2.8.1 to do inline floating point by including
>> <math.h> and setting up the appropriate define flag.
>>
>> I then strated a periodic RT task that tries to calculate the square root
>> of -1.
>>
>> I expected a nasty crash.
>>
>> Instead, the task kept rolling along, surviving the floating point errors.
>> I check the assembler code generated by GCC and the fsqrt instruction is
>> there.
>>
>> Can someone explain what's going on and why my puter did not crash?
>>
>> Pierre
>> _______________________________________________________
>>
>> Pierre Cloutier
>> Tel: (450)-659-9186
>> Fax: (450)-659-0014
>> POSEIDON CONTROLS INC
>> _______________________________________________________
>>
>> --- [rtl] ---
>> To unsubscribe:
>> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
>> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
>> ----
>> For more information on Real-Time Linux see:
>> http://www.rtlinux.org/~rtlinux/
>>
>>
>
_______________________________________________________
Pierre Cloutier
Tel: (450)-659-9186
Fax: (450)-659-0014
POSEIDON CONTROLS INC
_______________________________________________________
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/