lua-users home
lua-l archive

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

Hi James,

What that means is that your host app has floating point exceptions enabled. By default, the fpu should just produce propagating NaNs and Infs. Perhaps you're running inside Delphi or similar? Anyway, to disable floating point exceptions.

On an x86 where __asm{} allows you to type assembler, this'll do it:

__asm {

(Reinitializes the fpu to its default state)

Then your application will run this app:
The same as the lua standalone, that is, it'll print NaN;

----- Original Message ----- From: "James Walker"

When Lua is used on Windows, floating point exceptions can crash the host application. I suggest adding some error checks, something like this: