Re: The spinoza papers: design of the extra-precision number object 2
- From: spinoza1111 <spinoza1111@xxxxxxxxx>
- Date: Sat, 24 May 2008 02:31:07 -0700 (PDT)
On May 24, 11:41 am, Ben Bacarisse <ben.use...@xxxxxxxxx> wrote:
spinoza1111<spinoza1...@xxxxxxxxx> writes:
On May 24, 1:24 am, Ben Bacarisse <ben.use...@xxxxxxxxx> wrote:<snip>
If you chose rational numbers as your representation (as many systems
do) all your operations would be closed. Did you reject this more
common representation for a reason?
Not at all. I have an OO representation for which rational-fraction
algorithms can be written. It is {divide,a,b} where a and b are
"exact" reals.
OK. Seems odd to do it that way since a and b are floating point
types. Is there some advantage to this representation -- it looks
much harder to work with to me?
We only need monitor division for trouble. The first edition of the
code will therefore return a "symbolic", non-terminating value as an
expression when given division of a and b where a<b, etc.
How odd. I think the exact rules are quite complex but a<b seem
rather crude. You don't give the order, but 4/2 and 2/4 are both easy
to represent in you system and one of these has a<b.
The initial version will crudely refuse to divide when a<b.
And presumably in other cases as well. You would represent 5/3
symbolically, no? Personally, I'd allow 1/2 even right form the start
but getting all the cases where the result is exact will be quite a
challenge in the long run.
Hmm. The guiding philosophical principles of this effort shall be
(1) Implement algorithms without premature attention to efficiency,
while avoiding NP completeness as much as possible and repeated, non-
terminating operations. Of course, multiplication even of simple
integers by repeated additition and division even of simple integers
by repeated subtraction, IS NP complete.
(2) Don't put +/- indeterminacy in the first object model. It has been
placed in the Issues section of the design document as something
wonderful for later
(3) Complex numbers? We doan need no steenking...well, it is an Issue
(4) Try, really hard, not to reinvent Mathematica running 1e2 slower
(5) The point: to show that OO factoring works on something so simple
as a number
--
Ben.
.
- Follow-Ups:
- Re: The spinoza papers: design of the extra-precision number object 2
- From: Ben Bacarisse
- Re: The spinoza papers: design of the extra-precision number object 2
- References:
- The spinoza papers: design of the extra-precision number object 2
- From: spinoza1111
- Re: The spinoza papers: design of the extra-precision number object 2
- From: kwikius
- Re: The spinoza papers: design of the extra-precision number object 2
- From: spinoza1111
- Re: The spinoza papers: design of the extra-precision number object 2
- From: Ben Bacarisse
- Re: The spinoza papers: design of the extra-precision number object 2
- From: spinoza1111
- Re: The spinoza papers: design of the extra-precision number object 2
- From: Ben Bacarisse
- The spinoza papers: design of the extra-precision number object 2
- Prev by Date: Re: The spinoza papers: design of the extra-precision number object 2
- Next by Date: Re: The spinoza papers: design of the extra-precision number object 2
- Previous by thread: Re: The spinoza papers: design of the extra-precision number object 2
- Next by thread: Re: The spinoza papers: design of the extra-precision number object 2
- Index(es):
Relevant Pages
|