Re: Possreps and numeric types

From: Chris Edwards <cme_at_ihug.co.nz>
Date: Mon, 26 Mar 2007 23:46:04 +1200
Message-ID: <eu8bmg$j28$1_at_lust.ihug.co.nz>


On 03/26/07 05:30, Marshall wrote:
[...]
> Anyway, a vague idea I have is something related to
> representation of numbers. Let us consider just the
> case of the rationals and the integers. Every integer
> is a rational. The rationals have all the popular and
> attractive algebraic properties we are so used to
> seeing featured in Us magazine and Entertainment
> Weekly. Therefore all those same properties apply
> to the integers. (Note I am not speaking of 32 bit
> integers.)
>
> So what if we had an internal representation for
> integer similar to java.math.BigInteger, and an
> internal representation for rational that was a pair
> of integers. We can define *exact* operators for
> these types for basic arithmetic functions. (But
> not for trigonometric functions, logs, and roots.)
> The implementation of these operators for integer
> is likely to be significantly faster than the ones
> for rational. This starts to sound like possreps to
> me. (Although I don't think of possreps as being
> used with subsets.)

Interesting! I believe this is how Frink deals with rational numbers:

http://futureboy.homeip.net/frinkdocs/

Its support for units and unit conversions are another thing sorely lacking in most "modern" computing environments too, if you ask me.

Now if only there were a similar scheme for representing irrational numbers exactly... :^D

--
Chris
Received on Mon Mar 26 2007 - 13:46:04 CEST

Original text of this message