Add support for the float_integer_part/1 and float_fractional_part/1 standard arithmetic functions

This commit is contained in:
Paulo Moura
2021-09-27 12:27:09 +01:00
parent ca62e54652
commit 495025dafb
4 changed files with 20 additions and 0 deletions

View File

@@ -165,6 +165,8 @@ impl<'a> ArithmeticEvaluator<'a> {
"round" => Ok(ArithmeticInstruction::Round(a1, t)),
"ceiling" => Ok(ArithmeticInstruction::Ceiling(a1, t)),
"floor" => Ok(ArithmeticInstruction::Floor(a1, t)),
"float_integer_part" => Ok(ArithmeticInstruction::FloatIntegerPart(a1, t)),
"float_fractional_part" => Ok(ArithmeticInstruction::FloatFractionalPart(a1, t)),
"sign" => Ok(ArithmeticInstruction::Sign(a1, t)),
"\\" => Ok(ArithmeticInstruction::BitwiseComplement(a1, t)),
_ => Err(ArithmeticError::NonEvaluableFunctor(