Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D

Percentage Accurate: 99.7% → 99.7%
Time: 8.8s
Alternatives: 15
Speedup: 1.0×

Specification

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

\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.7% accurate, 1.0× speedup?

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

\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}

Alternative 1: 99.7% accurate, 1.0× speedup?

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

\\
\left(1 + \frac{-1}{x \cdot 9}\right) - \frac{{x}^{-0.5} \cdot y}{3}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
  2. Step-by-step derivation
    1. *-un-lft-identity99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
    2. *-commutative99.6%

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
    4. pow1/299.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
    5. pow-flip99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
    6. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
  3. Applied egg-rr99.6%

    \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
  4. Step-by-step derivation
    1. associate-*r/99.7%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{{x}^{-0.5} \cdot y}{3}} \]
  5. Applied egg-rr99.7%

    \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{{x}^{-0.5} \cdot y}{3}} \]
  6. Final simplification99.7%

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

Alternative 2: 99.7% accurate, 1.0× speedup?

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

\\
\left(1 + \frac{-1}{x \cdot 9}\right) - {x}^{-0.5} \cdot \frac{y}{3}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
  2. Step-by-step derivation
    1. *-un-lft-identity99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
    2. *-commutative99.6%

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
    4. pow1/299.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
    5. pow-flip99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
    6. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
  3. Applied egg-rr99.6%

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

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

Alternative 3: 99.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \left({x}^{-0.5} \cdot y\right) \end{array} \]
(FPCore (x y)
 :precision binary64
 (+
  (- 1.0 (/ 0.1111111111111111 x))
  (* -0.3333333333333333 (* (pow x -0.5) y))))
double code(double x, double y) {
	return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (pow(x, -0.5) * y));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * ((x ** (-0.5d0)) * y))
end function
public static double code(double x, double y) {
	return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (Math.pow(x, -0.5) * y));
}
def code(x, y):
	return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (math.pow(x, -0.5) * y))
function code(x, y)
	return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64((x ^ -0.5) * y)))
end
function tmp = code(x, y)
	tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * ((x ^ -0.5) * y));
end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \left({x}^{-0.5} \cdot y\right)
\end{array}
Derivation
  1. Initial program 99.6%

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
  2. Step-by-step derivation
    1. sub-neg99.6%

      \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
    2. distribute-frac-neg99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
    3. *-commutative99.6%

      \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    4. associate-/r*99.6%

      \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    5. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    6. neg-mul-199.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
    7. times-frac99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
    8. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
  3. Simplified99.6%

    \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
  4. Step-by-step derivation
    1. div-inv99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \color{blue}{\left(y \cdot \frac{1}{\sqrt{x}}\right)} \]
    2. pow1/299.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \left(y \cdot \frac{1}{\color{blue}{{x}^{0.5}}}\right) \]
    3. pow-flip99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \left(y \cdot \color{blue}{{x}^{\left(-0.5\right)}}\right) \]
    4. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \left(y \cdot {x}^{\color{blue}{-0.5}}\right) \]
  5. Applied egg-rr99.6%

    \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \color{blue}{\left(y \cdot {x}^{-0.5}\right)} \]
  6. Final simplification99.6%

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

Alternative 4: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(1 - \frac{0.1111111111111111}{x}\right) - \frac{{x}^{-0.5} \cdot y}{3} \end{array} \]
(FPCore (x y)
 :precision binary64
 (- (- 1.0 (/ 0.1111111111111111 x)) (/ (* (pow x -0.5) y) 3.0)))
double code(double x, double y) {
	return (1.0 - (0.1111111111111111 / x)) - ((pow(x, -0.5) * y) / 3.0);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (1.0d0 - (0.1111111111111111d0 / x)) - (((x ** (-0.5d0)) * y) / 3.0d0)
end function
public static double code(double x, double y) {
	return (1.0 - (0.1111111111111111 / x)) - ((Math.pow(x, -0.5) * y) / 3.0);
}
def code(x, y):
	return (1.0 - (0.1111111111111111 / x)) - ((math.pow(x, -0.5) * y) / 3.0)
function code(x, y)
	return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(Float64((x ^ -0.5) * y) / 3.0))
end
function tmp = code(x, y)
	tmp = (1.0 - (0.1111111111111111 / x)) - (((x ^ -0.5) * y) / 3.0);
end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{{x}^{-0.5} \cdot y}{3}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
  2. Step-by-step derivation
    1. *-un-lft-identity99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
    2. *-commutative99.6%

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
    4. pow1/299.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
    5. pow-flip99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
    6. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
  3. Applied egg-rr99.6%

    \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
  4. Step-by-step derivation
    1. associate-*r/99.7%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{{x}^{-0.5} \cdot y}{3}} \]
  5. Applied egg-rr99.7%

    \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{{x}^{-0.5} \cdot y}{3}} \]
  6. Taylor expanded in x around 0 99.6%

    \[\leadsto \left(1 - \color{blue}{\frac{0.1111111111111111}{x}}\right) - \frac{{x}^{-0.5} \cdot y}{3} \]
  7. Final simplification99.6%

    \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) - \frac{{x}^{-0.5} \cdot y}{3} \]

Alternative 5: 99.6% accurate, 1.0× speedup?

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

\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
  2. Step-by-step derivation
    1. sub-neg99.6%

      \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
    2. distribute-frac-neg99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
    3. *-commutative99.6%

      \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    4. associate-/r*99.6%

      \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    5. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    6. neg-mul-199.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
    7. times-frac99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
    8. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
  3. Simplified99.6%

    \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
  4. Final simplification99.6%

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

Alternative 6: 99.6% accurate, 1.0× speedup?

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

\\
\left(1 - \frac{0.1111111111111111}{x}\right) + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
  2. Step-by-step derivation
    1. sub-neg99.6%

      \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
    2. distribute-frac-neg99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
    3. *-commutative99.6%

      \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    4. associate-/r*99.6%

      \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    5. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    6. neg-mul-199.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
    7. times-frac99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
    8. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
  3. Simplified99.6%

    \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
  4. Step-by-step derivation
    1. associate-*r/99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-0.3333333333333333 \cdot y}{\sqrt{x}}} \]
  5. Applied egg-rr99.6%

    \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-0.3333333333333333 \cdot y}{\sqrt{x}}} \]
  6. Final simplification99.6%

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

Alternative 7: 91.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+84} \lor \neg \left(y \leq 2.1 \cdot 10^{+56}\right):\\ \;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (or (<= y -3.9e+84) (not (<= y 2.1e+56)))
   (/ (* (pow x -0.5) y) -3.0)
   (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
	double tmp;
	if ((y <= -3.9e+84) || !(y <= 2.1e+56)) {
		tmp = (pow(x, -0.5) * y) / -3.0;
	} else {
		tmp = 1.0 + (-0.1111111111111111 / x);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if ((y <= (-3.9d+84)) .or. (.not. (y <= 2.1d+56))) then
        tmp = ((x ** (-0.5d0)) * y) / (-3.0d0)
    else
        tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if ((y <= -3.9e+84) || !(y <= 2.1e+56)) {
		tmp = (Math.pow(x, -0.5) * y) / -3.0;
	} else {
		tmp = 1.0 + (-0.1111111111111111 / x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if (y <= -3.9e+84) or not (y <= 2.1e+56):
		tmp = (math.pow(x, -0.5) * y) / -3.0
	else:
		tmp = 1.0 + (-0.1111111111111111 / x)
	return tmp
function code(x, y)
	tmp = 0.0
	if ((y <= -3.9e+84) || !(y <= 2.1e+56))
		tmp = Float64(Float64((x ^ -0.5) * y) / -3.0);
	else
		tmp = Float64(1.0 + Float64(-0.1111111111111111 / x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if ((y <= -3.9e+84) || ~((y <= 2.1e+56)))
		tmp = ((x ^ -0.5) * y) / -3.0;
	else
		tmp = 1.0 + (-0.1111111111111111 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[Or[LessEqual[y, -3.9e+84], N[Not[LessEqual[y, 2.1e+56]], $MachinePrecision]], N[(N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision] / -3.0), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+84} \lor \neg \left(y \leq 2.1 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.90000000000000016e84 or 2.10000000000000017e56 < y

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.5%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.5%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 90.6%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative90.6%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified90.6%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    7. Step-by-step derivation
      1. associate-*l*90.5%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)} \]
      2. inv-pow90.5%

        \[\leadsto \sqrt{\color{blue}{{x}^{-1}}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      3. sqrt-pow190.5%

        \[\leadsto \color{blue}{{x}^{\left(\frac{-1}{2}\right)}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      4. metadata-eval90.5%

        \[\leadsto {x}^{\color{blue}{-0.5}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      5. associate-*r*90.6%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot y\right) \cdot -0.3333333333333333} \]
      6. metadata-eval90.6%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\left(-0.3333333333333333\right)} \]
      7. metadata-eval90.6%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \left(-\color{blue}{\sqrt{0.1111111111111111}}\right) \]
      8. distribute-rgt-neg-in90.6%

        \[\leadsto \color{blue}{-\left({x}^{-0.5} \cdot y\right) \cdot \sqrt{0.1111111111111111}} \]
      9. metadata-eval90.6%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{0.3333333333333333} \]
      10. metadata-eval90.6%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\frac{1}{3}} \]
      11. div-inv90.6%

        \[\leadsto -\color{blue}{\frac{{x}^{-0.5} \cdot y}{3}} \]
      12. associate-/l*90.5%

        \[\leadsto -\color{blue}{\frac{{x}^{-0.5}}{\frac{3}{y}}} \]
      13. distribute-neg-frac90.5%

        \[\leadsto \color{blue}{\frac{-{x}^{-0.5}}{\frac{3}{y}}} \]
    8. Applied egg-rr90.5%

      \[\leadsto \color{blue}{\frac{-{x}^{-0.5}}{\frac{3}{y}}} \]
    9. Step-by-step derivation
      1. metadata-eval90.5%

        \[\leadsto \frac{-{x}^{-0.5}}{\frac{\color{blue}{\frac{-3}{-1}}}{y}} \]
      2. associate-/r*90.5%

        \[\leadsto \frac{-{x}^{-0.5}}{\color{blue}{\frac{-3}{-1 \cdot y}}} \]
      3. neg-mul-190.5%

        \[\leadsto \frac{-{x}^{-0.5}}{\frac{-3}{\color{blue}{-y}}} \]
      4. associate-/l*90.6%

        \[\leadsto \color{blue}{\frac{\left(-{x}^{-0.5}\right) \cdot \left(-y\right)}{-3}} \]
      5. *-commutative90.6%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot \left(-{x}^{-0.5}\right)}}{-3} \]
      6. distribute-rgt-neg-out90.6%

        \[\leadsto \frac{\color{blue}{-\left(-y\right) \cdot {x}^{-0.5}}}{-3} \]
      7. distribute-lft-neg-in90.6%

        \[\leadsto \frac{\color{blue}{\left(-\left(-y\right)\right) \cdot {x}^{-0.5}}}{-3} \]
      8. remove-double-neg90.6%

        \[\leadsto \frac{\color{blue}{y} \cdot {x}^{-0.5}}{-3} \]
    10. Simplified90.6%

      \[\leadsto \color{blue}{\frac{y \cdot {x}^{-0.5}}{-3}} \]

    if -3.90000000000000016e84 < y < 2.10000000000000017e56

    1. Initial program 99.7%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
      2. distribute-frac-neg99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
      3. *-commutative99.7%

        \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      4. associate-/r*99.7%

        \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      5. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      6. neg-mul-199.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
      7. times-frac99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
      8. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
    4. Taylor expanded in y around 0 96.6%

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv96.6%

        \[\leadsto \color{blue}{1 + \left(-0.1111111111111111\right) \cdot \frac{1}{x}} \]
      2. metadata-eval96.6%

        \[\leadsto 1 + \color{blue}{-0.1111111111111111} \cdot \frac{1}{x} \]
      3. associate-*r/96.7%

        \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111 \cdot 1}{x}} \]
      4. metadata-eval96.7%

        \[\leadsto 1 + \frac{\color{blue}{-0.1111111111111111}}{x} \]
    6. Simplified96.7%

      \[\leadsto \color{blue}{1 + \frac{-0.1111111111111111}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+84} \lor \neg \left(y \leq 2.1 \cdot 10^{+56}\right):\\ \;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \end{array} \]

Alternative 8: 91.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{+77}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+56}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-y}{\sqrt{x}}}{3}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y -7.4e+77)
   (/ (* y -0.3333333333333333) (sqrt x))
   (if (<= y 4.4e+56)
     (+ 1.0 (/ -0.1111111111111111 x))
     (/ (/ (- y) (sqrt x)) 3.0))))
double code(double x, double y) {
	double tmp;
	if (y <= -7.4e+77) {
		tmp = (y * -0.3333333333333333) / sqrt(x);
	} else if (y <= 4.4e+56) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = (-y / sqrt(x)) / 3.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= (-7.4d+77)) then
        tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
    else if (y <= 4.4d+56) then
        tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
    else
        tmp = (-y / sqrt(x)) / 3.0d0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= -7.4e+77) {
		tmp = (y * -0.3333333333333333) / Math.sqrt(x);
	} else if (y <= 4.4e+56) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = (-y / Math.sqrt(x)) / 3.0;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= -7.4e+77:
		tmp = (y * -0.3333333333333333) / math.sqrt(x)
	elif y <= 4.4e+56:
		tmp = 1.0 + (-0.1111111111111111 / x)
	else:
		tmp = (-y / math.sqrt(x)) / 3.0
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= -7.4e+77)
		tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x));
	elseif (y <= 4.4e+56)
		tmp = Float64(1.0 + Float64(-0.1111111111111111 / x));
	else
		tmp = Float64(Float64(Float64(-y) / sqrt(x)) / 3.0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= -7.4e+77)
		tmp = (y * -0.3333333333333333) / sqrt(x);
	elseif (y <= 4.4e+56)
		tmp = 1.0 + (-0.1111111111111111 / x);
	else
		tmp = (-y / sqrt(x)) / 3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, -7.4e+77], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+56], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[((-y) / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+77}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\

\mathbf{elif}\;y \leq 4.4 \cdot 10^{+56}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{-y}{\sqrt{x}}}{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.3999999999999999e77

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.4%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.7%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 97.3%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative97.3%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified97.3%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    7. Step-by-step derivation
      1. associate-*l*97.2%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)} \]
      2. sqrt-div97.1%

        \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{x}}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      3. metadata-eval97.1%

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{x}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      4. associate-*l/97.3%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(y \cdot -0.3333333333333333\right)}{\sqrt{x}}} \]
      5. *-un-lft-identity97.3%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333}}{\sqrt{x}} \]
    8. Applied egg-rr97.3%

      \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{\sqrt{x}}} \]

    if -7.3999999999999999e77 < y < 4.40000000000000032e56

    1. Initial program 99.7%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
      2. distribute-frac-neg99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
      3. *-commutative99.7%

        \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      4. associate-/r*99.7%

        \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      5. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      6. neg-mul-199.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
      7. times-frac99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
      8. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
    4. Taylor expanded in y around 0 96.6%

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv96.6%

        \[\leadsto \color{blue}{1 + \left(-0.1111111111111111\right) \cdot \frac{1}{x}} \]
      2. metadata-eval96.6%

        \[\leadsto 1 + \color{blue}{-0.1111111111111111} \cdot \frac{1}{x} \]
      3. associate-*r/96.7%

        \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111 \cdot 1}{x}} \]
      4. metadata-eval96.7%

        \[\leadsto 1 + \frac{\color{blue}{-0.1111111111111111}}{x} \]
    6. Simplified96.7%

      \[\leadsto \color{blue}{1 + \frac{-0.1111111111111111}{x}} \]

    if 4.40000000000000032e56 < y

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.5%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.5%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 85.4%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative85.4%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified85.4%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    7. Step-by-step derivation
      1. associate-*l*85.3%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)} \]
      2. inv-pow85.3%

        \[\leadsto \sqrt{\color{blue}{{x}^{-1}}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      3. sqrt-pow185.3%

        \[\leadsto \color{blue}{{x}^{\left(\frac{-1}{2}\right)}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      4. metadata-eval85.3%

        \[\leadsto {x}^{\color{blue}{-0.5}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      5. associate-*r*85.4%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot y\right) \cdot -0.3333333333333333} \]
      6. metadata-eval85.4%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\left(-0.3333333333333333\right)} \]
      7. metadata-eval85.4%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \left(-\color{blue}{\sqrt{0.1111111111111111}}\right) \]
      8. distribute-rgt-neg-in85.4%

        \[\leadsto \color{blue}{-\left({x}^{-0.5} \cdot y\right) \cdot \sqrt{0.1111111111111111}} \]
      9. metadata-eval85.4%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{0.3333333333333333} \]
      10. metadata-eval85.4%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\frac{1}{3}} \]
      11. div-inv85.4%

        \[\leadsto -\color{blue}{\frac{{x}^{-0.5} \cdot y}{3}} \]
      12. distribute-neg-frac85.4%

        \[\leadsto \color{blue}{\frac{-{x}^{-0.5} \cdot y}{3}} \]
      13. *-commutative85.4%

        \[\leadsto \frac{-\color{blue}{y \cdot {x}^{-0.5}}}{3} \]
      14. metadata-eval85.4%

        \[\leadsto \frac{-y \cdot {x}^{\color{blue}{\left(\frac{-1}{2}\right)}}}{3} \]
      15. sqrt-pow185.4%

        \[\leadsto \frac{-y \cdot \color{blue}{\sqrt{{x}^{-1}}}}{3} \]
      16. inv-pow85.4%

        \[\leadsto \frac{-y \cdot \sqrt{\color{blue}{\frac{1}{x}}}}{3} \]
      17. sqrt-div85.3%

        \[\leadsto \frac{-y \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{x}}}}{3} \]
      18. metadata-eval85.3%

        \[\leadsto \frac{-y \cdot \frac{\color{blue}{1}}{\sqrt{x}}}{3} \]
      19. un-div-inv85.4%

        \[\leadsto \frac{-\color{blue}{\frac{y}{\sqrt{x}}}}{3} \]
    8. Applied egg-rr85.4%

      \[\leadsto \color{blue}{\frac{-\frac{y}{\sqrt{x}}}{3}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification94.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.4 \cdot 10^{+77}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+56}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{-y}{\sqrt{x}}}{3}\\ \end{array} \]

Alternative 9: 91.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+80}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\ \mathbf{elif}\;y \leq 5.9 \cdot 10^{+55}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y -6.2e+80)
   (* -0.3333333333333333 (* y (sqrt (/ 1.0 x))))
   (if (<= y 5.9e+55)
     (+ 1.0 (/ -0.1111111111111111 x))
     (/ (* (pow x -0.5) y) -3.0))))
double code(double x, double y) {
	double tmp;
	if (y <= -6.2e+80) {
		tmp = -0.3333333333333333 * (y * sqrt((1.0 / x)));
	} else if (y <= 5.9e+55) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = (pow(x, -0.5) * y) / -3.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= (-6.2d+80)) then
        tmp = (-0.3333333333333333d0) * (y * sqrt((1.0d0 / x)))
    else if (y <= 5.9d+55) then
        tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
    else
        tmp = ((x ** (-0.5d0)) * y) / (-3.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= -6.2e+80) {
		tmp = -0.3333333333333333 * (y * Math.sqrt((1.0 / x)));
	} else if (y <= 5.9e+55) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = (Math.pow(x, -0.5) * y) / -3.0;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= -6.2e+80:
		tmp = -0.3333333333333333 * (y * math.sqrt((1.0 / x)))
	elif y <= 5.9e+55:
		tmp = 1.0 + (-0.1111111111111111 / x)
	else:
		tmp = (math.pow(x, -0.5) * y) / -3.0
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= -6.2e+80)
		tmp = Float64(-0.3333333333333333 * Float64(y * sqrt(Float64(1.0 / x))));
	elseif (y <= 5.9e+55)
		tmp = Float64(1.0 + Float64(-0.1111111111111111 / x));
	else
		tmp = Float64(Float64((x ^ -0.5) * y) / -3.0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= -6.2e+80)
		tmp = -0.3333333333333333 * (y * sqrt((1.0 / x)));
	elseif (y <= 5.9e+55)
		tmp = 1.0 + (-0.1111111111111111 / x);
	else
		tmp = ((x ^ -0.5) * y) / -3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, -6.2e+80], N[(-0.3333333333333333 * N[(y * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.9e+55], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision] / -3.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+80}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\

\mathbf{elif}\;y \leq 5.9 \cdot 10^{+55}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.19999999999999976e80

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.4%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.7%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 97.3%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative97.3%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified97.3%

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

    if -6.19999999999999976e80 < y < 5.89999999999999948e55

    1. Initial program 99.7%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
      2. distribute-frac-neg99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
      3. *-commutative99.7%

        \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      4. associate-/r*99.7%

        \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      5. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      6. neg-mul-199.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
      7. times-frac99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
      8. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
    4. Taylor expanded in y around 0 96.6%

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv96.6%

        \[\leadsto \color{blue}{1 + \left(-0.1111111111111111\right) \cdot \frac{1}{x}} \]
      2. metadata-eval96.6%

        \[\leadsto 1 + \color{blue}{-0.1111111111111111} \cdot \frac{1}{x} \]
      3. associate-*r/96.7%

        \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111 \cdot 1}{x}} \]
      4. metadata-eval96.7%

        \[\leadsto 1 + \frac{\color{blue}{-0.1111111111111111}}{x} \]
    6. Simplified96.7%

      \[\leadsto \color{blue}{1 + \frac{-0.1111111111111111}{x}} \]

    if 5.89999999999999948e55 < y

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.5%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.5%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 85.4%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative85.4%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified85.4%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    7. Step-by-step derivation
      1. associate-*l*85.3%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)} \]
      2. inv-pow85.3%

        \[\leadsto \sqrt{\color{blue}{{x}^{-1}}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      3. sqrt-pow185.3%

        \[\leadsto \color{blue}{{x}^{\left(\frac{-1}{2}\right)}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      4. metadata-eval85.3%

        \[\leadsto {x}^{\color{blue}{-0.5}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      5. associate-*r*85.4%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot y\right) \cdot -0.3333333333333333} \]
      6. metadata-eval85.4%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\left(-0.3333333333333333\right)} \]
      7. metadata-eval85.4%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \left(-\color{blue}{\sqrt{0.1111111111111111}}\right) \]
      8. distribute-rgt-neg-in85.4%

        \[\leadsto \color{blue}{-\left({x}^{-0.5} \cdot y\right) \cdot \sqrt{0.1111111111111111}} \]
      9. metadata-eval85.4%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{0.3333333333333333} \]
      10. metadata-eval85.4%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\frac{1}{3}} \]
      11. div-inv85.4%

        \[\leadsto -\color{blue}{\frac{{x}^{-0.5} \cdot y}{3}} \]
      12. associate-/l*85.3%

        \[\leadsto -\color{blue}{\frac{{x}^{-0.5}}{\frac{3}{y}}} \]
      13. distribute-neg-frac85.3%

        \[\leadsto \color{blue}{\frac{-{x}^{-0.5}}{\frac{3}{y}}} \]
    8. Applied egg-rr85.3%

      \[\leadsto \color{blue}{\frac{-{x}^{-0.5}}{\frac{3}{y}}} \]
    9. Step-by-step derivation
      1. metadata-eval85.3%

        \[\leadsto \frac{-{x}^{-0.5}}{\frac{\color{blue}{\frac{-3}{-1}}}{y}} \]
      2. associate-/r*85.3%

        \[\leadsto \frac{-{x}^{-0.5}}{\color{blue}{\frac{-3}{-1 \cdot y}}} \]
      3. neg-mul-185.3%

        \[\leadsto \frac{-{x}^{-0.5}}{\frac{-3}{\color{blue}{-y}}} \]
      4. associate-/l*85.4%

        \[\leadsto \color{blue}{\frac{\left(-{x}^{-0.5}\right) \cdot \left(-y\right)}{-3}} \]
      5. *-commutative85.4%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot \left(-{x}^{-0.5}\right)}}{-3} \]
      6. distribute-rgt-neg-out85.4%

        \[\leadsto \frac{\color{blue}{-\left(-y\right) \cdot {x}^{-0.5}}}{-3} \]
      7. distribute-lft-neg-in85.4%

        \[\leadsto \frac{\color{blue}{\left(-\left(-y\right)\right) \cdot {x}^{-0.5}}}{-3} \]
      8. remove-double-neg85.4%

        \[\leadsto \frac{\color{blue}{y} \cdot {x}^{-0.5}}{-3} \]
    10. Simplified85.4%

      \[\leadsto \color{blue}{\frac{y \cdot {x}^{-0.5}}{-3}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification94.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+80}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\ \mathbf{elif}\;y \leq 5.9 \cdot 10^{+55}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\ \end{array} \]

Alternative 10: 91.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+83}:\\ \;\;\;\;\frac{-{x}^{-0.5}}{\frac{3}{y}}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+56}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y -6.5e+83)
   (/ (- (pow x -0.5)) (/ 3.0 y))
   (if (<= y 1.2e+56)
     (+ 1.0 (/ -0.1111111111111111 x))
     (/ (* (pow x -0.5) y) -3.0))))
