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

Percentage Accurate: 99.7% → 99.7%
Time: 8.7s
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{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}
Derivation
  1. Initial program 99.7%

    \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
  2. Final simplification99.7%

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

Alternative 2: 94.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+26}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\

\mathbf{else}:\\
\;\;\;\;1 + \sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)\\


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

    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. associate--l-99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.5%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.5%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{1}}{\sqrt{x}} \cdot \left(-0.3333333333333333 \cdot y\right)\right)} - 1\right) \]
      5. associate-*l/91.2%

        \[\leadsto 1 + \left(e^{\mathsf{log1p}\left(\color{blue}{\frac{1 \cdot \left(-0.3333333333333333 \cdot y\right)}{\sqrt{x}}}\right)} - 1\right) \]
      6. *-un-lft-identity91.2%

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

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

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

        \[\leadsto 1 + \color{blue}{\frac{-0.3333333333333333 \cdot y}{\sqrt{x}}} \]
      3. associate-/l*97.6%

        \[\leadsto 1 + \color{blue}{\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}} \]
    10. Simplified97.6%

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

    if -4.1000000000000003e48 < y < 9.50000000000000054e26

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 + \left(-\color{blue}{\left(\frac{y}{3 \cdot \sqrt{x}} + \frac{1}{x \cdot 9}\right)}\right) \]
      4. distribute-neg-in99.8%

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{\color{blue}{-0.3333333333333333}}{\sqrt{x}}, -\frac{1}{x \cdot 9}\right) \]
      12. *-commutative99.8%

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.7%

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

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

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. div-inv98.7%

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{0.1111111111111111}}} \]
      3. div-inv98.7%

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

        \[\leadsto 1 - \frac{1}{x \cdot \color{blue}{9}} \]
    6. Applied egg-rr98.7%

      \[\leadsto 1 - \color{blue}{\frac{1}{x \cdot 9}} \]

    if 9.50000000000000054e26 < y

    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. associate--l-99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{\color{blue}{-0.3333333333333333}}{\sqrt{x}}, -\frac{1}{x \cdot 9}\right) \]
      12. *-commutative99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\frac{1}{\color{blue}{9 \cdot x}}\right) \]
      13. associate-/r*99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.4%

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

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

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

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

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

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

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

      \[\leadsto 1 + \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(-0.3333333333333333 \cdot y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification96.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+48}:\\ \;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+26}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \mathbf{else}:\\ \;\;\;\;1 + \sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)\\ \end{array} \]

