lua-users home
lua-l archive

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


On 02/28/2013 08:40 PM, Christopher Berardi wrote:
On Thu, Feb 28, 2013 at 12:35:55PM -0200, Jorge wrote:
Wait, that's no PI!

An idea for a project: replace the fp in Luas number for a pair of
integers, a and b, representing the fraction a/b. Define operations
accordingly, and modify the parser.

Jorge


So shall we ignore all the irrational numbers? No PI, sqrt(2), etc.?

It's a (non-fun) joke. There are no irrational numbers inside a computer, unless you handle them symbolically (an irrational number has infinite digits which are not a repetition of a sequence). So if we are to handle only rationals, let be explicit on that.

Stuff: http://mathworld.wolfram.com/ContinuedFraction.html

Jorge