From 841b51de745008220a953669104b21898473d79b Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 19 Dec 2014 09:48:47 +1100 Subject: Bugfix for div --- src/Grasp/Interpreter.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grasp/Interpreter.hs b/src/Grasp/Interpreter.hs index 14de9bc..ca28578 100644 --- a/src/Grasp/Interpreter.hs +++ b/src/Grasp/Interpreter.hs @@ -367,7 +367,7 @@ divI = do (error "Instruction div should have numeric right arguments") let inputFunc = Maybe.fromJust . IN.toFloat . GN.toInst - result = (inputFunc (head leftNodes)) / (sum (map inputFunc rightNodes)) + result = (inputFunc (head leftNodes)) / (product (map inputFunc rightNodes)) mapM_ (GMonad.reLabel (IN.mk (show result))) outNodes GMonad.updateIP -- cgit