MathGroup Archive 2001

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

Search the Archive

Re: How do I eliminate premultipliers of "1." ?


"Alan Mason" <swt at austin.rr.com> wrote:
> ..  I agree with you, though.  Mathematica 4.1 even claims
> that 1.0 == 1 is True.
>
> I consider this an outright error. 1.0 means a floating-point
> approximation to 1, whereas 1 is exactly 1

It's not an error.
Of course, a Real is a different type of number from an Integer. But to
evaluate the logical expression in a reasonable fashion, the Integer must
first be converted to Real.

You might note that, using default settings,
0.33333333333333 == 1/3 is True, while
0.3333333333333  == 1/3 is False.
This is as it should be.

> The correct way to treat 1.0/1.0 is somewhat ambiguous.
> Does 1.0 stand for the same approximation at each
> appearance?

It stands for the same Real at each appearance.

> If so, the ratio should be 1; otherwise, it should be 1.0.

It should be 1.0 because, in general, Real/Real must give Real.

   David

-- 
-------------------- http://NewsReader.Com/ --------------------
                    Usenet Newsgroup Service


  • Prev by Date: RE: Plot-Function
  • Next by Date: RE: Plotting unfilled bars in GeneralizedBarChart
  • Previous by thread: Re: Re: How do I eliminate premultipliers of "1." ?
  • Next by thread: Re: How do I eliminate premultipliers of "1." ?