feat(const_eval): impl. sqrt

This commit is contained in:
Erich Gubler committed 2024-01-18 16:57:46 -05:00
1 parent 133b573133
commit f2dbdfcdc6
2 files changed
+4

No files matched your search

+1
View File
@@ -48,6 +48,7 @@ Bottom level categories:
- `saturate`
- `sin`
- `sinh`
- `sqrt`
## v0.19.0 (2024-01-17)
+3
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"
))),