Alternative 3: 94.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.9e50 or 4.7999999999999999e30 < y

    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. associate--l-99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{\color{blue}{-0.3333333333333333}}{\sqrt{x}}, -\frac{1}{x \cdot 9}\right) \]
      12. *-commutative99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\frac{1}{\color{blue}{9 \cdot x}}\right) \]
      13. associate-/r*99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{1}}{\sqrt{x}} \cdot \left(-0.3333333333333333 \cdot y\right)\right)} - 1\right) \]
      5. associate-*l/48.0%

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

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

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

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

        \[\leadsto 1 + \color{blue}{\frac{-0.3333333333333333 \cdot y}{\sqrt{x}}} \]
      3. *-commutative92.5%

        \[\leadsto 1 + \frac{\color{blue}{y \cdot -0.3333333333333333}}{\sqrt{x}} \]
      4. associate-*r/92.3%

        \[\leadsto 1 + \color{blue}{y \cdot \frac{-0.3333333333333333}{\sqrt{x}}} \]
    10. Simplified92.3%

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

    if -2.9e50 < y < 4.7999999999999999e30

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 + \left(-\color{blue}{\left(\frac{y}{3 \cdot \sqrt{x}} + \frac{1}{x \cdot 9}\right)}\right) \]
      4. distribute-neg-in99.8%

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{\color{blue}{-0.3333333333333333}}{\sqrt{x}}, -\frac{1}{x \cdot 9}\right) \]
      12. *-commutative99.8%

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.7%

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

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

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. div-inv98.7%

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{0.1111111111111111}}} \]
      3. div-inv98.7%

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

        \[\leadsto 1 - \frac{1}{x \cdot \color{blue}{9}} \]
    6. Applied egg-rr98.7%

      \[\leadsto 1 - \color{blue}{\frac{1}{x \cdot 9}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.9%

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

Alternative 4: 94.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+37} \lor \neg \left(y \leq 4 \cdot 10^{+30}\right):\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.0999999999999998e37 or 4.0000000000000001e30 < y

    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. associate--l-99.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{\color{blue}{-0.3333333333333333}}{\sqrt{x}}, -\frac{1}{x \cdot 9}\right) \]
      12. *-commutative99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\frac{1}{\color{blue}{9 \cdot x}}\right) \]
      13. associate-/r*99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \left(e^{\mathsf{log1p}\left(\frac{\color{blue}{1}}{\sqrt{x}} \cdot \left(-0.3333333333333333 \cdot y\right)\right)} - 1\right) \]
      5. associate-*l/48.0%

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

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

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

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

        \[\leadsto 1 + \color{blue}{\frac{-0.3333333333333333 \cdot y}{\sqrt{x}}} \]
      3. associate-/l*92.4%

        \[\leadsto 1 + \color{blue}{\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}} \]
    10. Simplified92.4%

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

    if -4.0999999999999998e37 < y < 4.0000000000000001e30

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 + \left(-\color{blue}{\left(\frac{y}{3 \cdot \sqrt{x}} + \frac{1}{x \cdot 9}\right)}\right) \]
      4. distribute-neg-in99.8%

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{\color{blue}{-0.3333333333333333}}{\sqrt{x}}, -\frac{1}{x \cdot 9}\right) \]
      12. *-commutative99.8%

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.7%

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

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

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. div-inv98.7%

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{0.1111111111111111}}} \]
      3. div-inv98.7%

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

        \[\leadsto 1 - \frac{1}{x \cdot \color{blue}{9}} \]
    6. Applied egg-rr98.7%

      \[\leadsto 1 - \color{blue}{\frac{1}{x \cdot 9}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+37} \lor \neg \left(y \leq 4 \cdot 10^{+30}\right):\\ \;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \]

Alternative 5: 99.6% accurate, 1.0× speedup?

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

\\
1 - \left(\frac{0.1111111111111111}{x} + \frac{\frac{y}{3}}{\sqrt{x}}\right)
\end{array}
Derivation
  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. associate--l-99.7%

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

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

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

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

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

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

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

Alternative 6: 99.6% accurate, 1.0× speedup?

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

\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Derivation
  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. *-commutative99.7%

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

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

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

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

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

Alternative 7: 92.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+54} \lor \neg \left(y \leq 1.2 \cdot 10^{+104}\right):\\
\;\;\;\;\left(y \cdot -0.3333333333333333\right) \cdot {x}^{-0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.50000000000000003e54 or 1.2e104 < y

    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. associate--l-99.6%

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

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

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

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

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

      \[\leadsto 1 - \left(\color{blue}{\frac{0.1111111111111111}{x}} + \frac{\frac{y}{3}}{\sqrt{x}}\right) \]
    5. Taylor expanded in y around inf 96.7%

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

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

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

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

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

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

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

        \[\leadsto \left(-0.3333333333333333 \cdot y\right) \cdot \left(e^{\mathsf{log1p}\left({x}^{\color{blue}{-0.5}}\right)} - 1\right) \]
    9. Applied egg-rr50.4%

      \[\leadsto \left(-0.3333333333333333 \cdot y\right) \cdot \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} - 1\right)} \]
    10. Step-by-step derivation
      1. expm1-def95.4%

        \[\leadsto \left(-0.3333333333333333 \cdot y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({x}^{-0.5}\right)\right)} \]
      2. expm1-log1p96.9%

        \[\leadsto \left(-0.3333333333333333 \cdot y\right) \cdot \color{blue}{{x}^{-0.5}} \]
    11. Simplified96.9%

      \[\leadsto \left(-0.3333333333333333 \cdot y\right) \cdot \color{blue}{{x}^{-0.5}} \]

    if -2.50000000000000003e54 < y < 1.2e104

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 + \left(-\color{blue}{\left(\frac{y}{3 \cdot \sqrt{x}} + \frac{1}{x \cdot 9}\right)}\right) \]
      4. distribute-neg-in99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.7%

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

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

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. div-inv92.9%

        \[\leadsto 1 - \color{blue}{\frac{0.1111111111111111}{x}} \]
      2. clear-num92.9%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{0.1111111111111111}}} \]
      3. div-inv92.9%

        \[\leadsto 1 - \frac{1}{\color{blue}{x \cdot \frac{1}{0.1111111111111111}}} \]
      4. metadata-eval92.9%

        \[\leadsto 1 - \frac{1}{x \cdot \color{blue}{9}} \]
    6. Applied egg-rr92.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+54} \lor \neg \left(y \leq 1.2 \cdot 10^{+104}\right):\\ \;\;\;\;\left(y \cdot -0.3333333333333333\right) \cdot {x}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \]

