Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

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

  • To: mathgroup at
  • Subject: [mg31169] Re: How do I eliminate premultipliers of "1." ?
  • From: "David W. Cantrell" <DWCantrell at>
  • Date: Tue, 16 Oct 2001 01:18:44 -0400 (EDT)
  • References: <9q8oeb$co$> <9qbi0g$2d4$>
  • Sender: owner-wri-mathgroup at

"Alan Mason" <swt at> 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.


-------------------- 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." ?