[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Integer division
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 20 Nov 2012 18:49:40 -0200
> I worry that integer multiplication might slow down some of my code,
> and there'd be a risk of unexpected precision overflows.
As integer will be a "visible" subtype, you can choose not to use
it. If you feed floating-point numbers to your computations, Lua will
perform them using floating-point arithmetic, just like today. The
main difference is that you have to think about how you want to handle
overflows.
-- Roberto