Average Error: 0.0 → 0.0
Time: 3.1s
Precision: binary64
Cost: 320
\[\frac{x + y}{10}\]
\[\frac{x + y}{10}\]
\frac{x + y}{10}
\frac{x + y}{10}
(FPCore (x y) :precision binary64 (/ (+ x y) 10.0))
(FPCore (x y) :precision binary64 (/ (+ x y) 10.0))
double code(double x, double y) {
	return (x + y) / 10.0;
}
double code(double x, double y) {
	return (x + y) / 10.0;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error0.3
Cost320
\[\left(x + y\right) \cdot 0.1\]
Alternative 2
Error16.1
Cost520
\[\begin{array}{l} \mathbf{if}\;x \leq -2.832582031905886 \cdot 10^{-73} \lor \neg \left(x \leq 1.1490431571676757 \cdot 10^{+32}\right):\\ \;\;\;\;x \cdot 0.1\\ \mathbf{else}:\\ \;\;\;\;y \cdot 0.1\\ \end{array}\]
Alternative 3
Error32.2
Cost192
\[x \cdot 0.1\]
Alternative 4
Error61.9
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.0

    \[\frac{x + y}{10}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\frac{x + y}{10}}\]
  3. Final simplification0.0

    \[\leadsto \frac{x + y}{10}\]

Reproduce

herbie shell --seed 2021044 
(FPCore (x y)
  :name "Text.Parsec.Token:makeTokenParser from parsec-3.1.9, A"
  :precision binary64
  (/ (+ x y) 10.0))