Fraction calculation in Perl

This Perl script is able to add,subtract,divide and multiply fractional numbers:

This is the output from 1/2 and 1.25, at first add both then subtract from the result, multiply and then divide from the result:

For a better result take a look at Perl high precision.

One thought on “Fraction calculation in Perl”

  1. Hi there, just became alert to your blog through
    Google, and discovered that it can be truly informative.
    I’m gonna be aware of brussels. I’ll appreciate should
    you continue this in future. A great deal of people will be benefited from your writing.
    Cheers!

    View Comment

Leave a Reply

Your email address will not be published.

20 − 9 =