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