calc "5.5 + 0.01 * (7.35 / 3) + 42"

Result: 55.499499998 [0x37:7fdf3b55]

As you notice, there are rounding errors (result should be 55.4995)
and the calculations are left to right unless otherwise forced by (),
so the * / % are NOT binding stronger than + - in this program!

So this isn't really a calculator, but an approximator! ;-)

-jh



--
I'm sorry my president's an idiot. I didn't vote for him.


------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to