[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Numerical example (real? -2.5+0.0i)
On 3 Oct 2011, at 04:08, Aubrey Jaffer wrote:
> | > Shouldn't the predicates REAL? and COMPLEX? implement the
> | > mathematical semantics for which they are named?
> | ... There are two reasonable sets of semantics here, and by
> | providing two sets of procedures we can support both. By adding an
> | "exact-complex" feature, a program that depends on exact complex
> | numbers can rely on being run only on an implementation that
> | supports them.
> The terms integer, rational, real, and complex are too few to
> adequately describe all the possible numeric Scheme types. Rather
> than misuse basic mathematical terms, coin new names for the numeric
> types which don't match the mathematical types.
In math, there are two distinct copies of the integers in play: the ring of integers Z, and the copy of it embedded into the field Q of rational numbers. A similar thing happens with real and complex numbers.
One could think of having that model in a computer program.
Scheme-reports mailing list