W3C home > Mailing lists > Public > www-ql@w3.org > October to December 2003

Re: precision on op:numeric-divide

From: Per Bothner <per@bothner.com>
Date: Tue, 09 Dec 2003 19:21:26 -0800
Message-ID: <3FD69136.3020308@bothner.com>
To: Damien Fisher <damien@sodatech.com>
Cc: www-ql@w3.org

Damien Fisher wrote:
> And should rational answers always be returned exactly, even
> if that requires an enormous amount of precision?

Many language implementations (including any for full Common Lisp)
do support exact rationals, and people seem to like that.  (They also
support floating-point.)

In the Lisp family, exact rationals are usually implemented and
printed as simplified fractions; but using repeating decimals might
be more useful.  E.g. op:numeric-divide(5, 3) could return a
decimal whose literal form might be "1._6_" where digits between
_ and _ are infinitely repeating.
	--Per Bothner
per@bothner.com   http://per.bothner.com/
Received on Tuesday, 9 December 2003 22:21:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:43 UTC