lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Liam,

I believe this might be Borland (Inprise) specific behaviour.
They set up the floating point to give exceptions, rather than returning inf.

To disable them, please do

#include <float.h>
_clear87();
_control87(MCW_EM, MCW_EM);

Thanks,
Dimiter "malkia" Stanev.

On 3/9/2011 3:35 AM, liam mail wrote:


On 9 March 2011 11:11, Chodera, Ian <Ian.Chodera@delphi.com
<mailto:Ian.Chodera@delphi.com>> wrote:

    Seems to give a floating point exception. In 5.1 it returned 'inf'
    can anyone else confirm this - it might be my build (c++ builder)?

    Regards
    Ian

    --

    ****************************************************************************************
    Note: If the reader of this message is not the intended recipient,
    or an employee or agent responsible for delivering this message to
    the intended recipient, you are hereby notified that any
    dissemination, distribution or copying of this communication is
    strictly prohibited. If you have received this communication in
    error, please notify us immediately by replying to the message and
    deleting it from your computer. Thank you.
    ****************************************************************************************


This is not the behaviour I see

~/Documents/API/lua-5.2.0-alpha/src$ ./lua -e"print(1.0/0.0)"
inf