Documentation

Interval.Floating.Neg

Floating point negation #

Equations
@[simp]
theorem Floating.n_neg {x : Floating} :
(-x).n = -x.n
@[simp]
theorem Floating.s_neg {x : Floating} :
(-x).s = x.s
@[simp]

Negation propagates nan

@[simp]

Negation preserves nan

@[simp]
theorem Floating.neg_zero :
-0 = 0

-0 = 0

@[simp]
theorem Floating.neg_eq_zero_iff {x : Floating} :
-x = 0 x = 0

Negation preserves 0

@[simp]
theorem Floating.val_neg {x : Floating} (n : x nan) :
(-x).val = -x.val

Negation flips .val, except at nan

@[simp]
theorem Floating.approx_neg {x : Floating} {a : } :
approx (-x) a = approx x (-a)

Negation negates approx