Alternative 8: 92.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+54}:\\
\;\;\;\;\frac{-y}{3 \cdot \sqrt{x}}\\

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

\mathbf{else}:\\
\;\;\;\;\left(y \cdot -0.3333333333333333\right) \cdot {x}^{-0.5}\\


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

    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. associate--l-99.6%

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

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

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

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

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

      \[\leadsto 1 - \left(\color{blue}{\frac{0.1111111111111111}{x}} + \frac{\frac{y}{3}}{\sqrt{x}}\right) \]
    5. Taylor expanded in y around inf 95.7%

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

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

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

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{y}{\sqrt{x}}} \]
      5. frac-2neg95.9%

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{-y}{-\sqrt{x}}} \]
      6. associate-*r/95.9%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(-y\right)}{-\sqrt{x}}} \]
    9. Applied egg-rr95.9%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333 \cdot \left(-y\right)}{-\sqrt{x}}} \]
    10. Step-by-step derivation
      1. distribute-rgt-neg-out95.9%

        \[\leadsto \frac{\color{blue}{--0.3333333333333333 \cdot y}}{-\sqrt{x}} \]
      2. *-commutative95.9%

        \[\leadsto \frac{-\color{blue}{y \cdot -0.3333333333333333}}{-\sqrt{x}} \]
      3. distribute-frac-neg95.9%

        \[\leadsto \color{blue}{-\frac{y \cdot -0.3333333333333333}{-\sqrt{x}}} \]
      4. metadata-eval95.9%

        \[\leadsto -\frac{y \cdot \color{blue}{\left(-0.3333333333333333\right)}}{-\sqrt{x}} \]
      5. distribute-rgt-neg-in95.9%

        \[\leadsto -\frac{\color{blue}{-y \cdot 0.3333333333333333}}{-\sqrt{x}} \]
      6. distribute-lft-neg-out95.9%

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

        \[\leadsto -\color{blue}{\frac{-y}{\frac{-\sqrt{x}}{0.3333333333333333}}} \]
      8. associate-/r/95.9%

        \[\leadsto -\color{blue}{\frac{-y}{-\sqrt{x}} \cdot 0.3333333333333333} \]
      9. metadata-eval95.9%

        \[\leadsto -\frac{-y}{-\sqrt{x}} \cdot \color{blue}{\frac{1}{3}} \]
      10. times-frac95.9%

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

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

        \[\leadsto -\color{blue}{\frac{\frac{-y}{-\sqrt{x}}}{3}} \]
      13. neg-mul-195.9%

        \[\leadsto -\frac{\frac{\color{blue}{-1 \cdot y}}{-\sqrt{x}}}{3} \]
      14. neg-mul-195.9%

        \[\leadsto -\frac{\frac{-1 \cdot y}{\color{blue}{-1 \cdot \sqrt{x}}}}{3} \]
      15. times-frac95.9%

        \[\leadsto -\frac{\color{blue}{\frac{-1}{-1} \cdot \frac{y}{\sqrt{x}}}}{3} \]
      16. metadata-eval95.9%

        \[\leadsto -\frac{\color{blue}{1} \cdot \frac{y}{\sqrt{x}}}{3} \]
      17. *-lft-identity95.9%

        \[\leadsto -\frac{\color{blue}{\frac{y}{\sqrt{x}}}}{3} \]
      18. distribute-frac-neg95.9%

        \[\leadsto \color{blue}{\frac{-\frac{y}{\sqrt{x}}}{3}} \]
      19. distribute-frac-neg95.9%

        \[\leadsto \frac{\color{blue}{\frac{-y}{\sqrt{x}}}}{3} \]
      20. associate-/l/95.9%

        \[\leadsto \color{blue}{\frac{-y}{3 \cdot \sqrt{x}}} \]
      21. *-commutative95.9%

        \[\leadsto \frac{-y}{\color{blue}{\sqrt{x} \cdot 3}} \]
    11. Simplified95.9%

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

    if -2.29999999999999994e54 < y < 1.2e104

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 + \left(-\color{blue}{\left(\frac{y}{3 \cdot \sqrt{x}} + \frac{1}{x \cdot 9}\right)}\right) \]
      4. distribute-neg-in99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.7%

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

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

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. div-inv92.9%

        \[\leadsto 1 - \color{blue}{\frac{0.1111111111111111}{x}} \]
      2. clear-num92.9%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{0.1111111111111111}}} \]
      3. div-inv92.9%

        \[\leadsto 1 - \frac{1}{\color{blue}{x \cdot \frac{1}{0.1111111111111111}}} \]
      4. metadata-eval92.9%

        \[\leadsto 1 - \frac{1}{x \cdot \color{blue}{9}} \]
    6. Applied egg-rr92.9%

      \[\leadsto 1 - \color{blue}{\frac{1}{x \cdot 9}} \]

    if 1.2e104 < y

    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. associate--l-99.6%

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

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

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

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

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

      \[\leadsto 1 - \left(\color{blue}{\frac{0.1111111111111111}{x}} + \frac{\frac{y}{3}}{\sqrt{x}}\right) \]
    5. Taylor expanded in y around inf 98.1%

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

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

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

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

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

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

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

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

      \[\leadsto \left(-0.3333333333333333 \cdot y\right) \cdot \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5}\right)} - 1\right)} \]
    10. Step-by-step derivation
      1. expm1-def96.6%

        \[\leadsto \left(-0.3333333333333333 \cdot y\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({x}^{-0.5}\right)\right)} \]
      2. expm1-log1p98.3%

        \[\leadsto \left(-0.3333333333333333 \cdot y\right) \cdot \color{blue}{{x}^{-0.5}} \]
    11. Simplified98.3%

      \[\leadsto \left(-0.3333333333333333 \cdot y\right) \cdot \color{blue}{{x}^{-0.5}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification94.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+54}:\\ \;\;\;\;\frac{-y}{3 \cdot \sqrt{x}}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+104}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot -0.3333333333333333\right) \cdot {x}^{-0.5}\\ \end{array} \]

