From 8b0de52ffa302298abe8d0d6e3b6ed339a2354ba Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Fri, 12 Jul 2019 11:42:25 +0200 Subject: Add floating-point square root and fused multiply-add We just lift the corresponding functions from Flocq and add the computation of NaN payloads. NaN payloads for FMA are described in the ARM and RISC-V specifications, and were determined experimentally for x86 and for Power. --- x86_64/Archi.v | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'x86_64') diff --git a/x86_64/Archi.v b/x86_64/Archi.v index 8523fdce..959d8dc1 100644 --- a/x86_64/Archi.v +++ b/x86_64/Archi.v @@ -53,9 +53,14 @@ Lemma choose_nan_32_idem: forall n, choose_nan_32 (n :: n :: nil) = choose_nan_32 (n :: nil). Proof. auto. Qed. +Definition fma_order {A: Type} (x y z: A) := (x, y, z). + +Definition fma_invalid_mul_is_nan := false. + Definition float_of_single_preserves_sNaN := false. Global Opaque ptr64 big_endian splitlong default_nan_64 choose_nan_64 default_nan_32 choose_nan_32 + fma_order fma_invalid_mul_is_nan float_of_single_preserves_sNaN. -- cgit