(FPCore () :precision binary64 (/ 5.0 2.0))
double code() { return 5.0 / 2.0; }
real(8) function code() code = 5.0d0 / 2.0d0 end function
public static double code() { return 5.0 / 2.0; }
def code(): return 5.0 / 2.0
function code() return Float64(5.0 / 2.0) end
function tmp = code() tmp = 5.0 / 2.0; end
code[] := N[(5.0 / 2.0), $MachinePrecision]
\begin{array}{l} \\ \frac{5}{2} \end{array}
Sampling outcomes in binary64 precision:
Herbie found 1 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore () :precision binary64 (/ 5.0 2.0))
double code() { return 5.0 / 2.0; }
real(8) function code() code = 5.0d0 / 2.0d0 end function
public static double code() { return 5.0 / 2.0; }
def code(): return 5.0 / 2.0
function code() return Float64(5.0 / 2.0) end
function tmp = code() tmp = 5.0 / 2.0; end
code[] := N[(5.0 / 2.0), $MachinePrecision]
\begin{array}{l} \\ \frac{5}{2} \end{array}
(FPCore () :precision binary64 2.5)
double code() { return 2.5; }
real(8) function code() code = 2.5d0 end function
public static double code() { return 2.5; }
def code(): return 2.5
function code() return 2.5 end
function tmp = code() tmp = 2.5; end
code[] := 2.5
\begin{array}{l} \\ 2.5 \end{array}
Initial program 100.0%
lift-/.f64
N/A
metadata-eval
100.0
Applied rewrites100.0%
herbie shell --seed 1
(FPCore ()
:name "5.0/2"
:precision binary64
(/ 5.0 2.0))