Alternative 9: 92.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+54} \lor \neg \left(y \leq 1.2 \cdot 10^{+104}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.50000000000000003e54 or 1.2e104 < y

    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. associate--l-99.6%

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

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

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

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

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

      \[\leadsto 1 - \left(\color{blue}{\frac{0.1111111111111111}{x}} + \frac{\frac{y}{3}}{\sqrt{x}}\right) \]
    5. Taylor expanded in y around inf 96.7%

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

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

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

        \[\leadsto y \cdot \left(\sqrt{\color{blue}{{x}^{-1}}} \cdot -0.3333333333333333\right) \]
      4. sqr-pow96.7%

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

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

        \[\leadsto y \cdot \left(\sqrt{{x}^{-0.5} \cdot {x}^{\color{blue}{-0.5}}} \cdot -0.3333333333333333\right) \]
      7. rem-sqrt-square96.7%

        \[\leadsto y \cdot \left(\color{blue}{\left|{x}^{-0.5}\right|} \cdot -0.3333333333333333\right) \]
      8. rem-square-sqrt96.5%

        \[\leadsto y \cdot \left(\left|\color{blue}{\sqrt{{x}^{-0.5}} \cdot \sqrt{{x}^{-0.5}}}\right| \cdot -0.3333333333333333\right) \]
      9. fabs-sqr96.5%

        \[\leadsto y \cdot \left(\color{blue}{\left(\sqrt{{x}^{-0.5}} \cdot \sqrt{{x}^{-0.5}}\right)} \cdot -0.3333333333333333\right) \]
      10. rem-square-sqrt96.7%

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

      \[\leadsto \color{blue}{y \cdot \left({x}^{-0.5} \cdot -0.3333333333333333\right)} \]
    8. Step-by-step derivation
      1. expm1-log1p-u47.3%

        \[\leadsto y \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({x}^{-0.5} \cdot -0.3333333333333333\right)\right)} \]
      2. expm1-udef2.1%

        \[\leadsto y \cdot \color{blue}{\left(e^{\mathsf{log1p}\left({x}^{-0.5} \cdot -0.3333333333333333\right)} - 1\right)} \]
      3. metadata-eval2.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{-0.3333333333333333}{\sqrt{x}}} \]
    11. Simplified96.7%

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

    if -2.50000000000000003e54 < y < 1.2e104

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 + \left(-\color{blue}{\left(\frac{y}{3 \cdot \sqrt{x}} + \frac{1}{x \cdot 9}\right)}\right) \]
      4. distribute-neg-in99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.7%

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

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

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. div-inv92.9%

        \[\leadsto 1 - \color{blue}{\frac{0.1111111111111111}{x}} \]
      2. clear-num92.9%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{0.1111111111111111}}} \]
      3. div-inv92.9%

        \[\leadsto 1 - \frac{1}{\color{blue}{x \cdot \frac{1}{0.1111111111111111}}} \]
      4. metadata-eval92.9%

        \[\leadsto 1 - \frac{1}{x \cdot \color{blue}{9}} \]
    6. Applied egg-rr92.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+54} \lor \neg \left(y \leq 1.2 \cdot 10^{+104}\right):\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \]

Alternative 10: 92.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+54} \lor \neg \left(y \leq 1.2 \cdot 10^{+104}\right):\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.0000000000000002e54 or 1.2e104 < y

    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. associate--l-99.6%

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

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

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

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

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

      \[\leadsto 1 - \left(\color{blue}{\frac{0.1111111111111111}{x}} + \frac{\frac{y}{3}}{\sqrt{x}}\right) \]
    5. Taylor expanded in y around inf 96.7%

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

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

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

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{y}{\sqrt{x}}} \]
      5. clear-num96.8%

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{1}{\frac{\sqrt{x}}{y}}} \]
      6. un-div-inv96.8%

        \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}} \]
    9. Applied egg-rr96.8%

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

    if -2.0000000000000002e54 < y < 1.2e104

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 + \left(-\color{blue}{\left(\frac{y}{3 \cdot \sqrt{x}} + \frac{1}{x \cdot 9}\right)}\right) \]
      4. distribute-neg-in99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.7%

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

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

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. div-inv92.9%

        \[\leadsto 1 - \color{blue}{\frac{0.1111111111111111}{x}} \]
      2. clear-num92.9%

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{0.1111111111111111}}} \]
      3. div-inv92.9%

        \[\leadsto 1 - \frac{1}{\color{blue}{x \cdot \frac{1}{0.1111111111111111}}} \]
      4. metadata-eval92.9%

        \[\leadsto 1 - \frac{1}{x \cdot \color{blue}{9}} \]
    6. Applied egg-rr92.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+54} \lor \neg \left(y \leq 1.2 \cdot 10^{+104}\right):\\ \;\;\;\;\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \]

Alternative 11: 64.9% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 1.4 \cdot 10^{+154}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{-0.1111111111111111}{x}}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y 1.4e+154)
   (+ 1.0 (/ -1.0 (* x 9.0)))
   (/
    (- 1.0 (/ 0.012345679012345678 (* x x)))
    (- 1.0 (/ -0.1111111111111111 x)))))
