SWP-Ubau-SoSe2014-Haskell / SWPSoSe14

Rail compiler written in Haskell
MIT License
3 stars 1 forks source link

Math divison: order of arguments #174

Closed cpockrandt closed 10 years ago

cpockrandt commented 10 years ago

The following program outputs a "division by zero"-error instead of 0:

$
 \
  \--0-5-d-o-#

The order of the arguments is wrong in the compiler as well as in the test cases ;)

'd' Divide (a b -- c) b is the element on top of the stack
c = a/b
mkind commented 10 years ago

The problem might occure with sub, too. I'll fix that.

mkind commented 10 years ago

Though I need to fix the test cases, too. They assume a division by zero (e.g. neg_math_divide_by_zero_float.rail).