Fix BiRem for floats

Signed-off-by: Mateusz Mikuła <mati865@gmail.com>
This commit is contained in:
Mateusz Mikuła 2018-03-16 10:47:28 +01:00
parent 23bfa396a0
commit 4c94dd238f

View file

@ -377,7 +377,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
BiSub => Some(Constant::F32(l - r)),
BiMul => Some(Constant::F32(l * r)),
BiDiv => Some(Constant::F32(l / r)),
BiRem => Some(Constant::F32(l * r)),
BiRem => Some(Constant::F32(l % r)),
BiEq => Some(Constant::Bool(l == r)),
BiNe => Some(Constant::Bool(l != r)),
BiLt => Some(Constant::Bool(l < r)),
@ -391,7 +391,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
BiSub => Some(Constant::F64(l - r)),
BiMul => Some(Constant::F64(l * r)),
BiDiv => Some(Constant::F64(l / r)),
BiRem => Some(Constant::F64(l * r)),
BiRem => Some(Constant::F64(l % r)),
BiEq => Some(Constant::Bool(l == r)),
BiNe => Some(Constant::Bool(l != r)),
BiLt => Some(Constant::Bool(l < r)),