product_less_op Struct Reference

List of all members.

Static Public Member Functions


Detailed Description

Definition at line 345 of file syntactic.cpp.


Member Function Documentation

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

Definition at line 347 of file syntactic.cpp.

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

00347                                                 {
00348     generic g1= as_generic (s1);
00349     generic g2= as_generic (s2);
00350     if (is_func (g1, GEN_OVER, 2) && exact_eq (g1[1], 1)) g1= g1[2];
00351     if (is_func (g2, GEN_OVER, 2) && exact_eq (g2[1], 1)) g2= g2[2];
00352     if (is_func (g1, GEN_POWER, 2) &&
00353         is<literal> (g1[2]) && is_numeric (as_string (as<literal> (g1[2]))))
00354       g1= g1[1];
00355     if (is_func (g2, GEN_POWER, 2) &&
00356         is<literal> (g2[2]) && is_numeric (as_string (as<literal> (g2[2]))))
00357       g2= g2[1];
00358     //return small_big_compare (g1, g2) <= 0;
00359     return big_small_compare (g1, g2) <= 0;
00360   }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1