double code(double x, double y) {
	double tmp;
	if (y <= -6.5e+83) {
		tmp = -pow(x, -0.5) / (3.0 / y);
	} else if (y <= 1.2e+56) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = (pow(x, -0.5) * y) / -3.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= (-6.5d+83)) then
        tmp = -(x ** (-0.5d0)) / (3.0d0 / y)
    else if (y <= 1.2d+56) then
        tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
    else
        tmp = ((x ** (-0.5d0)) * y) / (-3.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= -6.5e+83) {
		tmp = -Math.pow(x, -0.5) / (3.0 / y);
	} else if (y <= 1.2e+56) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = (Math.pow(x, -0.5) * y) / -3.0;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= -6.5e+83:
		tmp = -math.pow(x, -0.5) / (3.0 / y)
	elif y <= 1.2e+56:
		tmp = 1.0 + (-0.1111111111111111 / x)
	else:
		tmp = (math.pow(x, -0.5) * y) / -3.0
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= -6.5e+83)
		tmp = Float64(Float64(-(x ^ -0.5)) / Float64(3.0 / y));
	elseif (y <= 1.2e+56)
		tmp = Float64(1.0 + Float64(-0.1111111111111111 / x));
	else
		tmp = Float64(Float64((x ^ -0.5) * y) / -3.0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= -6.5e+83)
		tmp = -(x ^ -0.5) / (3.0 / y);
	elseif (y <= 1.2e+56)
		tmp = 1.0 + (-0.1111111111111111 / x);
	else
		tmp = ((x ^ -0.5) * y) / -3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, -6.5e+83], N[((-N[Power[x, -0.5], $MachinePrecision]) / N[(3.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+56], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision] / -3.0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{-{x}^{-0.5}}{\frac{3}{y}}\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+56}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\

\mathbf{else}:\\
\;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -6.5000000000000003e83

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.4%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.7%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 97.3%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative97.3%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified97.3%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    7. Step-by-step derivation
      1. associate-*l*97.2%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)} \]
      2. inv-pow97.2%

        \[\leadsto \sqrt{\color{blue}{{x}^{-1}}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      3. sqrt-pow197.3%

        \[\leadsto \color{blue}{{x}^{\left(\frac{-1}{2}\right)}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      4. metadata-eval97.3%

        \[\leadsto {x}^{\color{blue}{-0.5}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      5. associate-*r*97.4%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot y\right) \cdot -0.3333333333333333} \]
      6. metadata-eval97.4%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\left(-0.3333333333333333\right)} \]
      7. metadata-eval97.4%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \left(-\color{blue}{\sqrt{0.1111111111111111}}\right) \]
      8. distribute-rgt-neg-in97.4%

        \[\leadsto \color{blue}{-\left({x}^{-0.5} \cdot y\right) \cdot \sqrt{0.1111111111111111}} \]
      9. metadata-eval97.4%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{0.3333333333333333} \]
      10. metadata-eval97.4%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\frac{1}{3}} \]
      11. div-inv97.3%

        \[\leadsto -\color{blue}{\frac{{x}^{-0.5} \cdot y}{3}} \]
      12. associate-/l*97.4%

        \[\leadsto -\color{blue}{\frac{{x}^{-0.5}}{\frac{3}{y}}} \]
      13. distribute-neg-frac97.4%

        \[\leadsto \color{blue}{\frac{-{x}^{-0.5}}{\frac{3}{y}}} \]
    8. Applied egg-rr97.4%

      \[\leadsto \color{blue}{\frac{-{x}^{-0.5}}{\frac{3}{y}}} \]

    if -6.5000000000000003e83 < y < 1.20000000000000007e56

    1. Initial program 99.7%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
      2. distribute-frac-neg99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
      3. *-commutative99.7%

        \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      4. associate-/r*99.7%

        \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      5. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      6. neg-mul-199.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
      7. times-frac99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
      8. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
    4. Taylor expanded in y around 0 96.6%

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv96.6%

        \[\leadsto \color{blue}{1 + \left(-0.1111111111111111\right) \cdot \frac{1}{x}} \]
      2. metadata-eval96.6%

        \[\leadsto 1 + \color{blue}{-0.1111111111111111} \cdot \frac{1}{x} \]
      3. associate-*r/96.7%

        \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111 \cdot 1}{x}} \]
      4. metadata-eval96.7%

        \[\leadsto 1 + \frac{\color{blue}{-0.1111111111111111}}{x} \]
    6. Simplified96.7%

      \[\leadsto \color{blue}{1 + \frac{-0.1111111111111111}{x}} \]

    if 1.20000000000000007e56 < y

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.5%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.5%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 85.4%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative85.4%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified85.4%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    7. Step-by-step derivation
      1. associate-*l*85.3%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)} \]
      2. inv-pow85.3%

        \[\leadsto \sqrt{\color{blue}{{x}^{-1}}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      3. sqrt-pow185.3%

        \[\leadsto \color{blue}{{x}^{\left(\frac{-1}{2}\right)}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      4. metadata-eval85.3%

        \[\leadsto {x}^{\color{blue}{-0.5}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      5. associate-*r*85.4%

        \[\leadsto \color{blue}{\left({x}^{-0.5} \cdot y\right) \cdot -0.3333333333333333} \]
      6. metadata-eval85.4%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\left(-0.3333333333333333\right)} \]
      7. metadata-eval85.4%

        \[\leadsto \left({x}^{-0.5} \cdot y\right) \cdot \left(-\color{blue}{\sqrt{0.1111111111111111}}\right) \]
      8. distribute-rgt-neg-in85.4%

        \[\leadsto \color{blue}{-\left({x}^{-0.5} \cdot y\right) \cdot \sqrt{0.1111111111111111}} \]
      9. metadata-eval85.4%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{0.3333333333333333} \]
      10. metadata-eval85.4%

        \[\leadsto -\left({x}^{-0.5} \cdot y\right) \cdot \color{blue}{\frac{1}{3}} \]
      11. div-inv85.4%

        \[\leadsto -\color{blue}{\frac{{x}^{-0.5} \cdot y}{3}} \]
      12. associate-/l*85.3%

        \[\leadsto -\color{blue}{\frac{{x}^{-0.5}}{\frac{3}{y}}} \]
      13. distribute-neg-frac85.3%

        \[\leadsto \color{blue}{\frac{-{x}^{-0.5}}{\frac{3}{y}}} \]
    8. Applied egg-rr85.3%

      \[\leadsto \color{blue}{\frac{-{x}^{-0.5}}{\frac{3}{y}}} \]
    9. Step-by-step derivation
      1. metadata-eval85.3%

        \[\leadsto \frac{-{x}^{-0.5}}{\frac{\color{blue}{\frac{-3}{-1}}}{y}} \]
      2. associate-/r*85.3%

        \[\leadsto \frac{-{x}^{-0.5}}{\color{blue}{\frac{-3}{-1 \cdot y}}} \]
      3. neg-mul-185.3%

        \[\leadsto \frac{-{x}^{-0.5}}{\frac{-3}{\color{blue}{-y}}} \]
      4. associate-/l*85.4%

        \[\leadsto \color{blue}{\frac{\left(-{x}^{-0.5}\right) \cdot \left(-y\right)}{-3}} \]
      5. *-commutative85.4%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot \left(-{x}^{-0.5}\right)}}{-3} \]
      6. distribute-rgt-neg-out85.4%

        \[\leadsto \frac{\color{blue}{-\left(-y\right) \cdot {x}^{-0.5}}}{-3} \]
      7. distribute-lft-neg-in85.4%

        \[\leadsto \frac{\color{blue}{\left(-\left(-y\right)\right) \cdot {x}^{-0.5}}}{-3} \]
      8. remove-double-neg85.4%

        \[\leadsto \frac{\color{blue}{y} \cdot {x}^{-0.5}}{-3} \]
    10. Simplified85.4%

      \[\leadsto \color{blue}{\frac{y \cdot {x}^{-0.5}}{-3}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification94.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+83}:\\ \;\;\;\;\frac{-{x}^{-0.5}}{\frac{3}{y}}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+56}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\ \end{array} \]

