From 5f59e0f1ca7dd40437499e2d35098aa9355ab0bf Mon Sep 17 00:00:00 2001 From: Sam Moore Date: Fri, 4 Jul 2014 21:20:33 +0800 Subject: [PATCH] More moronic bugs So that P/-Q simplifies to -P/Q, -P/-Q simplifies to P/Q, properly this time --- src/rational.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rational.h b/src/rational.h index 41cce09..9fe8f1f 100644 --- a/src/rational.h +++ b/src/rational.h @@ -71,7 +71,7 @@ struct Rational { if (Q < 0) { - P = (P < 0) ? -P : P; + P = -P; Q = -Q; } if (P == 0) -- 2.20.1