Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: equaltity of lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19092] Re: [mg19036] equaltity of lists
  • From: Maarten.vanderBurgt at icos.be
  • Date: Thu, 5 Aug 1999 01:35:11 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Drago,

You should use

{a, b} === {b, a}

when you want False as a result.

The following I copied from the Mathematica help files. This explains the
difference between '===' and '=='.

SameQ
-----
lhs === rhs yields True if the expression lhs is identical to rhs, and
yields False otherwise.

SameQ requires exact correspondence between expressions, except that it
considers Real numbers equal if their difference is less than the
uncertainty of either of them.

2 === 2. gives False.

e1 === e2 === e3 gives True if all the ei are identical.


Equal
-----
lhs == rhs returns True if lhs and rhs are identical.

lhs == rhs is used to represent a symbolic equation, to be manipulated
using functions like Solve.

lhs == rhs returns True if lhs and rhs are identical expressions.

lhs == rhs returns False if lhs and rhs are determined to be unequal by
comparisons between numbers or other raw data, such as strings.

Approximate numbers are considered equal if they differ in at most their
last eight binary digits (roughly their last two decimal digits).

2 == 2. gives True.

e1 == e2 == e3 gives True if all the ei are equal.




Maarten






"Drago Ganic" <drago.ganic at in2.hr> on 03-08-99 07:45:05 PM


Subject: [mg19092]  [mg19036] equaltity of lists




Hi !!

Why don't I get an answer (False) when I ask Mathematica

    {a,b}=={b,a}

like the one I get with

    {1,2}=={2,1}
    False

Greetings from Croatia,
Drago Ganic









  • Prev by Date: Re: equaltity of lists
  • Next by Date: HELP: Mathlink and InterpolatingFunction
  • Previous by thread: Re: equaltity of lists
  • Next by thread: Re: Re: equaltity of lists