1 module AdditionSqrtSingle
5 use ufloat.USingleLemmas
6 use ieee_float.RoundingMode
9 val function usqrt (x:usingle) : usingle
11 let add_sqrt (a b : usingle)
13 let exact = (to_real a +. to_real (usqrt b)) in
14 abs (to_real result -. exact) <=. eps *. abs exact
19 module AdditionSqrtDouble
23 use ufloat.UDoubleLemmas
24 use ieee_float.RoundingMode
27 val function usqrt (x:udouble) : udouble
29 let add_sqrt (a b : udouble)
31 let exact = (to_real a +. to_real (usqrt b)) in
32 abs (to_real result -. exact) <=. eps *. abs exact