[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why is there no 'math.round'?
- From: David Kastrup <dak@...>
- Date: Wed, 23 Apr 2008 15:10:40 +0200
Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
>> That's hardly an excuse for not having a round function.
>
> No excuses are needed. Lua's philosophy is minimalist. Since Lua
> libraries are easily extended either in C or in Lua, you can simply
> add a math.round function that suits you.
The problem is that it might not suit somebody else... Proliferation of
incompatible implementations is one thing that has kept numerical
libraries in C isolated: they all have their own, incompatible ways to
implement multidimensional arrays with run-time sizing.
Obviously, Lua implements some math functions in spite of being
minimalist. The question is where to draw the line (which actually is
all what rounding functions are about)...
--
David Kastrup