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