MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: odd mathematica blindspot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56569] Re: odd mathematica blindspot
  • From: Peter Pein <petsie at arcor.de>
  • Date: Fri, 29 Apr 2005 03:20:30 -0400 (EDT)
  • References: <d4klbs$eg7$1@smc.vnet.net> <200504270153.VAA01785@smc.vnet.net> <d4q28r$ol9$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Edward Peschko wrote:
> From: Edward Peschko <esp5 at pge.com>
To: mathgroup at smc.vnet.net
> Subject: [mg56569] Re:  Re: odd mathematica blindspot
> Reply-To: 
> 
> On Tue, Apr 26, 2005 at 09:53:49PM -0400, Skirmantas wrote:
> 
>>Hi Ed,
>>
>>By definition, 9999999999999/10000000000000 is an exact rational number, whereas 0.5 is an approximate real number:
> 
> 
> Well, that's completely unintuitive..  I understand it, but it still rubs me the 
> wrong way for some reason. '.5' on paper means that to me - .5 - not .4999999999
> or .50000000001 or whatever internal representation the computer chooses.. In fact, 
> that's why I got Mathematica in the first place, to get away from this approximate
> stuff.

So, why do you use it any more?? Take 1/2 in place of 0.5 and be happy.

> 
> Why couldn't mathematica treat .5 as a string, make the internal calculation 
> and turn .5 into 5/10? Or, barring that, is there a conversion function for this 
> (going back and forth between rational and approximate real?
>

In[1]:= Rationalize[0.5]
Out[1]= 1/2

see the Mathematica book, chapter 3.2.2. (it should be on your hard
disk, accessible by the help browser)

> Ed
> 


-- 
Peter Pein
Berlin


  • Prev by Date: Re: Re: Re: odd mathematica blindspot
  • Next by Date: Re: Floor[] Not An Integer?
  • Previous by thread: Re: Re: Re: odd mathematica blindspot
  • Next by thread: Re: odd mathematica blindspot