Thread View: comp.lang.functional
1 messages
1 total messages
Started by Albert Edward THOMPSON
Tue, 09 Apr 1991 11:02
do computers believe in real numbers? (slight return)
Author: Albert Edward THOMPSON
Date: Tue, 09 Apr 1991 11:02
Date: Tue, 09 Apr 1991 11:02
49 lines
2617 bytes
2617 bytes
It seems androids dream of computable reals.
>Article 742 of comp.lang.functional:
>Subject: Re: do computers believe in real numbers?
>Summary: They do, but languages tend not to.
>Keywords: redundant representation
>Reply-To: jgk@osc.COM (Joe Keane)
I'm the bloke who posted the query on real numbers.
I found your posting very interesting,
but there're a few bits i'm not sure about.
>We can characterise constructive real numbers by the primitive operations that
>are provided on them. For example, one way to describe the numbers in [0,2[
>is by the following operations:
> return the integer part of a given real (0 or 1)
> return twice the fractional part of a given real (another real)
> make a new real given its integer part and twice its fractional part
>
>It should be clear that these operations are all that is needed. Given them,
>you can write functions to add two numbers, and so on. I have restricted the
>numbers to [0,2[ for simplicity, but i trust you will see that this isn't a
>problem.
integerPart: |R -> {0,1}
twiceFractionPart: |R -> |R
makeReal: {0,1} x |R -> |R
Wouldn't you need another function to create a real without starting out
with a real in the first place? i.e. no |R on the left of the ->
Otherwise this would not be an abstract data type and would be sort of
a circular definition.
By the way, how do you define functions like sin, cos, log, etc?
The series definitions are infinite.
In fact, how do you define higher-order functions like
derivative, integral, fourierTransform?
(I already know the analysis (supposedly :^), but how do you deal with
infinite series, limits, etc. in a concrete way?
Is there something else that has to be included in the abstract data type
to take care of this?)
Hey! Your suggestions about lazy continued fraction representation and
redundancy in representation sound like the basis of quite a workable
implementation.
Thanks for a very useful posting!
Bert.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads