MCPcopy Index your code
hub / github.com/RustPython/RustPython / dd_neg

Method dd_neg

crates/jit/src/instructions.rs:854–860  ·  view source on GitHub ↗

Computes the negation of a DDValue. It subtracts both the high and low parts from zero.

(&mut self, dd: DDValue)

Source from the content-addressed store, hash-verified

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,

Callers 1

dd_subMethod · 0.80

Calls 1

insMethod · 0.80

Tested by

no test coverage detected