[gcalctool] Perform power and factorials before negation so -1! and -1^0.5 are valid as in 5.26.x (Robert Ancell



commit 345709618f9e3988e09474139001eeb7382a8bdd
Author: Robert Ancell <robert ancell gmail com>
Date:   Fri Jul 17 17:16:41 2009 +1000

    Perform power and factorials before negation so -1! and -1^0.5 are valid as in 5.26.x (Robert Ancell)

 ChangeLog                |    5 +++++
 src/mp-equation-parser.y |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index af10b20..2805dd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,11 @@
 gcalctool change history.
 =========================
 
+2009-07-17 Robert Ancell <robert ancell gmail com>
+
+    * Perform power and factorials before negation so -1! and -1^0.5
+      are valid as in 5.26.x (Robert Ancell)
+
 2009-07-15 Robert Ancell <robert ancell gmail com>
 
     * Compile with -DGSEAL_ENABLE (Thomas Anderson, Bug #588591)
diff --git a/src/mp-equation-parser.y b/src/mp-equation-parser.y
index d92af90..94864e8 100644
--- a/src/mp-equation-parser.y
+++ b/src/mp-equation-parser.y
@@ -112,11 +112,11 @@ static void do_mod(yyscan_t yyscanner, const MPNumber *x, const MPNumber *y, MPN
 %left tNOT
 %left tROOT tROOT3 tROOT4
 %left <name> tVARIABLE tFUNCTION
-%right '^' tINVERSE '!'
 %right <integer> tSUBNUM tSUPNUM
 %left BOOLEAN_OPERATOR
 %left PERCENTAGE
 %left UNARY_MINUS
+%right '^' tINVERSE '!'
 
 %type <int_t> exp function
 %start statement



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]