add sign/1 (#216) and gcd/2 (#217) as evaluable functors, update the README

This commit is contained in:
Mark Thom
2019-10-27 13:05:05 -06:00
parent 0fdf0d8d06
commit e656e7fbae
5 changed files with 59 additions and 2 deletions

View File

@@ -352,6 +352,9 @@ impl fmt::Display for ArithmeticInstruction {
&ArithmeticInstruction::RDiv(ref a1, ref a2, ref t) => {
write!(f, "rdiv {}, {}, @{}", a1, a2, t)
}
&ArithmeticInstruction::Gcd(ref a1, ref a2, ref t) => {
write!(f, "gcd {}, {}, @{}", a1, a2, t)
}
&ArithmeticInstruction::Shl(ref a1, ref a2, ref t) => {
write!(f, "shl {}, {}, @{}", a1, a2, t)
}
@@ -377,6 +380,7 @@ impl fmt::Display for ArithmeticInstruction {
write!(f, "atan2 {}, {}, @{}", a1, a2, t)
}
&ArithmeticInstruction::Plus(ref a, ref t) => write!(f, "plus {}, @{}", a, t),
&ArithmeticInstruction::Sign(ref a, ref t) => write!(f, "sign {}, @{}", a, t),
&ArithmeticInstruction::Neg(ref a, ref t) => write!(f, "neg {}, @{}", a, t),
&ArithmeticInstruction::Cos(ref a, ref t) => write!(f, "cos {}, @{}", a, t),
&ArithmeticInstruction::Sin(ref a, ref t) => write!(f, "sin {}, @{}", a, t),