feat(const_eval): impl. sqrt

This commit is contained in:
Erich Gubler 2023-12-14 10:41:44 -05:00
parent 133b573133
commit f2dbdfcdc6
2 changed files with 4 additions and 0 deletions

View File

@ -48,6 +48,7 @@ Bottom level categories:
- `saturate`
- `sin`
- `sinh`
- `sqrt`
## v0.19.0 (2024-01-17)

View File

@ -856,6 +856,9 @@ impl<'a> ConstantEvaluator<'a> {
crate::MathFunction::Sinh => {
component_wise_float!(self, span, [arg], |e| { Ok([e.sinh()]) })
}
crate::MathFunction::Sqrt => {
component_wise_float!(self, span, [arg], |e| { Ok([e.sqrt()]) })
}
fun => Err(ConstantEvaluatorError::NotImplemented(format!(
"{fun:?} built-in function"
))),