(FPCore () :precision binary64 (+ (+ 1.0 2.0) 3.0))
(FPCore () :precision binary64 6.0)
double code() { return (1.0 + 2.0) + 3.0; }
double code() { return 6.0; }
real(8) function code() code = (1.0d0 + 2.0d0) + 3.0d0 end function
real(8) function code() code = 6.0d0 end function
public static double code() { return (1.0 + 2.0) + 3.0; }
public static double code() { return 6.0; }
def code(): return (1.0 + 2.0) + 3.0
def code(): return 6.0
function code() return Float64(Float64(1.0 + 2.0) + 3.0) end
function code() return 6.0 end
function tmp = code() tmp = (1.0 + 2.0) + 3.0; end
function tmp = code() tmp = 6.0; end
code[] := N[(N[(1.0 + 2.0), $MachinePrecision] + 3.0), $MachinePrecision]
code[] := 6.0
\left(1 + 2\right) + 3
6
Results
Initial program 0
Simplified0
[Start]0 | \[ \left(1 + 2\right) + 3
\] |
---|---|
metadata-eval [=>]0 | \[ \color{blue}{3} + 3
\] |
metadata-eval [=>]0 | \[ \color{blue}{6}
\] |
Final simplification0
herbie shell --seed 1
(FPCore ()
:name "1+2+3"
:precision binary64
(+ (+ 1.0 2.0) 3.0))