Name:

== equality test operator

Usage:

expr1 == expr2 : (any type, any type) -> boolean

Parameters:

Description:

Example 1:

   > "Hello" == "Hello";
   true
   > "Hello" == "Salut";
   false
   > "Hello" == 5;
   false
   > 5 + x == 5 + x;
   true

Example 2:

   > 1 == exp(0);
   true
   > asin(1) * 2 == pi;
   true
   > exp(5) == log(4);
   false

Example 3:

   > sin(pi/6) == 1/2 * sqrt(3);
   false

Example 4:

   > prec = 12;
   The precision has been set to 12 bits.
   > 16384.1 == 16385.1;
   true

Example 5:

   > error == error;
   false

Example 6:

   > a = "Biba";
   > b = NaN;
   > a == a;
   true
   > b == b;
   false
See also: !=, >, >=, <=, <, in, !, &&, ||, error, prec
Go back to the list of commands