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:
@@ -72,7 +72,7 @@ void rational::fix_signs()
|
|||||||
|
|
||||||
void rational::reduce()
|
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
|
// Euclidean often fails if numbers are negative, we abs it and re-neg it later if necessary
|
||||||
bool neg = numer_ < 0;
|
bool neg = numer_ < 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user