summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2014-12-19 09:48:47 +1100
committerJed Barber <jjbarber@y7mail.com>2014-12-19 09:48:47 +1100
commit841b51de745008220a953669104b21898473d79b (patch)
tree20e61e79e9f3a87e0029b37024b31898f2196c52 /src
parenta206e36b57c18cc44f94178e88ec2565a346e950 (diff)
Bugfix for div
Diffstat (limited to 'src')
-rw-r--r--src/Grasp/Interpreter.hs2
1 files changed, 1 insertions, 1 deletions
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