Alternative 11: 91.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+83} \lor \neg \left(y \leq 2.9 \cdot 10^{+56}\right):\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (or (<= y -8.2e+83) (not (<= y 2.9e+56)))
   (* -0.3333333333333333 (/ y (sqrt x)))
   (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
	double tmp;
	if ((y <= -8.2e+83) || !(y <= 2.9e+56)) {
		tmp = -0.3333333333333333 * (y / sqrt(x));
	} else {
		tmp = 1.0 + (-0.1111111111111111 / x);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if ((y <= (-8.2d+83)) .or. (.not. (y <= 2.9d+56))) then
        tmp = (-0.3333333333333333d0) * (y / sqrt(x))
    else
        tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if ((y <= -8.2e+83) || !(y <= 2.9e+56)) {
		tmp = -0.3333333333333333 * (y / Math.sqrt(x));
	} else {
		tmp = 1.0 + (-0.1111111111111111 / x);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if (y <= -8.2e+83) or not (y <= 2.9e+56):
		tmp = -0.3333333333333333 * (y / math.sqrt(x))
	else:
		tmp = 1.0 + (-0.1111111111111111 / x)
	return tmp
function code(x, y)
	tmp = 0.0
	if ((y <= -8.2e+83) || !(y <= 2.9e+56))
		tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x)));
	else
		tmp = Float64(1.0 + Float64(-0.1111111111111111 / x));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if ((y <= -8.2e+83) || ~((y <= 2.9e+56)))
		tmp = -0.3333333333333333 * (y / sqrt(x));
	else
		tmp = 1.0 + (-0.1111111111111111 / x);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[Or[LessEqual[y, -8.2e+83], N[Not[LessEqual[y, 2.9e+56]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+83} \lor \neg \left(y \leq 2.9 \cdot 10^{+56}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\

\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.2000000000000002e83 or 2.90000000000000007e56 < y

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.5%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.5%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 90.6%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative90.6%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified90.6%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    7. Step-by-step derivation
      1. expm1-log1p-u44.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{1}{x}} \cdot y\right)\right)} \cdot -0.3333333333333333 \]
      2. expm1-udef44.8%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\frac{1}{x}} \cdot y\right)} - 1\right)} \cdot -0.3333333333333333 \]
      3. *-commutative44.8%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{y \cdot \sqrt{\frac{1}{x}}}\right)} - 1\right) \cdot -0.3333333333333333 \]
      4. sqrt-div44.8%

        \[\leadsto \left(e^{\mathsf{log1p}\left(y \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{x}}}\right)} - 1\right) \cdot -0.3333333333333333 \]
      5. metadata-eval44.8%

        \[\leadsto \left(e^{\mathsf{log1p}\left(y \cdot \frac{\color{blue}{1}}{\sqrt{x}}\right)} - 1\right) \cdot -0.3333333333333333 \]
    8. Applied egg-rr44.8%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(y \cdot \frac{1}{\sqrt{x}}\right)} - 1\right)} \cdot -0.3333333333333333 \]
    9. Step-by-step derivation
      1. expm1-def44.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \frac{1}{\sqrt{x}}\right)\right)} \cdot -0.3333333333333333 \]
      2. expm1-log1p90.5%

        \[\leadsto \color{blue}{\left(y \cdot \frac{1}{\sqrt{x}}\right)} \cdot -0.3333333333333333 \]
      3. associate-*r/90.5%

        \[\leadsto \color{blue}{\frac{y \cdot 1}{\sqrt{x}}} \cdot -0.3333333333333333 \]
      4. *-rgt-identity90.5%

        \[\leadsto \frac{\color{blue}{y}}{\sqrt{x}} \cdot -0.3333333333333333 \]
    10. Simplified90.5%

      \[\leadsto \color{blue}{\frac{y}{\sqrt{x}}} \cdot -0.3333333333333333 \]

    if -8.2000000000000002e83 < y < 2.90000000000000007e56

    1. Initial program 99.7%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
      2. distribute-frac-neg99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
      3. *-commutative99.7%

        \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      4. associate-/r*99.7%

        \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      5. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      6. neg-mul-199.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
      7. times-frac99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
      8. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
    4. Taylor expanded in y around 0 96.6%

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv96.6%

        \[\leadsto \color{blue}{1 + \left(-0.1111111111111111\right) \cdot \frac{1}{x}} \]
      2. metadata-eval96.6%

        \[\leadsto 1 + \color{blue}{-0.1111111111111111} \cdot \frac{1}{x} \]
      3. associate-*r/96.7%

        \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111 \cdot 1}{x}} \]
      4. metadata-eval96.7%

        \[\leadsto 1 + \frac{\color{blue}{-0.1111111111111111}}{x} \]
    6. Simplified96.7%

      \[\leadsto \color{blue}{1 + \frac{-0.1111111111111111}{x}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification94.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+83} \lor \neg \left(y \leq 2.9 \cdot 10^{+56}\right):\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \end{array} \]

