Average Error: 0.2 → 0.3
Time: 7.3s
Precision: binary64
\[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}\]
\[\left(1 - \frac{1}{x \cdot 9}\right) - 0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\]
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\left(1 - \frac{1}{x \cdot 9}\right) - 0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
(FPCore (x y)
 :precision binary64
 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
(FPCore (x y)
 :precision binary64
 (- (- 1.0 (/ 1.0 (* x 9.0))) (* 0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
	return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
double code(double x, double y) {
	return (1.0 - (1.0 / (x * 9.0))) - (0.3333333333333333 * (y / sqrt(x)));
}

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.2
Target0.2
Herbie0.3
\[\left(1 - \frac{\frac{1}{x}}{9}\right) - \frac{y}{3 \cdot \sqrt{x}}\]

Derivation

  1. Initial program 0.2

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity_binary64_116720.2

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

    \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{3} \cdot \frac{y}{\sqrt{x}}}\]
  5. Final simplification0.3

    \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - 0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\]

Reproduce

herbie shell --seed 2021093 
(FPCore (x y)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
  :precision binary64

  :herbie-target
  (- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))

  (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))