MathGroup Archive 1997

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

Search the Archive

Re: floor problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8239] Re: [mg8113] floor problems
  • From: sergio at scisun.sci.ccny.cuny.edu (Sergio Rojas)
  • Date: Thu, 21 Aug 1997 21:16:56 -0400
  • Organization: City College Of New York - Science
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,  Using:

In[7]:= $Version

Out[7]= DEC OSF/1 Alpha 2.2 (September 9, 1994)

In[8]:= Floor[(.7 67 10)]

Out[8]= 469

In[9]:= Floor[(67 10 .7)]

Out[9]= 469

In[10]:= (.7 67 10) - (67 10 .7)

Out[10]= 0.

Rojas

E-mail: sergio at scisun.sci.ccny.cuny.edu
Lou Talman (me at talmanl.mscd.edu) wrote:
: Tom De Vries wrote:

: > I had a very frustrating time trying to debug some work I was doing in
: > Mathematica.  I finally pared it down to a problem with the Floor
: > function, and I have illustrated my concern below.  I am using M 3.0 and
: > a Mac computer.  Does anyone have any advice or could you tell me if I
: > am doing something wrong?
: > 
: > Floor[(.7 67 10)]
: > 
: > 469
: > 
: > Floor[(67 10 .7)]
: > 
: > 468

: The problem is not with Floor, but with the fact that floating point
: multiplication of real numbers of fixed length is not, in general, associative:

: In[1]:=
: (.7 67 10) - (67 10 .7)

: Out[1]=
: \!\(5.68434188608080148`*^-14\)

: --Lou Talman



  • Prev by Date: wrong behavoir of BinCounts
  • Next by Date: Re: ListPlot with little plus signs instead?
  • Previous by thread: Re: Re: floor problems
  • Next by thread: Re: Re: floor problems