MathGroup Archive 2006

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

Search the Archive

SetPrecision causes logical comparisons to fail in Mathematica 5.1 on Mac OS X?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63967] SetPrecision causes logical comparisons to fail in Mathematica 5.1 on Mac OS X?
  • From: "jjdmon" <jjdmon at pobox.com>
  • Date: Wed, 25 Jan 2006 08:45:55 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I am running Mathematica 5.1.1.0 on Mac OS 10.3.9 and have encountered
what seems like a bug using SetPrecision to limit the significant
places of real numbers.

If I do this:

In: x=SetPrecision[1.101,2]
Out: 1.1

I get this:

In: x==0.0
Out: True

In: x==1.0
Out: True

Is this expected behavior?


  • Prev by Date: image processing
  • Next by Date: Re: Assuming to be a real number is useless even in simple cases?
  • Previous by thread: Re: image processing
  • Next by thread: Re: SetPrecision causes logical comparisons to fail in Mathematica 5.1 on Mac OS X?