Xref: utzoo comp.lang.functional:728 comp.theory:1791 sci.math:16512 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!mips!spool.mu.edu!samsung!munnari.oz.au!mullian.ee.mu.OZ.AU!aet From: aet@mullian.ee.mu.OZ.AU (Albert Edward THOMPSON) Newsgroups: comp.lang.functional,comp.theory,sci.math Subject: do computers believe in real numbers? (slight return) Message-ID: <7285@munnari.oz.au> Date: 9 Apr 91 11:02:00 GMT Sender: news@cs.mu.oz.au Reply-To: aet@mullian.ee.mu.OZ.AU (Albert Edward THOMPSON) Organization: Dept. of Electrical Engineering, University of Melbourne Lines: 49 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.