MathGroup Archive 2010

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

Search the Archive

Re: Equals, Less, Greater, etc; Confused by this simple output.


On May 19, 4:03 am, telefunkenvf14 <rgo... at gmail.com> wrote:
> Can someone offer an explanation for the following output?---I'm
> trying to understand why it makes sense for Mathematica to be set up
> to respond like this. (Of course, feel free to point out any glaringly
> obvious math examples.)
>
> In[1]:= {a == a, a <= a, a >= a, a < a, a > a}
>
> Out[1]= {True, a <= a, a >= a, a < a, a > a}
>
> I would have thought that a <= a and a >= a would both evaluate to
> True, given that a == a does. Also, can something really be greater
> than itself? Hmmm... maybe there's hope for me after all. :)
>
> -RG

Equal will return true if the sides are identical (and not
Indeterminate or Overflow).

GreaterEqual, Greater, LessEqual, Less will only return true/false if
its arguments are reals.

To produce the desired result:
Block[{a}, FullSimplify[{a == a, a <= a, a >= a, a < a, a > a}]]


  • Prev by Date: Re: Numerical solution of differential equation with boundary values
  • Next by Date: Re: an attempt at solid modeling with Mathematica
  • Previous by thread: Re: Equals, Less, Greater, etc; Confused by this simple output.
  • Next by thread: Re: Equals, Less, Greater, etc; Confused by this simple output.