[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] what's the best way to have MacPerl do proper long division?



Aside from floating point computations on a computer being approximate, it's
possible to write a Perl program that will take two numbers and put them
through the division algorithm you learned in grade school without using the
"/" operator. I'm not going to sit here and do it myself, but it would give
you results that lack the particular flaws that sometimes occur from just
using x / y.

on 11/7/00 9:32 AM, Paul Schinder at schinder@pobox.com wrote:

> At 9:42 AM -0500 11/7/00, Scott R. Godin wrote:
>> in other words, I would like to have more accurate calculations involving
>> division, where the percentages don't add up to more than 100%, and where I
>> can be reasonably assured of accuracy to around 5-6 decimal places. ?
> 
> You should already have that kind of accuracy on a Power PC chip.
> What kind of problems are you having?  (You're aware that floating
> point computations on a computer are only an approximation?)
> 
>> 
>> (glad you're back :)
>> 
> --
> --
> Paul Schinder
> schinder@pobox.com
> 
> # ===== Want to unsubscribe from this list?
> # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org
> 
> 


# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org