lua-users home
lua-l archive

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


On Tue, Mar 25, 2008 at 5:51 PM, Asko Kauppi <askok@dnainternet.net> wrote:
>
>  Ariel Manzur kirjoitti 25.3.2008 kello 22:06:
>
>
> > On Tue, Mar 25, 2008 at 10:55 AM,  <askok@dnainternet.net> wrote:
>  > [...]
>  >> Before 2008, I used to have LNUM patch always return FP
>  >> results to an integer, if possible. This, however, slowed
>  >> down _all_ FP operations slightly, and was never feeling
>  >> 'right'. The current way does feel right for me, and I bet
>  >
>  > Is it possible to disable conversion from integers to FP too? (maybe
>  > with a compile time option).
>
>  You mean to give an overflow error, or a round trip to negative
>  integers?

No, I mean have it behave like this:

5 / 2 = 2
5.0 / 2 = 2.5
2.5 * 2 = 5.0

like C basically, with no behind-the-scenes conversions at all.

>
>  No.
>
>  LNUM patch works on numbers, and bit patterns are another arena.
>
>  -asko
>
>