Computes the negation of a DDValue. It subtracts both the high and low parts from zero.
(&mut self, dd: DDValue)
| 852 | /// Computes the negation of a DDValue. |
| 853 | /// It subtracts both the high and low parts from zero. |
| 854 | fn dd_neg(&mut self, dd: DDValue) -> DDValue { |
| 855 | let zero = self.builder.ins().f64const(0.0); |
| 856 | DDValue { |
| 857 | hi: self.builder.ins().fsub(zero, dd.hi), |
| 858 | lo: self.builder.ins().fsub(zero, dd.lo), |
| 859 | } |
| 860 | } |
| 861 | |
| 862 | /// Adds two DDValue numbers using error-free transformations to maintain extra precision. |
| 863 | /// It carefully adds the high parts, computes the rounding error, adds the low parts along with the error, |