Skip Menu |

This queue is for tickets about the Language-Farnsworth CPAN distribution.

Report information
The Basics
Id: 57667
Status: new
Priority: 0/
Queue: Language-Farnsworth

People
Owner: simcop [...] cpan.org
Requestors: farnsworth-bugs [...] googlegroups.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Request new builtin numeric functions
Date: Thu, 20 May 2010 18:45:37 +0200
To: farnsworth-bugs [...] googlegroups.com
From: Zsbán Ambrus <ambrus [...] math.bme.hu>
I'd like to request that you add the following builtin numeric functions to farnsworth. Each of these should be trivial to implement because you just have to wrap a perl or pari function. 1. ldexp, fmod - these would be just straight wrappers over the numeric functions which can be found in the perl module POSIX acting on machine floats. 2. frexp, modf - similar, except either they have to return an array of two numbers (inconvenient because you don't have list assignment right now), or you have make them two functions each. 3. ffloor, fceil, frint, ftrunc - similar, these would return a float instead of a very large bigint for large numbers, while the floor etc functions would keep returning bigints. 4. div, mod, quo, rem - integer division: div and mod are mathematician's division, they round quotient towards minus inf so x mod y has same sign as y, quo and rem are computer scientist's division, they round quotient towards zero so x rem y has same sign as x. these should be builtins calling the pari functions so they work correctly (and fast) on bigints. Ambrus