itt-ustutt / num-dual

Generalized (hyper-) dual numbers in rust
Apache License 2.0
60 stars 7 forks source link

Add function to check if all non-real parts are zero. #43

Closed g-bauer closed 2 years ago

prehner commented 2 years ago

This does not consider whether the dual parts of self.re are 0 for recursive dual numbers. It could call itself on self.re but that requires an additional trait (because of the implementation for f64)