static double lcm( double x, double y ){ if( isNan( x ) ) return x; if( isNan( y ) ) return y; x = toInt( x ); y = toInt( y ); double g = gcd( x, y ); if( g == 0 ){ return 0; } return x * y / g; }