diff --git a/omnn/math/Fraction.cpp b/omnn/math/Fraction.cpp index eb96d72cb..2443e170e 100644 --- a/omnn/math/Fraction.cpp +++ b/omnn/math/Fraction.cpp @@ -78,9 +78,16 @@ using namespace omnn::math; auto bothAreRational = (IsRational() && fraction.IsRational()) == YesNoMaybe::Yes; if (bothAreRational) { equal = operator a_rational() == static_cast(fraction); - } else { // TODO: FIXME: both irrationals hangs on macos - //OptimizeOn on; - //equal = numerator() * fraction.denominator() == fraction.numerator() * denominator(); + } else { + if (optimized1) { + equal = operator==(fraction.Optimized(fraction.GetView())); + } else if (optimized2) { + equal = Optimized(GetView()) == fraction; + } else { + auto _1 = Optimized(GetView()); + auto _2 = fraction.Optimized(fraction.GetView()); + equal = _1 == _2; + } } } } diff --git a/omnn/math/test/ts.cpp b/omnn/math/test/ts.cpp index 7cd472e8e..7cda19300 100644 --- a/omnn/math/test/ts.cpp +++ b/omnn/math/test/ts.cpp @@ -22,7 +22,7 @@ T bits_in_use(T v){ /// Control theory generalization hints are here: finds best moves/goods for single dimension BOOST_AUTO_TEST_CASE(TS_1d) { std::cout << "TS_1d test case - Start" << std::endl; - // System s; + //System s; // s.MakeTotalEqu(true); // y=f(x), where x is code of sequence DECL_VARS(time, price);