?

Average Error: 0 → 0
Time: 1.0s
Precision: binary64
Cost: 64

?

\[\left(1 + 2\right) + 3 \]
\[6 \]
(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

Error?

Try it out?

Your Program's Arguments

    Results

    Enter valid numbers for all inputs

    Derivation?

    1. Initial program 0

      \[\left(1 + 2\right) + 3 \]
    2. Simplified0

      \[\leadsto \color{blue}{6} \]
      Proof

      [Start]0

      \[ \left(1 + 2\right) + 3 \]

      metadata-eval [=>]0

      \[ \color{blue}{3} + 3 \]

      metadata-eval [=>]0

      \[ \color{blue}{6} \]
    3. Final simplification0

      \[\leadsto 6 \]

    Reproduce?

    herbie shell --seed 1 
    (FPCore ()
      :name "1+2+3"
      :precision binary64
      (+ (+ 1.0 2.0) 3.0))