Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions omnn/math/Fraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,16 @@ using namespace omnn::math;
auto bothAreRational = (IsRational() && fraction.IsRational()) == YesNoMaybe::Yes;
if (bothAreRational) {
equal = operator a_rational() == static_cast<a_rational>(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;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion omnn/math/test/ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down