numerical data types
Peter Dobcsanyi
p.dobcsanyi at designtheory.org
Fri Oct 24 13:46:42 BST 2003
What a program can numerically tell about designs depends not only what
can be computed but also what can be expressed in the external
representation. These two aspects are interrelated, they can both extend
or restrict the range of numerical information conveyed by an ext-rep
file. The current thread "numerics" deals mainly with the "what can be
computed" side, here I try to address the other side: numerical data
types in the external representation.
Surprisingly, in the current documentation we don't say explicitly
anything about numerical types and that, I think, should be corrected
for version 1.0 regardless how much will be adopted from what follows
here.
Taking into account both the ext-rep definition and what an "average"
(whatever that means) program can internally deal with, ext-rep can
currently deliver the following numerical data types:
- Arbitrary precision integers.
- Floating point decimals up to about 15-16 significant digits.
So we can say, 6243534532548236412527354 and 123.456789, but cannot say
2/3 or 12345678901234567.89, not to mention complex numbers.
The inability to express arbitrary rational numbers is particularly
restrictive since, as the "numerics" thread shows, in general the
exact-inexact issue will evolve in time by exact rational results
supplementing and/or replacing some inexact data.
Of course, what numerical types we can practically adopt in ext-rep is
not independent from what data types we can compute with in a program.
In theory, everything is possible, but practicality, that is the
availability of various numerical libraries, beats theory here. All
things considered, I suggest the following numerical types to be adopted
in ext-rep:
Corresponding to exact internal representation:
- Arbitrary precision integers.
- Arbitrary precision rationals.
Corresponding to limited (inexact) internal representation:
- Floating point decimals up to about 15-16 significant digits.
- Complex numbers as (re, im) pairs based on the decimals above.
I think complex numbers could wait until version 1.1 but the rest should
go into 1.0.
Comments, please.
-- ,
Peter Dobcsanyi
More information about the Developers
mailing list