Average Error: 0.0 → 0.0
Time: 1.7s
Precision: binary64
\[\frac{x + y}{10}\]
\[\frac{x}{10} + \frac{y}{10}\]
\frac{x + y}{10}
\frac{x}{10} + \frac{y}{10}
(FPCore (x y) :precision binary64 (/ (+ x y) 10.0))
(FPCore (x y) :precision binary64 (+ (/ x 10.0) (/ y 10.0)))
double code(double x, double y) {
	return (x + y) / 10.0;
}
double code(double x, double y) {
	return (x / 10.0) + (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

Derivation

  1. Initial program 0.0

    \[\frac{x + y}{10}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt_binary641.1

    \[\leadsto \frac{x + y}{\color{blue}{\sqrt{10} \cdot \sqrt{10}}}\]
  4. Applied *-un-lft-identity_binary641.1

    \[\leadsto \frac{\color{blue}{1 \cdot \left(x + y\right)}}{\sqrt{10} \cdot \sqrt{10}}\]
  5. Applied times-frac_binary640.3

    \[\leadsto \color{blue}{\frac{1}{\sqrt{10}} \cdot \frac{x + y}{\sqrt{10}}}\]
  6. Simplified0.3

    \[\leadsto \frac{1}{\sqrt{10}} \cdot \color{blue}{\frac{y + x}{\sqrt{10}}}\]
  7. Taylor expanded around 0 1.1

    \[\leadsto \color{blue}{\frac{y}{{\left(\sqrt{10}\right)}^{2}} + \frac{x}{{\left(\sqrt{10}\right)}^{2}}}\]
  8. Simplified0.0

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

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

Reproduce

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