double code(double x, double y) {
	double tmp;
	if (y <= 1.4e+154) {
		tmp = 1.0 + (-1.0 / (x * 9.0));
	} else {
		tmp = (1.0 - (0.012345679012345678 / (x * x))) / (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 <= 1.4d+154) then
        tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
    else
        tmp = (1.0d0 - (0.012345679012345678d0 / (x * x))) / (1.0d0 - ((-0.1111111111111111d0) / x))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= 1.4e+154) {
		tmp = 1.0 + (-1.0 / (x * 9.0));
	} else {
		tmp = (1.0 - (0.012345679012345678 / (x * x))) / (1.0 - (-0.1111111111111111 / x));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= 1.4e+154:
		tmp = 1.0 + (-1.0 / (x * 9.0))
	else:
		tmp = (1.0 - (0.012345679012345678 / (x * x))) / (1.0 - (-0.1111111111111111 / x))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= 1.4e+154)
		tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0)));
	else
		tmp = Float64(Float64(1.0 - Float64(0.012345679012345678 / Float64(x * x))) / Float64(1.0 - Float64(-0.1111111111111111 / x)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= 1.4e+154)
		tmp = 1.0 + (-1.0 / (x * 9.0));
	else
		tmp = (1.0 - (0.012345679012345678 / (x * x))) / (1.0 - (-0.1111111111111111 / x));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, 1.4e+154], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(0.012345679012345678 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 1.4e154

    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. associate--l-99.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.6%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.6%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.6%

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

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

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    5. Step-by-step derivation
      1. div-inv68.6%

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{0.1111111111111111}}} \]
      3. div-inv68.6%

        \[\leadsto 1 - \frac{1}{\color{blue}{x \cdot \frac{1}{0.1111111111111111}}} \]
      4. metadata-eval68.6%

        \[\leadsto 1 - \frac{1}{x \cdot \color{blue}{9}} \]
    6. Applied egg-rr68.6%

      \[\leadsto 1 - \color{blue}{\frac{1}{x \cdot 9}} \]

    if 1.4e154 < y

    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. associate--l-99.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{\color{blue}{-0.3333333333333333}}{\sqrt{x}}, -\frac{1}{x \cdot 9}\right) \]
      12. *-commutative99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\frac{1}{\color{blue}{9 \cdot x}}\right) \]
      13. associate-/r*99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.4%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.4%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-0.1111111111111111}{x} + 1} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.1111111111111111}{x}} \cdot \sqrt{\frac{-0.1111111111111111}{x}}} + 1 \]
      2. sqrt-unprod0.7%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.1111111111111111}{x} \cdot \frac{-0.1111111111111111}{x}}} + 1 \]
      3. frac-times0.7%

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

        \[\leadsto \sqrt{\frac{\color{blue}{0.012345679012345678}}{x \cdot x}} + 1 \]
      5. metadata-eval0.7%

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

        \[\leadsto \sqrt{\color{blue}{\frac{0.1111111111111111}{x} \cdot \frac{0.1111111111111111}{x}}} + 1 \]
      7. pow10.7%

        \[\leadsto \sqrt{\color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{1}} \cdot \frac{0.1111111111111111}{x}} + 1 \]
      8. pow10.7%

        \[\leadsto \sqrt{{\left(\frac{0.1111111111111111}{x}\right)}^{1} \cdot \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{1}}} + 1 \]
      9. pow-prod-up0.7%

        \[\leadsto \sqrt{\color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{\left(1 + 1\right)}}} + 1 \]
      10. clear-num0.7%

        \[\leadsto \sqrt{{\color{blue}{\left(\frac{1}{\frac{x}{0.1111111111111111}}\right)}}^{\left(1 + 1\right)}} + 1 \]
      11. div-inv0.7%

        \[\leadsto \sqrt{{\left(\frac{1}{\color{blue}{x \cdot \frac{1}{0.1111111111111111}}}\right)}^{\left(1 + 1\right)}} + 1 \]
      12. metadata-eval0.7%

        \[\leadsto \sqrt{{\left(\frac{1}{x \cdot \color{blue}{9}}\right)}^{\left(1 + 1\right)}} + 1 \]
      13. pow-plus0.7%

        \[\leadsto \sqrt{\color{blue}{{\left(\frac{1}{x \cdot 9}\right)}^{1} \cdot \frac{1}{x \cdot 9}}} + 1 \]
      14. pow10.7%

        \[\leadsto \sqrt{\color{blue}{\frac{1}{x \cdot 9}} \cdot \frac{1}{x \cdot 9}} + 1 \]
      15. sqrt-unprod0.7%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{x \cdot 9}} \cdot \sqrt{\frac{1}{x \cdot 9}}} + 1 \]
      16. add-sqr-sqrt0.7%

        \[\leadsto \color{blue}{\frac{1}{x \cdot 9}} + 1 \]
      17. inv-pow0.7%

        \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{-1}} + 1 \]
    8. Applied egg-rr0.7%

      \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{-1}} + 1 \]
    9. Step-by-step derivation
      1. unpow-10.7%

        \[\leadsto \color{blue}{\frac{1}{x \cdot 9}} + 1 \]
    10. Simplified0.7%

      \[\leadsto \color{blue}{\frac{1}{x \cdot 9}} + 1 \]
    11. Step-by-step derivation
      1. +-commutative0.7%

        \[\leadsto \color{blue}{1 + \frac{1}{x \cdot 9}} \]
      2. flip-+0.7%

        \[\leadsto \color{blue}{\frac{1 \cdot 1 - \frac{1}{x \cdot 9} \cdot \frac{1}{x \cdot 9}}{1 - \frac{1}{x \cdot 9}}} \]
      3. metadata-eval0.7%

        \[\leadsto \frac{\color{blue}{1} - \frac{1}{x \cdot 9} \cdot \frac{1}{x \cdot 9}}{1 - \frac{1}{x \cdot 9}} \]
      4. pow20.7%

        \[\leadsto \frac{1 - \color{blue}{{\left(\frac{1}{x \cdot 9}\right)}^{2}}}{1 - \frac{1}{x \cdot 9}} \]
      5. *-commutative0.7%

        \[\leadsto \frac{1 - {\left(\frac{1}{\color{blue}{9 \cdot x}}\right)}^{2}}{1 - \frac{1}{x \cdot 9}} \]
      6. associate-/r*0.7%

        \[\leadsto \frac{1 - {\color{blue}{\left(\frac{\frac{1}{9}}{x}\right)}}^{2}}{1 - \frac{1}{x \cdot 9}} \]
      7. metadata-eval0.7%

        \[\leadsto \frac{1 - {\left(\frac{\color{blue}{0.1111111111111111}}{x}\right)}^{2}}{1 - \frac{1}{x \cdot 9}} \]
      8. metadata-eval0.7%

        \[\leadsto \frac{1 - {\left(\frac{\color{blue}{--0.1111111111111111}}{x}\right)}^{2}}{1 - \frac{1}{x \cdot 9}} \]
      9. remove-double-neg0.7%

        \[\leadsto \frac{1 - {\left(\frac{--0.1111111111111111}{\color{blue}{-\left(-x\right)}}\right)}^{2}}{1 - \frac{1}{x \cdot 9}} \]
      10. frac-2neg0.7%

        \[\leadsto \frac{1 - {\color{blue}{\left(\frac{-0.1111111111111111}{-x}\right)}}^{2}}{1 - \frac{1}{x \cdot 9}} \]
      11. pow20.7%

        \[\leadsto \frac{1 - \color{blue}{\frac{-0.1111111111111111}{-x} \cdot \frac{-0.1111111111111111}{-x}}}{1 - \frac{1}{x \cdot 9}} \]
      12. frac-times0.7%

        \[\leadsto \frac{1 - \color{blue}{\frac{-0.1111111111111111 \cdot -0.1111111111111111}{\left(-x\right) \cdot \left(-x\right)}}}{1 - \frac{1}{x \cdot 9}} \]
      13. metadata-eval0.7%

        \[\leadsto \frac{1 - \frac{\color{blue}{0.012345679012345678}}{\left(-x\right) \cdot \left(-x\right)}}{1 - \frac{1}{x \cdot 9}} \]
      14. sqr-neg0.7%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{\color{blue}{x \cdot x}}}{1 - \frac{1}{x \cdot 9}} \]
      15. *-commutative0.7%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{1}{\color{blue}{9 \cdot x}}} \]
      16. associate-/r*0.7%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \color{blue}{\frac{\frac{1}{9}}{x}}} \]
      17. metadata-eval0.7%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{\color{blue}{0.1111111111111111}}{x}} \]
      18. metadata-eval0.7%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{\color{blue}{\frac{-0.1111111111111111}{-1}}}{x}} \]
      19. associate-/r*0.7%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \color{blue}{\frac{-0.1111111111111111}{-1 \cdot x}}} \]
      20. neg-mul-10.7%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{-0.1111111111111111}{\color{blue}{-x}}} \]
      21. add-sqr-sqrt0.0%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{-0.1111111111111111}{\color{blue}{\sqrt{-x} \cdot \sqrt{-x}}}} \]
      22. sqrt-unprod1.5%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{-0.1111111111111111}{\color{blue}{\sqrt{\left(-x\right) \cdot \left(-x\right)}}}} \]
      23. sqr-neg1.5%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{-0.1111111111111111}{\sqrt{\color{blue}{x \cdot x}}}} \]
      24. sqrt-unprod25.5%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{-0.1111111111111111}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}} \]
      25. add-sqr-sqrt25.5%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{-0.1111111111111111}{\color{blue}{x}}} \]
    12. Applied egg-rr25.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 1.4 \cdot 10^{+154}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 - \frac{-0.1111111111111111}{x}}\\ \end{array} \]