Alternative 12: 91.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+83}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{+56}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y -5.5e+83)
   (/ (* y -0.3333333333333333) (sqrt x))
   (if (<= y 5.1e+56)
     (+ 1.0 (/ -0.1111111111111111 x))
     (* -0.3333333333333333 (/ y (sqrt x))))))
double code(double x, double y) {
	double tmp;
	if (y <= -5.5e+83) {
		tmp = (y * -0.3333333333333333) / sqrt(x);
	} else if (y <= 5.1e+56) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = -0.3333333333333333 * (y / sqrt(x));
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (y <= (-5.5d+83)) then
        tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
    else if (y <= 5.1d+56) then
        tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
    else
        tmp = (-0.3333333333333333d0) * (y / sqrt(x))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= -5.5e+83) {
		tmp = (y * -0.3333333333333333) / Math.sqrt(x);
	} else if (y <= 5.1e+56) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = -0.3333333333333333 * (y / Math.sqrt(x));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= -5.5e+83:
		tmp = (y * -0.3333333333333333) / math.sqrt(x)
	elif y <= 5.1e+56:
		tmp = 1.0 + (-0.1111111111111111 / x)
	else:
		tmp = -0.3333333333333333 * (y / math.sqrt(x))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= -5.5e+83)
		tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x));
	elseif (y <= 5.1e+56)
		tmp = Float64(1.0 + Float64(-0.1111111111111111 / x));
	else
		tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= -5.5e+83)
		tmp = (y * -0.3333333333333333) / sqrt(x);
	elseif (y <= 5.1e+56)
		tmp = 1.0 + (-0.1111111111111111 / x);
	else
		tmp = -0.3333333333333333 * (y / sqrt(x));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, -5.5e+83], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.1e+56], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\

\mathbf{elif}\;y \leq 5.1 \cdot 10^{+56}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\

\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.4999999999999996e83

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.4%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.7%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 97.3%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative97.3%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified97.3%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    7. Step-by-step derivation
      1. associate-*l*97.2%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)} \]
      2. sqrt-div97.1%

        \[\leadsto \color{blue}{\frac{\sqrt{1}}{\sqrt{x}}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      3. metadata-eval97.1%

        \[\leadsto \frac{\color{blue}{1}}{\sqrt{x}} \cdot \left(y \cdot -0.3333333333333333\right) \]
      4. associate-*l/97.3%

        \[\leadsto \color{blue}{\frac{1 \cdot \left(y \cdot -0.3333333333333333\right)}{\sqrt{x}}} \]
      5. *-un-lft-identity97.3%

        \[\leadsto \frac{\color{blue}{y \cdot -0.3333333333333333}}{\sqrt{x}} \]
    8. Applied egg-rr97.3%

      \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{\sqrt{x}}} \]

    if -5.4999999999999996e83 < y < 5.1000000000000002e56

    1. Initial program 99.7%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
      2. distribute-frac-neg99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
      3. *-commutative99.7%

        \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      4. associate-/r*99.7%

        \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      5. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      6. neg-mul-199.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
      7. times-frac99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
      8. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
    4. Taylor expanded in y around 0 96.6%

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. cancel-sign-sub-inv96.6%

        \[\leadsto \color{blue}{1 + \left(-0.1111111111111111\right) \cdot \frac{1}{x}} \]
      2. metadata-eval96.6%

        \[\leadsto 1 + \color{blue}{-0.1111111111111111} \cdot \frac{1}{x} \]
      3. associate-*r/96.7%

        \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111 \cdot 1}{x}} \]
      4. metadata-eval96.7%

        \[\leadsto 1 + \frac{\color{blue}{-0.1111111111111111}}{x} \]
    6. Simplified96.7%

      \[\leadsto \color{blue}{1 + \frac{-0.1111111111111111}{x}} \]

    if 5.1000000000000002e56 < y

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. *-un-lft-identity99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{1 \cdot y}}{3 \cdot \sqrt{x}} \]
      2. *-commutative99.5%

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

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{y}{3}} \]
      4. pow1/299.4%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{1}{\color{blue}{{x}^{0.5}}} \cdot \frac{y}{3} \]
      5. pow-flip99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{\left(-0.5\right)}} \cdot \frac{y}{3} \]
      6. metadata-eval99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - {x}^{\color{blue}{-0.5}} \cdot \frac{y}{3} \]
    3. Applied egg-rr99.5%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{{x}^{-0.5} \cdot \frac{y}{3}} \]
    4. Taylor expanded in y around inf 85.4%

      \[\leadsto \color{blue}{-0.3333333333333333 \cdot \left(\sqrt{\frac{1}{x}} \cdot y\right)} \]
    5. Step-by-step derivation
      1. *-commutative85.4%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    6. Simplified85.4%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{x}} \cdot y\right) \cdot -0.3333333333333333} \]
    7. Step-by-step derivation
      1. expm1-log1p-u78.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{1}{x}} \cdot y\right)\right)} \cdot -0.3333333333333333 \]
      2. expm1-udef79.0%

        \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\frac{1}{x}} \cdot y\right)} - 1\right)} \cdot -0.3333333333333333 \]
      3. *-commutative79.0%

        \[\leadsto \left(e^{\mathsf{log1p}\left(\color{blue}{y \cdot \sqrt{\frac{1}{x}}}\right)} - 1\right) \cdot -0.3333333333333333 \]
      4. sqrt-div79.0%

        \[\leadsto \left(e^{\mathsf{log1p}\left(y \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{x}}}\right)} - 1\right) \cdot -0.3333333333333333 \]
      5. metadata-eval79.0%

        \[\leadsto \left(e^{\mathsf{log1p}\left(y \cdot \frac{\color{blue}{1}}{\sqrt{x}}\right)} - 1\right) \cdot -0.3333333333333333 \]
    8. Applied egg-rr79.0%

      \[\leadsto \color{blue}{\left(e^{\mathsf{log1p}\left(y \cdot \frac{1}{\sqrt{x}}\right)} - 1\right)} \cdot -0.3333333333333333 \]
    9. Step-by-step derivation
      1. expm1-def78.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(y \cdot \frac{1}{\sqrt{x}}\right)\right)} \cdot -0.3333333333333333 \]
      2. expm1-log1p85.3%

        \[\leadsto \color{blue}{\left(y \cdot \frac{1}{\sqrt{x}}\right)} \cdot -0.3333333333333333 \]
      3. associate-*r/85.4%

        \[\leadsto \color{blue}{\frac{y \cdot 1}{\sqrt{x}}} \cdot -0.3333333333333333 \]
      4. *-rgt-identity85.4%

        \[\leadsto \frac{\color{blue}{y}}{\sqrt{x}} \cdot -0.3333333333333333 \]
    10. Simplified85.4%

      \[\leadsto \color{blue}{\frac{y}{\sqrt{x}}} \cdot -0.3333333333333333 \]
  3. Recombined 3 regimes into one program.
  4. Final simplification94.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.5 \cdot 10^{+83}:\\ \;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{+56}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\ \end{array} \]

