Expand description
Types that support multiplicative inverses.
§Examples
use fp_library::classes::DivisionRing;
assert_eq!(f64::reciprocate(2.0), 0.5);Traits§
- Division
Ring - A type class for
Ringtypes that support multiplicative inverses.
Functions§
- divide_
left - Divides from the left:
multiply(reciprocate(b), a). - divide_
right - Divides from the right:
multiply(a, reciprocate(b)). - reciprocate
- Computes the multiplicative inverse.