Add epsilon/0 arithmetic constant

This commit is contained in:
Paulo Moura
2021-05-08 21:23:54 +01:00
parent 56eaf883dc
commit 3f4bbe9b9e
2 changed files with 9 additions and 0 deletions

View File

@@ -227,6 +227,9 @@ impl MachineState {
&HeapCellValue::Atom(ref name, _) if name.as_str() == "e" => {
interms.push(Number::Float(OrderedFloat(f64::consts::E)))
}
&HeapCellValue::Atom(ref name, _) if name.as_str() == "epsilon" => {
interms.push(Number::Float(OrderedFloat(f64::EPSILON)))
}
&HeapCellValue::NamedStr(arity, ref name, _) => {
let evaluable_stub = MachineError::functor_stub(name.clone(), arity);