Average Error: 10.4 → 0.3
Time: 1.7s
Precision: 64
\[\frac{x}{y \cdot y}\]
\[\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{y}{x}} \cdot \frac{\sqrt[3]{1}}{y}\]
\frac{x}{y \cdot y}
\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{y}{x}} \cdot \frac{\sqrt[3]{1}}{y}
double code(double x, double y) {
	return (x / (y * y));
}
double code(double x, double y) {
	return (((cbrt(1.0) * cbrt(1.0)) / (y / x)) * (cbrt(1.0) / 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

Original10.4
Target0.2
Herbie0.3
\[\frac{\frac{x}{y}}{y}\]

Derivation

  1. Initial program 10.4

    \[\frac{x}{y \cdot y}\]
  2. Using strategy rm
  3. Applied associate-/r*0.2

    \[\leadsto \color{blue}{\frac{\frac{x}{y}}{y}}\]
  4. Using strategy rm
  5. Applied clear-num0.7

    \[\leadsto \color{blue}{\frac{1}{\frac{y}{\frac{x}{y}}}}\]
  6. Using strategy rm
  7. Applied associate-/r/0.7

    \[\leadsto \frac{1}{\color{blue}{\frac{y}{x} \cdot y}}\]
  8. Applied add-cube-cbrt0.7

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

    \[\leadsto \color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{y}{x}} \cdot \frac{\sqrt[3]{1}}{y}}\]
  10. Final simplification0.3

    \[\leadsto \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{\frac{y}{x}} \cdot \frac{\sqrt[3]{1}}{y}\]

Reproduce

herbie shell --seed 2020102 +o rules:numerics
(FPCore (x y)
  :name "Physics.ForceLayout:coulombForce from force-layout-0.4.0.2"
  :precision binary64

  :herbie-target
  (/ (/ x y) y)

  (/ x (* y y)))