On Sun, 6 May 2007, Andrew Coppin wrote:
Greetings.
Haskell has arbitrary precision integers, in the form of the Integer
type. Is there a type somewhere that implements arbitrary precision
fractional values?
Whatever you want:
On Sun, May 06, 2007 at 05:15:08PM +0100, Andrew Coppin wrote:
Greetings.
Haskell has arbitrary precision integers, in the form of the Integer
type. Is there a type somewhere that implements arbitrary precision
fractional values?
Yes, Rational in the Prelude (with extra functions in
Greetings.
Haskell has arbitrary precision integers, in the form of the Integer
type. Is there a type somewhere that implements arbitrary precision
fractional values?
Yes, Rational in the Prelude (with extra functions in Ratio)
Prelude let fibs = (1::Rational) : 1 : zipWith (+) fibs
On May 6, 2007, at 12:59 , Andrew Coppin wrote:
OOC, is there a reason why you can't just write 5%10?
Prelude :t 5%10
interactive:1:1: Not in scope: `%'
Prelude :m +Data.Ratio
Prelude Data.Ratio :t 5%10
5%10 :: (Integral t) = Ratio t
Prelude Data.Ratio
I'm actually a bit surprised that's
Brandon S. Allbery KF8NH wrote:
OOC, is there a reason why you can't just write 5%10?
Prelude :t 5%10
interactive:1:1: Not in scope: `%'
Prelude :m +Data.Ratio
Prelude Data.Ratio :t 5%10
5%10 :: (Integral t) = Ratio t
Prelude Data.Ratio
I'm actually a bit surprised that's not in Prelude.
Andrew Coppin wrote:
...
Likewise...
Oh, by the way, thanks for the extra syntax. It's really annoying having
to locate Notepad.exe on the start menu, type import Blah, save it as
Thing.hs, open Windoze Explorer, locate Thing.hs, and then
double-click it just so that I can try
On 06/05/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Oh, by the way, thanks for the extra syntax. It's really annoying having
to locate Notepad.exe on the start menu, type import Blah, save it as
Thing.hs, open Windoze Explorer, locate Thing.hs, and then
double-click it just so that I can try