[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: jinx@geneva.ai.mit.edu, bartley%home%ti-csl.csnet@relay.cs.net*Subject*: Re: number syntax*From*: Warren Harris <harris%hplwhh@hplabs.HP.COM>*Date*: Sun, 12 Apr 87 16:19:17 PST*Cc*: rrrs-authors@mc.lcs.mit.edu*In-Reply-To*: Your message of 10 Apr 87 16:18:11 PDT (Fri). <8704102318.AA07578@tekchips.TEK.COM>

> ... the original proposal is such that both exact and inexact > flonums are possible (and desirable), and similarly for the other > types. Although we have not implemented it, we have an implementation > in mind, and it is orthogonal: for each type of number, there is a bit > specifying whether it is exact or not. In the presence of an exactness indicator bit, I would be all for adding an exactness indicator to number syntax. This would allow the user to explicitly specify whether a number is exact or inexact, independent of its type. For example, one could use: -3.14, 7/8, 2+7i, to mean an exact quantities, and: ~-3.14, ~7/8, ~2+7i to mean inexact quantities. (I use tilde to indicate "approximately" as opposed to "not" like in C). This explicit notation would allow exactness to be preserved by coersion operators: (float ~7/2) => ~3.5 as well as removing ambiguities from operations such as: (sqrt 4) => 2 (sqrt ~4) => ~2 (sqrt 4.0) => 2.0 ; this would have been considered inexact ; if all flonums were inexact (sqrt 3) => ~1.7320508075688772 ; finite precision (sqrt -4) => 0+2i ; this might have been considered inexact too

**References**:**Re: number syntax***From:*willc%tekchips.tek.com@RELAY.CS.NET

- Prev by Date:
**towards an agenda - yeller pages** - Next by Date:
**Re: meeting dates/times/places** - Prev by thread:
**Re: number syntax** - Next by thread:
**number syntax** - Index(es):