basix_doc 0.1
product_less_op Struct Reference

List of all members.

Static Public Member Functions


Detailed Description

Definition at line 344 of file syntactic.cpp.


Member Function Documentation

static bool op ( const syntactic s1,
const syntactic s2 
) [inline, static]

Definition at line 346 of file syntactic.cpp.

References mmx::as_generic(), mmx::as_string(), mmx::exact_eq(), mmx::GEN_OVER, mmx::GEN_POWER, mmx::is_func(), mmx::is_numeric(), and mmx::small_big_compare().

                                                {
    generic g1= as_generic (s1);
    generic g2= as_generic (s2);
    if (is_func (g1, GEN_OVER, 2) && exact_eq (g1[1], 1)) g1= g1[2];
    if (is_func (g2, GEN_OVER, 2) && exact_eq (g2[1], 1)) g2= g2[2];
    if (is_func (g1, GEN_POWER, 2) &&
        is<literal> (g1[2]) && is_numeric (as_string (as<literal> (g1[2]))))
      g1= g1[1];
    if (is_func (g2, GEN_POWER, 2) &&
        is<literal> (g2[2]) && is_numeric (as_string (as<literal> (g2[2]))))
      g2= g2[1];
    return small_big_compare (g1, g2) <= 0;
  }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines