[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Another luajit crash report
- From: David Kastrup <dak@...>
- Date: Wed, 06 Apr 2011 00:18:09 +0200
Mike Pall <mikelu-1104@mike.de> writes:
> Zhu Ya Dong wrote:
>> In my computer, when count > 50, this test will cause luajit crash.
>
> Thank you for the report! Fixed in git HEAD.
>
>> ffi.cdef[[
>> typedef struct rect{float left, top, right, bottom;};
>> ]]
>
> Note that storing numbers as floats is rarely beneficial. The
> actual computations are performed as doubles.
Aren't you confusing K&R C (does every calculation in double) with ANSI
C (does float-only calculations in float, though literals without f
suffix are constants of type double and thus cause double calculations).
--
David Kastrup