123456789101112131415161718192021222324252627282930313233343536# 1 "kernel/float64_63.ml"(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)includeFloat64_commonletmul(x:float)(y:float):float=x*.y[@@ocaml.inlinealways]letadd(x:float)(y:float):float=x+.y[@@ocaml.inlinealways]letsub(x:float)(y:float):float=x-.y[@@ocaml.inlinealways]letdiv(x:float)(y:float):float=x/.y[@@ocaml.inlinealways]letsqrt(x:float):float=sqrtx[@@ocaml.inlinealways](*** Test at runtime that no harmful double rounding seems to
be performed with an intermediate 80 bits representation (x87). *)let()=letb=ldexp1.53inlets=add1.(ldexp1.(-52))inifaddbs<=b||addb1.<>b||ldexp1.(-1074)<=0.thenfailwith"Detected non IEEE-754 compliant architecture (or wrong \
rounding mode). Use of Float is thus unsafe."