[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: mathlib
- From: "Joseph Manning" <manning@...>
- Date: Fri, 4 Apr 2014 09:49:25 +0100
On 2014-Apr-03 (Thu) at 17:35 (-0300), Roberto Ierusalimschy wrote:
>> We are considering removing some functions from the standard math lib,
>> either because we think few people use them or because they are trivially
>> implemented without the library. The current list is this:
Roberto,
While on the subject of the 'math' library, why does Lua provide
math.pi -- == 4 * math.atan( 1 )
but not
math.e -- == math.exp( 1 )
It would seem more consistent to provide either both or neither.
Is it due to the greater computational effort in 4 * math.atan( 1 ) ?
This does not seem like a particularly strong reason; if 'pi' is used
many times in a program, it could be cached into a local anyway.
Or is it felt that people use 'pi' vastly more often than 'e'?
Joseph
------------------------------------------------------------------------
Joseph Manning / Computer Science / UCC Cork Ireland / manning@cs.ucc.ie
------------------------------------------------------------------------