[Haskell-cafe] about integer and float operations

Manlio Perillo manlio_perillo at libero.it
Fri Feb 6 17:06:28 EST 2009


Henning Thielemann ha scritto:
> 
> On Thu, 5 Feb 2009, Manlio Perillo wrote:
> 
>> Yitzchak Gale ha scritto:
>>>
>>> Ah, OK. Thanks. Now we have a well-defined problem. :)
>>
>> Good :).
> 
> I have used this example to describe how to avoid big integers at all:
>   http://haskell.org/haskellwiki/Integers_too_big_for_floats
> 

Thanks, I didn't know that Ratio constructor was available via GHC.FLoat.

I have done a test using the :% operator, instead of the % operator, 
but, the program run slower!

About 29 seconds, against 20 seconds of the previous version (and 10 
seconds of the Python version).

I was expecting to obtain an execution time of about 6 seconds...



Manlio Perillo


More information about the Haskell-Cafe mailing list