MathGroup Archive 2007

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

Search the Archive

Rescale scales lower bound wrong

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74302] Rescale scales lower bound wrong
  • From: "zac" <replicatorzed at gmail.com>
  • Date: Sun, 18 Mar 2007 00:42:02 -0500 (EST)

Dear Group,

is there anything smart to be said concerning the following code?

In[1]:= Rescale[0.09090909090909091,{0.09090909090909091,1.},{0,100}]

Out[1]= -1.7763568394002505`*^-15

In[2]:= myRescale[y_,{minY_, maxY_},{minX_,maxX_}]:=N[(maxX-minX)/
(maxY-minY)*(y- minY)+minX];

In[3]:= myRescale[0.09090909090909091,{0.09090909090909091,1.},
{0,100}]

Out[3]= 0.

In my intention, the first result is wrong (apart from the actual
value, it is a negative number!), and the second one is correct. Is
the first result due to the internal number-representation?

Thanks

Istvan Zachar



  • Prev by Date: Plot3D Default ColorFunction
  • Next by Date: Keyboard shortcut to select the entire cell
  • Previous by thread: Re: Plot3D Default ColorFunction
  • Next by thread: Re: Rescale scales lower bound wrong