remove non-conforming hyperbolic and log10 evaluable functors
This commit is contained in:
@@ -1053,55 +1053,6 @@ pub(crate) fn atan(n1: Number) -> Result<f64, MachineStubGen> {
|
||||
unary_float_fn_template(n1, |f| f.atan())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn asinh(n1: Number) -> Result<f64, MachineStubGen> {
|
||||
unary_float_fn_template(n1, |f| f.asinh())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn acosh(n1: Number) -> Result<f64, MachineStubGen> {
|
||||
unary_float_fn_template(n1, |f| f.acosh())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn atanh(n1: Number) -> Result<f64, MachineStubGen> {
|
||||
let stub_gen = || {
|
||||
let is_atom = atom!("is");
|
||||
functor_stub(is_atom, 2)
|
||||
};
|
||||
|
||||
let f1 = try_numeric_result!(result_f(&n1), stub_gen)?;
|
||||
|
||||
try_numeric_result!(
|
||||
if f1 == 1.0 || f1 == -1.0 {
|
||||
Err(EvalError::Undefined)
|
||||
} else {
|
||||
result_f(&Number::Float(OrderedFloat(f1.atanh())))
|
||||
},
|
||||
stub_gen
|
||||
)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn sinh(n1: Number) -> Result<f64, MachineStubGen> {
|
||||
unary_float_fn_template(n1, |f| f.sinh())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn cosh(n1: Number) -> Result<f64, MachineStubGen> {
|
||||
unary_float_fn_template(n1, |f| f.cosh())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn tanh(n1: Number) -> Result<f64, MachineStubGen> {
|
||||
unary_float_fn_template(n1, |f| f.tanh())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn log10(n1: Number) -> Result<f64, MachineStubGen> {
|
||||
unary_float_fn_template(n1, |f| f.log(10f64))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn float_fractional_part(n1: Number) -> Result<f64, MachineStubGen> {
|
||||
unary_float_fn_template(n1, |f| f.fract())
|
||||
@@ -1366,27 +1317,6 @@ impl MachineState {
|
||||
atom!("tan") => self.interms.push(Number::Float(OrderedFloat(
|
||||
drop_iter_on_err!(self, iter, tan(a1))
|
||||
))),
|
||||
atom!("cosh") => self.interms.push(Number::Float(OrderedFloat(
|
||||
drop_iter_on_err!(self, iter, cosh(a1))
|
||||
))),
|
||||
atom!("sinh") => self.interms.push(Number::Float(OrderedFloat(
|
||||
drop_iter_on_err!(self, iter, sinh(a1))
|
||||
))),
|
||||
atom!("tanh") => self.interms.push(Number::Float(OrderedFloat(
|
||||
drop_iter_on_err!(self, iter, tanh(a1))
|
||||
))),
|
||||
atom!("acosh") => self.interms.push(Number::Float(OrderedFloat(
|
||||
drop_iter_on_err!(self, iter, acosh(a1))
|
||||
))),
|
||||
atom!("asinh") => self.interms.push(Number::Float(OrderedFloat(
|
||||
drop_iter_on_err!(self, iter, asinh(a1))
|
||||
))),
|
||||
atom!("atanh") => self.interms.push(Number::Float(OrderedFloat(
|
||||
drop_iter_on_err!(self, iter, atanh(a1))
|
||||
))),
|
||||
atom!("log10") => self.interms.push(Number::Float(OrderedFloat(
|
||||
drop_iter_on_err!(self, iter, log10(a1))
|
||||
))),
|
||||
atom!("float_fractional_part") => self.interms.push(Number::Float(OrderedFloat(
|
||||
drop_iter_on_err!(self, iter, float_fractional_part(a1))
|
||||
))),
|
||||
|
||||
Reference in New Issue
Block a user