Skip to content

Commit

Permalink
Doubledouble: disable FMADD
Browse files Browse the repository at this point in the history
  • Loading branch information
let-def committed Dec 16, 2021
1 parent 8afe943 commit 850caf2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doubledouble/doubledouble.ml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ let add {hi = h1; lo = l1} {hi = h2; lo = l2} =
let neg {hi; lo} = {hi = -.hi; lo = -.lo}
let sub t1 t2 = add t1 (neg t2)

(* Disable fused-multiply-add optimization
See https://github.com/ocaml/ocaml/issues/10323. *)
let ( *. ) x y = Sys.opaque_identity (x *. y)

let mul {hi = h1; lo = l1} {hi = h2; lo = l2} =
(*C = SPLIT * hi; hx = C-hi; c = SPLIT * y.hi;*)
let c' = k_split *. h1 in
Expand Down

0 comments on commit 850caf2

Please sign in to comment.