Name:

== equality test operator

Library name:

sollya_obj_t sollya_lib_cmp_equal(sollya_obj_t, sollya_obj_t)

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/4;
   false

Example 4:

   > prec = 12;
   The precision has been set to 12 bits.
   > verbosity = 1!;
   > 16384.1 == 16385.1;
   Warning: Rounding occurred when converting the constant "16384.1" to floating-point with 12 bits.
   If safe computation is needed, try to increase the precision.
   Warning: Rounding occurred when converting the constant "16385.1" to floating-point with 12 bits.
   If safe computation is needed, try to increase the precision.
   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