?

Average Error: 0.4 → 0.4
Time: 14.3s
Precision: binary64
Cost: 7232

?

\[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
\[\sqrt{x \cdot 9} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) + -1\right) \]
(FPCore (x y)
 :precision binary64
 (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))
(FPCore (x y)
 :precision binary64
 (* (sqrt (* x 9.0)) (+ (+ y (/ 1.0 (* x 9.0))) -1.0)))
double code(double x, double y) {
	return (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
double code(double x, double y) {
	return sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (3.0d0 * sqrt(x)) * ((y + (1.0d0 / (x * 9.0d0))) - 1.0d0)
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = sqrt((x * 9.0d0)) * ((y + (1.0d0 / (x * 9.0d0))) + (-1.0d0))
end function
public static double code(double x, double y) {
	return (3.0 * Math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
public static double code(double x, double y) {
	return Math.sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0);
}
def code(x, y):
	return (3.0 * math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0)
def code(x, y):
	return math.sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0)
function code(x, y)
	return Float64(Float64(3.0 * sqrt(x)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) - 1.0))
end
function code(x, y)
	return Float64(sqrt(Float64(x * 9.0)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) + -1.0))
end
function tmp = code(x, y)
	tmp = (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
end
function tmp = code(x, y)
	tmp = sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0);
end
code[x_, y_] := N[(N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\sqrt{x \cdot 9} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) + -1\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.4
Target0.4
Herbie0.4
\[3 \cdot \left(y \cdot \sqrt{x} + \left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right) \]

Derivation?

  1. Initial program 0.4

    \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
  2. Applied egg-rr0.4

    \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{0.5}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
  3. Simplified0.4

    \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    Proof

    [Start]0.4

    \[ {\left(x \cdot 9\right)}^{0.5} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]

    unpow1/2 [=>]0.4

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

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

Alternatives

Alternative 1
Error9.5
Cost7508
\[\begin{array}{l} t_0 := \sqrt{x \cdot 9}\\ t_1 := t_0 \cdot y\\ \mathbf{if}\;x \leq 1.06 \cdot 10^{-69}:\\ \;\;\;\;\frac{1}{t_0}\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{-33}:\\ \;\;\;\;\sqrt{0.1111111111111111 \cdot \frac{1}{x}}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 7200:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + -1\right)\right)\\ \end{array} \]
Alternative 2
Error9.5
Cost7508
\[\begin{array}{l} t_0 := \sqrt{x \cdot 9}\\ t_1 := t_0 \cdot y\\ \mathbf{if}\;x \leq 2.9 \cdot 10^{-67}:\\ \;\;\;\;\frac{1}{t_0}\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{-29}:\\ \;\;\;\;\sqrt{0.1111111111111111 \cdot \frac{1}{x}}\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6000:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(y + -1\right)\\ \end{array} \]
Alternative 3
Error9.6
Cost7508
\[\begin{array}{l} t_0 := \sqrt{x \cdot 9}\\ \mathbf{if}\;x \leq 1.1 \cdot 10^{-69}:\\ \;\;\;\;\frac{1}{t_0}\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-55}:\\ \;\;\;\;\frac{3 \cdot \sqrt{x}}{\frac{1}{y}}\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-33}:\\ \;\;\;\;\sqrt{0.1111111111111111 \cdot \frac{1}{x}}\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{-8}:\\ \;\;\;\;t_0 \cdot y\\ \mathbf{elif}\;x \leq 76000:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(y + -1\right)\\ \end{array} \]
Alternative 4
Error22.0
Cost7248
\[\begin{array}{l} t_0 := 3 \cdot \left(y \cdot \sqrt{x}\right)\\ \mathbf{if}\;x \leq 4.1 \cdot 10^{-72}:\\ \;\;\;\;3 \cdot \sqrt{\frac{0.012345679012345678}{x}}\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{-55}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{-30}:\\ \;\;\;\;\sqrt{0.1111111111111111 \cdot \frac{1}{x}}\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+77}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \]
Alternative 5
Error22.0
Cost7248
\[\begin{array}{l} t_0 := \sqrt{x \cdot 9} \cdot y\\ \mathbf{if}\;x \leq 2.2 \cdot 10^{-67}:\\ \;\;\;\;3 \cdot \sqrt{\frac{0.012345679012345678}{x}}\\ \mathbf{elif}\;x \leq 2.1 \cdot 10^{-55}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.95 \cdot 10^{-31}:\\ \;\;\;\;\sqrt{0.1111111111111111 \cdot \frac{1}{x}}\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{+79}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \]
Alternative 6
Error22.0
Cost7248
\[\begin{array}{l} t_0 := \sqrt{x \cdot 9}\\ t_1 := t_0 \cdot y\\ \mathbf{if}\;x \leq 1.8 \cdot 10^{-68}:\\ \;\;\;\;\frac{1}{t_0}\\ \mathbf{elif}\;x \leq 2.55 \cdot 10^{-55}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-33}:\\ \;\;\;\;\sqrt{0.1111111111111111 \cdot \frac{1}{x}}\\ \mathbf{elif}\;x \leq 8.2 \cdot 10^{+77}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \]
Alternative 7
Error9.4
Cost7244
\[\begin{array}{l} t_0 := \sqrt{x \cdot 9}\\ \mathbf{if}\;x \leq 1.8 \cdot 10^{-68}:\\ \;\;\;\;\frac{1}{t_0}\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-55}:\\ \;\;\;\;t_0 \cdot y\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-29}:\\ \;\;\;\;\sqrt{0.1111111111111111 \cdot \frac{1}{x}}\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + -1\right)\right)\\ \end{array} \]
Alternative 8
Error1.4
Cost7244
\[\begin{array}{l} \mathbf{if}\;x \leq 4.2 \cdot 10^{-7}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + \frac{0.1111111111111111}{x}\right)\right)\\ \mathbf{elif}\;x \leq 460000:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)\\ \mathbf{elif}\;x \leq 1500000:\\ \;\;\;\;y \cdot \left(3 \cdot \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\ \end{array} \]
Alternative 9
Error1.5
Cost7244
\[\begin{array}{l} t_0 := 3 \cdot \sqrt{x}\\ \mathbf{if}\;x \leq 9.5 \cdot 10^{-7}:\\ \;\;\;\;\left(y + \frac{0.1111111111111111}{x}\right) \cdot t_0\\ \mathbf{elif}\;x \leq 880000:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)\\ \mathbf{elif}\;x \leq 1500000:\\ \;\;\;\;y \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\ \end{array} \]
Alternative 10
Error1.4
Cost7244
\[\begin{array}{l} \mathbf{if}\;x \leq 1.65 \cdot 10^{-6}:\\ \;\;\;\;\frac{{x}^{0.5}}{0.3333333333333333} \cdot \left(y + \frac{0.1111111111111111}{x}\right)\\ \mathbf{elif}\;x \leq 196000:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)\\ \mathbf{elif}\;x \leq 1500000:\\ \;\;\;\;y \cdot \left(3 \cdot \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\ \end{array} \]
Alternative 11
Error1.5
Cost7241
\[\begin{array}{l} \mathbf{if}\;y \leq -3.7 \lor \neg \left(y \leq 1.12 \cdot 10^{-18}\right):\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y + \frac{0.1111111111111111}{x}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \end{array} \]
Alternative 12
Error0.4
Cost7104
\[3 \cdot \left(\sqrt{x} \cdot \left(y + \left(\frac{0.1111111111111111}{x} + -1\right)\right)\right) \]
Alternative 13
Error0.4
Cost7104
\[\sqrt{x \cdot 9} \cdot \left(-1 + \left(y + \frac{0.1111111111111111}{x}\right)\right) \]
Alternative 14
Error22.1
Cost6724
\[\begin{array}{l} \mathbf{if}\;x \leq 0.112:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \]
Alternative 15
Error38.7
Cost6592
\[\sqrt{\frac{0.1111111111111111}{x}} \]

Error

Reproduce?

herbie shell --seed 2023060 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B"
  :precision binary64

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

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