Average Error: 0.4 → 0.4
Time: 2.1s
Precision: binary64
\[\frac{x \cdot 100}{x + y}\]
\[\left(x \cdot \sqrt{100}\right) \cdot \frac{\sqrt{100}}{x + y}\]
\frac{x \cdot 100}{x + y}
\left(x \cdot \sqrt{100}\right) \cdot \frac{\sqrt{100}}{x + y}
double code(double x, double y) {
	return (((double) (x * 100.0)) / ((double) (x + y)));
}
double code(double x, double y) {
	return ((double) (((double) (x * ((double) sqrt(100.0)))) * (((double) sqrt(100.0)) / ((double) (x + y)))));
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.4
Target0.2
Herbie0.4
\[\frac{x}{1} \cdot \frac{100}{x + y}\]

Derivation

  1. Initial program 0.4

    \[\frac{x \cdot 100}{x + y}\]
  2. Simplified0.2

    \[\leadsto \color{blue}{x \cdot \frac{100}{x + y}}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity0.2

    \[\leadsto x \cdot \frac{100}{\color{blue}{1 \cdot \left(x + y\right)}}\]
  5. Applied add-sqr-sqrt0.2

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

    \[\leadsto x \cdot \color{blue}{\left(\frac{\sqrt{100}}{1} \cdot \frac{\sqrt{100}}{x + y}\right)}\]
  7. Applied associate-*r*0.4

    \[\leadsto \color{blue}{\left(x \cdot \frac{\sqrt{100}}{1}\right) \cdot \frac{\sqrt{100}}{x + y}}\]
  8. Simplified0.4

    \[\leadsto \color{blue}{\left(x \cdot \sqrt{100}\right)} \cdot \frac{\sqrt{100}}{x + y}\]
  9. Final simplification0.4

    \[\leadsto \left(x \cdot \sqrt{100}\right) \cdot \frac{\sqrt{100}}{x + y}\]

Reproduce

herbie shell --seed 2020199 
(FPCore (x y)
  :name "Development.Shake.Progress:message from shake-0.15.5"
  :precision binary64

  :herbie-target
  (* (/ x 1.0) (/ 100.0 (+ x y)))

  (/ (* x 100.0) (+ x y)))