Re: [Haskell-cafe] Arbitrary precision?

2007-05-07 Thread Henning Thielemann
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:

Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Stefan O'Rear
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

Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Andrew Coppin
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

Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Brandon S. Allbery KF8NH
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

Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Andrew Coppin
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.

Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread Jim Burton
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

Re: [Haskell-cafe] Arbitrary precision?

2007-05-06 Thread David House
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