in reply to Perl and maths

If that is the way you're explaining it to her, then I would say: stop.

perl -wle 'print ((5/3 + 7/13) / (5/2 - 3/7));' ==> prints 1.06454465075155
perl -wle 'print ((39 + 3 /13) / (35 - 9/21));' ==> prints 1.1347743165925

Are you sure you know math? Or is it Perl that doesn't know math? :)

Now back on topic, are you looking for a fully-featured calculator? or just a basic one (one that can only handle +, -, *, /)?

Replies are listed 'Best First'.
Re^2: Perl and maths
by ReinhardE (Sexton) on Feb 15, 2005 at 11:03 UTC
    no, I don't try it to explain her maths using Perl, ....
    I'm trying to have fun for myself
    I'm not searching a calculator either. I don't also want to deal with 0.3333 if I mean 1/3.
    You remember when you went to school ?
    I wish to transform ( for beginning ) simple expressions.
    cheers,
    reinhard