Alternative 12: 62.7% accurate, 16.1× speedup?

\[\begin{array}{l} \\ 1 + \frac{-1}{x \cdot 9} \end{array} \]
(FPCore (x y) :precision binary64 (+ 1.0 (/ -1.0 (* x 9.0))))
double code(double x, double y) {
	return 1.0 + (-1.0 / (x * 9.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))
end function
public static double code(double x, double y) {
	return 1.0 + (-1.0 / (x * 9.0));
}
def code(x, y):
	return 1.0 + (-1.0 / (x * 9.0))
function code(x, y)
	return Float64(1.0 + Float64(-1.0 / Float64(x * 9.0)))
end
function tmp = code(x, y)
	tmp = 1.0 + (-1.0 / (x * 9.0));
end
code[x_, y_] := N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
1 + \frac{-1}{x \cdot 9}
\end{array}
Derivation
  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. associate--l-99.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
    14. distribute-neg-frac99.6%

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
    15. metadata-eval99.6%

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
    16. metadata-eval99.6%

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

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

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

      \[\leadsto 1 - \color{blue}{\frac{0.1111111111111111}{x}} \]
    2. clear-num61.0%

      \[\leadsto 1 - \color{blue}{\frac{1}{\frac{x}{0.1111111111111111}}} \]
    3. div-inv61.0%

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

      \[\leadsto 1 - \frac{1}{x \cdot \color{blue}{9}} \]
  6. Applied egg-rr61.0%

    \[\leadsto 1 - \color{blue}{\frac{1}{x \cdot 9}} \]
  7. Final simplification61.0%

    \[\leadsto 1 + \frac{-1}{x \cdot 9} \]

Alternative 13: 61.5% accurate, 22.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 10:\\ \;\;\;\;\frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x 10.0) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
	double tmp;
	if (x <= 10.0) {
		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 <= 10.0d0) 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 <= 10.0) {
		tmp = -0.1111111111111111 / x;
	} else {
		tmp = 1.0;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 10.0:
		tmp = -0.1111111111111111 / x
	else:
		tmp = 1.0
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= 10.0)
		tmp = Float64(-0.1111111111111111 / x);
	else
		tmp = 1.0;
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= 10.0)
		tmp = -0.1111111111111111 / x;
	else
		tmp = 1.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, 10.0], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}

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

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


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

    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. associate--l-99.6%

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

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

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

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

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

      \[\leadsto 1 - \left(\color{blue}{\frac{0.1111111111111111}{x}} + \frac{\frac{y}{3}}{\sqrt{x}}\right) \]
    5. Taylor expanded in x around 0 60.2%

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

    if 10 < x

    1. Initial program 99.8%

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

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

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

        \[\leadsto 1 + \left(-\color{blue}{\left(\frac{y}{3 \cdot \sqrt{x}} + \frac{1}{x \cdot 9}\right)}\right) \]
      4. distribute-neg-in99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      14. distribute-neg-frac99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
      15. metadata-eval99.7%

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      16. metadata-eval99.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10:\\ \;\;\;\;\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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
    14. distribute-neg-frac99.6%

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
    15. metadata-eval99.6%

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
    16. metadata-eval99.6%

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

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

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

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

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

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

      \[\leadsto 1 + \frac{\color{blue}{-0.1111111111111111}}{x} \]
    5. +-commutative61.0%

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

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

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

Alternative 15: 31.1% 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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, -\color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
    14. distribute-neg-frac99.6%

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \color{blue}{\frac{-\frac{1}{9}}{x}}\right) \]
    15. metadata-eval99.6%

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
    16. metadata-eval99.6%

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

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

    \[\leadsto \color{blue}{1} \]
  5. Final simplification29.2%

    \[\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 2023224 
(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)))))