rational: don't try to reduce when denom == 1

Fixes #1895 (and probably several other issues when using -O2 on ARM64 systems)
This commit is contained in:
itsmattkc
2022-04-17 23:35:45 -07:00
parent d65da69c7d
commit ad61954aa2
+1 -1
View File
@@ -72,7 +72,7 @@ void rational::fix_signs()
void rational::reduce()
{
if (!isNull()) {
if (!isNull() && denom_ != 1) {
// Euclidean often fails if numbers are negative, we abs it and re-neg it later if necessary
bool neg = numer_ < 0;