|
From: | Per Bothner |
Subject: | Re: [Qexo-general] Problem with division |
Date: | Wed, 26 Mar 2003 09:26:08 -0800 |
User-agent: | Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.3) Gecko/20030312 |
Seshukumar Venkata Adiraju wrote:
The Expression (($num), "/", $den ,"=", ($num div $den))evaluates to14704478/2425000=7352239/1212500
Why is this happening?
I took some shortcurs when implementing Qexo arithmetic, basically using Scheme arithmetic. And Scheme provides exact rational arithmetic. As a work-around, you could add 0.0 or multiply by 1.0 to force the result to floating-point. -- --Per Bothner address@hidden http://per.bothner.com/
[Prev in Thread] | Current Thread | [Next in Thread] |