?

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

?

\[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
\[\left(3 \cdot \sqrt{x}\right) \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
 (* (* 3.0 (sqrt x)) (- (+ 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 (3.0 * sqrt(x)) * ((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 = (3.0d0 * sqrt(x)) * ((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 (3.0 * Math.sqrt(x)) * ((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 (3.0 * math.sqrt(x)) * ((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(Float64(3.0 * sqrt(x)) * 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 = (3.0 * sqrt(x)) * ((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[(3.0 * N[Sqrt[x], $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)
\left(3 \cdot \sqrt{x}\right) \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. Final simplification0.4

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

Alternatives

Alternative 1
Error23.3
Cost7248
\[\begin{array}{l} t_0 := \sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ t_1 := 3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{if}\;x \leq 2.6 \cdot 10^{-89}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-64}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-25}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+112}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;-3 \cdot \sqrt{x}\\ \end{array} \]
Alternative 2
Error23.3
Cost7248
\[\begin{array}{l} t_0 := \sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{if}\;x \leq 2.6 \cdot 10^{-89}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-64}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-25}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+112}:\\ \;\;\;\;\left(3 \cdot \sqrt{x}\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;-3 \cdot \sqrt{x}\\ \end{array} \]
Alternative 3
Error23.3
Cost7248
\[\begin{array}{l} \mathbf{if}\;x \leq 2.6 \cdot 10^{-89}:\\ \;\;\;\;\frac{\sqrt{x}}{x} \cdot 0.3333333333333333\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-64}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{+112}:\\ \;\;\;\;\left(3 \cdot \sqrt{x}\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;-3 \cdot \sqrt{x}\\ \end{array} \]
Alternative 4
Error23.3
Cost7248
\[\begin{array}{l} \mathbf{if}\;x \leq 4.2 \cdot 10^{-90}:\\ \;\;\;\;\frac{\sqrt{x}}{x \cdot 3}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-64}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 1.42 \cdot 10^{+112}:\\ \;\;\;\;\left(3 \cdot \sqrt{x}\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;-3 \cdot \sqrt{x}\\ \end{array} \]
Alternative 5
Error10.5
Cost7244
\[\begin{array}{l} \mathbf{if}\;x \leq 2.6 \cdot 10^{-89}:\\ \;\;\;\;\frac{\sqrt{x}}{x \cdot 3}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-64}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y - 1\right)\right)\\ \end{array} \]
Alternative 6
Error10.5
Cost7244
\[\begin{array}{l} \mathbf{if}\;x \leq 2.6 \cdot 10^{-89}:\\ \;\;\;\;\frac{\sqrt{x}}{x \cdot 3}\\ \mathbf{elif}\;x \leq 3.2 \cdot 10^{-63}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{x} \cdot \left(\sqrt{x} \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y - 1\right)\right)\\ \end{array} \]
Alternative 7
Error10.5
Cost7244
\[\begin{array}{l} \mathbf{if}\;x \leq 2.05 \cdot 10^{-89}:\\ \;\;\;\;\frac{\sqrt{x}}{x \cdot 0.16666666666666666} \cdot 0.05555555555555555\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-64}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{x} \cdot \left(\sqrt{x} \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y - 1\right)\right)\\ \end{array} \]
Alternative 8
Error10.5
Cost7244
\[\begin{array}{l} \mathbf{if}\;x \leq 2.6 \cdot 10^{-89}:\\ \;\;\;\;\frac{\frac{\sqrt{x}}{x}}{1.5} \cdot 0.5\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-64}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;x \leq 4.05 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{x} \cdot \left(\sqrt{x} \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y - 1\right)\right)\\ \end{array} \]
Alternative 9
Error10.5
Cost7244
\[\begin{array}{l} \mathbf{if}\;x \leq 2.05 \cdot 10^{-89}:\\ \;\;\;\;\frac{\sqrt{x}}{\frac{x \cdot 18}{6}}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{-64}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{x} \cdot \left(\sqrt{x} \cdot 0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot \left(y - 1\right)\right)\\ \end{array} \]
Alternative 10
Error0.4
Cost7104
\[3 \cdot \left(\sqrt{x} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)\right) \]
Alternative 11
Error27.1
Cost6984
\[\begin{array}{l} t_0 := 3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{if}\;y \leq -1 \cdot 10^{+21}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 1:\\ \;\;\;\;-3 \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 12
Error46.8
Cost6592
\[-3 \cdot \sqrt{x} \]

Error

Reproduce?

herbie shell --seed 2023074 
(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)))