News for hackers. Stuff that matters.
Re:A little thing to love about Perl 6 and COBOL by jzwinck on Wednesday February 04, 2015 @08:47PM (#9001290)
How many programs written in Perl do you think add currency values together, vs. how many sum the harmonic series?
Re:A little thing to love about Perl 6 and COBOL by reikonomusha on Thursday February 05, 2015 @04:34AM (#9002391)
Consider computing compound interest using rationals. That's a practical thing that could happen akin to harmonic series calculation, where you'll get absurdly large rationals.
Re:A little thing to love about Perl 6 and COBOL by smosher_ on Thursday February 05, 2015 @07:09AM (#9002795)
Considering .exp results in a Num, not a Rat, there's no problem here. I seem to recall this working sensibly years ago, where numerical types would coerce in sensible manner. Same happens with large denominators, so even if you roll your own successive approximation it will coerce away from Rat before things get out of hand.