Newsgroups: comp.lang.scheme,comp.lang.c++,comp.lang.java.programmer
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!purdue!lerc.nasa.gov!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.erols.net!news.mathworks.com!uunet!in1.uu.net!uucp3.uu.net!rosevax!reddwarf!grante
From: grante@reddwarf.rosemount.com (Grant Edwards)
Subject: Re: Divison.  Was Re: 10 Reasons Why Scheme is Better Than C/C++
X-Nntp-Posting-Host: reddwarf
Message-ID: <1996Dec6.211732.28981@rosevax.rosemount.com>
Followup-To: comp.lang.scheme,comp.lang.c++,comp.lang.java.programmer
Sender: news@rosevax.rosemount.com (Rosevax USENET News auto-admin account)
Organization: Fisher-Rosemount, Rosemount Inc.
X-Newsreader: TIN [version 1.2 PL2]
References: <57g0qm$pqs@netnews.upenn.edu> <329C637E.5DA@netright.com><57g0qm$pqs@netnews.upenn.edu> <329C637E.5DA@netright.com> <4nenh74apf.fsf_-_@rtp.ericsson.se> <584nbh$11j@news.hcl.com>
Date: Fri, 6 Dec 1996 21:17:32 GMT
Lines: 33
Xref: glinda.oz.cs.cmu.edu comp.lang.scheme:17616 comp.lang.c++:231946 comp.lang.java.programmer:23589

Robert McDermid (mcdermid@hcl.com) wrote:

: BTW, 1/3 is an irrational, not a rational, 

Wow.  Things have changed a bit since I was in school.  Anything that could
be expressed as a "ratio" of two integers was a "ratio"nal number.

: and there's no way to represent that precisely at all (using floating
: point) on a computer. 

Maybe on _you're_ computer there isn't.  I could design you one upon which
1/3 could be represented exactly in floating point.  The cost/performance
would be worse that current architectures -- being able to exactly represent
1/3 in floating point isn't seen as a big performance gain.  I can't
guarantee that this computer I design you will be able to exactly represent
_all_ rational numbers.  In fact, the architecture I have in mind won't
represent 1/10 or 1/2 exactly.

: Thus, in the example you give, y will never equal x no matter what computer
: language you use.  

Depends on the language and the underlying representation.  One could design
a computer and a language that would do it.  Why one would do such a thing
is another matter.

: (Do any of the symbolic manipulation packages like Maple have a way of
: handling this better?)

--
Grant Edwards        | Microsoft isn't the   | Yow!  Do you have exactly
Rosemount Inc.       | answer. Microsoft     | what I want in a plaid
                     | is the question, and  | poindexter bar bat??
grante@rosemount.com | the answer is no.     | 
