Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-lcc!mordor!styx!ames!oliveb!intelca!mipos3!pinkas
From: pinkas@mipos3.UUCP (Israel Pinkas)
Newsgroups: comp.lang.c
Subject: Re: Is .2 irrational?
Message-ID: <361@mipos3.UUCP>
Date: Thu, 8-Jan-87 12:20:24 EST
Article-I.D.: mipos3.361
Posted: Thu Jan  8 12:20:24 1987
Date-Received: Fri, 9-Jan-87 01:39:37 EST
References: <442@catnip.UUCP> <7456@utzoo.UUCP> <153@piaget.UUCP> <1384@bunker.UUCP> <568@brl-sem.ARPA>
Reply-To: pinkas@mipos3.UUCP (Israel Pinkas)
Organization: Intel, Santa Clara, CA
Lines: 23

In article <568@brl-sem.ARPA> ron@brl-sem.ARPA (Ron Natalie ) writes:
>Gee, how do you deal with 1/3?  I'm not sure how I do that even on
>a decimal computer.  Perhaps you meant that can handle an exact represntation
>of all fractions of the form INTEGER/(Power of 10)

People, I think that you are forgetting the definition of the term
rational.  Rational numbers are defined to be numbers which can be
represented as a fraction of two integers.  Thus, 1/3, 22/7, and 42 are all
rational numbers, whereas e, pi, and i, are not.

What the original poster was asking, I think, is whether it is possible to
represent the number 0.2 (decimal) in binary with a fixed (read limited)
number of digits without losing accuracy.  The answer is no.  The reason is
that 0.2 is really 1/5, and 5 is not a divisor of any power of two.  (5 is
a divisor of a power of 10, 10^1, thus 1/5 can be represented in decimal
with only 1 decimal place.)

-Israel
-- 
----------------------------------------------------------------------
UUCP:	{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!pinkas
ARPA:	pinkas%mipos3.intel.com@relay.cs.net
CSNET:	pinkas%mipos3.intel.com