?

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

?

\[\left(0.1 + 0.2\right) + 0.3 \]
\[0.6 \]
(FPCore () :precision binary64 (+ (+ 0.1 0.2) 0.3))
(FPCore () :precision binary64 0.6)
double code() {
	return (0.1 + 0.2) + 0.3;
}
double code() {
	return 0.6;
}
real(8) function code()
    code = (0.1d0 + 0.2d0) + 0.3d0
end function
real(8) function code()
    code = 0.6d0
end function
public static double code() {
	return (0.1 + 0.2) + 0.3;
}
public static double code() {
	return 0.6;
}
def code():
	return (0.1 + 0.2) + 0.3
def code():
	return 0.6
function code()
	return Float64(Float64(0.1 + 0.2) + 0.3)
end
function code()
	return 0.6
end
function tmp = code()
	tmp = (0.1 + 0.2) + 0.3;
end
function tmp = code()
	tmp = 0.6;
end
code[] := N[(N[(0.1 + 0.2), $MachinePrecision] + 0.3), $MachinePrecision]
code[] := 0.6
\left(0.1 + 0.2\right) + 0.3
0.6

Error?

Try it out?

Your Program's Arguments

    Results

    Enter valid numbers for all inputs

    Derivation?

    1. Initial program 1.0

      \[\left(0.1 + 0.2\right) + 0.3 \]
    2. Simplified0

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

      [Start]1.0

      \[ \left(0.1 + 0.2\right) + 0.3 \]

      metadata-eval [=>]1.0

      \[ \color{blue}{0.30000000000000004} + 0.3 \]

      metadata-eval [=>]0

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

      \[\leadsto 0.6 \]

    Reproduce?

    herbie shell --seed 1 
    (FPCore ()
      :name "0.1+0.2+0.3"
      :precision binary64
      (+ (+ 0.1 0.2) 0.3))