Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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
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 drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2020-02-29 04:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (128 votes). Check out past polls.

    Notices?