Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^8: Algorithm for cancelling common factors between two lists of multiplicands (192.5 ms)

by tmoertel (Chaplain)
on Aug 14, 2005 at 03:58 UTC ( #483654=note: print w/replies, xml ) Need Help??


in reply to Re^7: Algorithm for cancelling common factors between two lists of multiplicands (192.5 ms)
in thread Algorithm for cancelling common factors between two lists of multiplicands

tmoertel's haskell implementation amazes me on the precision! I wonder if that is specific to Haskell or the way it was coded
The reason the implementation has such precision is not because it is written in Haskell – although that does make coding more convenient – but because it computes the answer exactly as a ratio of bigints and then extracts decimal digits until the desired precision has been obtained. If you want more or fewer than sixity digits, for example, just change 60 to the desired number in the sciformat 60 call in the code in Re^13: Algorithm for cancelling common factors between two lists of multiplicands.

Cheers,
Tom

  • Comment on Re^8: Algorithm for cancelling common factors between two lists of multiplicands (192.5 ms)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://483654]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2022-11-28 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?