Alternative 13: 61.7% accurate, 22.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.11:\\ \;\;\;\;\frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x 0.11) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
	double tmp;
	if (x <= 0.11) {
		tmp = -0.1111111111111111 / x;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= 0.11d0) then
        tmp = (-0.1111111111111111d0) / x
    else
        tmp = 1.0d0
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= 0.11) {
		tmp = -0.1111111111111111 / x;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 0.11:
		tmp = -0.1111111111111111 / x
	else:
		tmp = 1.0
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= 0.11)
		tmp = Float64(-0.1111111111111111 / x);
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= 0.11)
		tmp = -0.1111111111111111 / x;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, 0.11], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\

\mathbf{else}:\\
\;\;\;\;1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 0.110000000000000001

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. sub-neg99.5%

        \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
      2. distribute-frac-neg99.5%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
      3. *-commutative99.5%

        \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      4. associate-/r*99.5%

        \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      5. metadata-eval99.5%

        \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      6. neg-mul-199.5%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
      7. times-frac99.5%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
      8. metadata-eval99.5%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
    4. Taylor expanded in x around 0 61.5%

      \[\leadsto \color{blue}{\frac{-0.1111111111111111}{x}} \]

    if 0.110000000000000001 < x

    1. Initial program 99.7%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Step-by-step derivation
      1. sub-neg99.7%

        \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
      2. distribute-frac-neg99.7%

        \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
      3. *-commutative99.7%

        \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      4. associate-/r*99.7%

        \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      5. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
      6. neg-mul-199.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
      7. times-frac99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
      8. metadata-eval99.7%

        \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
    3. Simplified99.7%

      \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
    4. Taylor expanded in x around inf 57.8%

      \[\leadsto \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.11:\\ \;\;\;\;\frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

Alternative 14: 62.6% accurate, 22.6× speedup?

\[\begin{array}{l} \\ 1 + \frac{-0.1111111111111111}{x} \end{array} \]
(FPCore (x y) :precision binary64 (+ 1.0 (/ -0.1111111111111111 x)))
double code(double x, double y) {
	return 1.0 + (-0.1111111111111111 / x);
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0 + ((-0.1111111111111111d0) / x)
end function
public static double code(double x, double y) {
	return 1.0 + (-0.1111111111111111 / x);
}
def code(x, y):
	return 1.0 + (-0.1111111111111111 / x)
function code(x, y)
	return Float64(1.0 + Float64(-0.1111111111111111 / x))
end
function tmp = code(x, y)
	tmp = 1.0 + (-0.1111111111111111 / x);
end
code[x_, y_] := N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
1 + \frac{-0.1111111111111111}{x}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
  2. Step-by-step derivation
    1. sub-neg99.6%

      \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
    2. distribute-frac-neg99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
    3. *-commutative99.6%

      \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    4. associate-/r*99.6%

      \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    5. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    6. neg-mul-199.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
    7. times-frac99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
    8. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
  3. Simplified99.6%

    \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
  4. Taylor expanded in y around 0 61.1%

    \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
  5. Step-by-step derivation
    1. cancel-sign-sub-inv61.1%

      \[\leadsto \color{blue}{1 + \left(-0.1111111111111111\right) \cdot \frac{1}{x}} \]
    2. metadata-eval61.1%

      \[\leadsto 1 + \color{blue}{-0.1111111111111111} \cdot \frac{1}{x} \]
    3. associate-*r/61.2%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111 \cdot 1}{x}} \]
    4. metadata-eval61.2%

      \[\leadsto 1 + \frac{\color{blue}{-0.1111111111111111}}{x} \]
  6. Simplified61.2%

    \[\leadsto \color{blue}{1 + \frac{-0.1111111111111111}{x}} \]
  7. Final simplification61.2%

    \[\leadsto 1 + \frac{-0.1111111111111111}{x} \]

Alternative 15: 31.6% accurate, 113.0× speedup?

\[\begin{array}{l} \\ 1 \end{array} \]
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
	return 1.0;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 1.0d0
end function
public static double code(double x, double y) {
	return 1.0;
}
def code(x, y):
	return 1.0
function code(x, y)
	return 1.0
end
function tmp = code(x, y)
	tmp = 1.0;
end
code[x_, y_] := 1.0
\begin{array}{l}

\\
1
\end{array}
Derivation
  1. Initial program 99.6%

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
  2. Step-by-step derivation
    1. sub-neg99.6%

      \[\leadsto \color{blue}{\left(1 - \frac{1}{x \cdot 9}\right) + \left(-\frac{y}{3 \cdot \sqrt{x}}\right)} \]
    2. distribute-frac-neg99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) + \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
    3. *-commutative99.6%

      \[\leadsto \left(1 - \frac{1}{\color{blue}{9 \cdot x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    4. associate-/r*99.6%

      \[\leadsto \left(1 - \color{blue}{\frac{\frac{1}{9}}{x}}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    5. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \frac{-y}{3 \cdot \sqrt{x}} \]
    6. neg-mul-199.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \frac{\color{blue}{-1 \cdot y}}{3 \cdot \sqrt{x}} \]
    7. times-frac99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{\frac{-1}{3} \cdot \frac{y}{\sqrt{x}}} \]
    8. metadata-eval99.6%

      \[\leadsto \left(1 - \frac{0.1111111111111111}{x}\right) + \color{blue}{-0.3333333333333333} \cdot \frac{y}{\sqrt{x}} \]
  3. Simplified99.6%

    \[\leadsto \color{blue}{\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}} \]
  4. Taylor expanded in x around inf 26.4%

    \[\leadsto \color{blue}{1} \]
  5. Final simplification26.4%

    \[\leadsto 1 \]

Developer target: 99.7% accurate, 1.0× speedup?

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

\\
\left(1 - \frac{\frac{1}{x}}{9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}

Reproduce

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