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

Percentage Accurate: 99.7% → 99.7%
Time: 11.0s
Alternatives: 14
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 14 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{\frac{y}{3}}{{x}^{0.5}} \end{array} \]
(FPCore (x y)
 :precision binary64
 (- (+ 1.0 (/ -1.0 (* x 9.0))) (/ (/ y 3.0) (pow x 0.5))))
double code(double x, double y) {
	return (1.0 + (-1.0 / (x * 9.0))) - ((y / 3.0) / pow(x, 0.5));
}
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) / (x ** 0.5d0))
end function
public static double code(double x, double y) {
	return (1.0 + (-1.0 / (x * 9.0))) - ((y / 3.0) / Math.pow(x, 0.5));
}
def code(x, y):
	return (1.0 + (-1.0 / (x * 9.0))) - ((y / 3.0) / math.pow(x, 0.5))
function code(x, y)
	return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64(Float64(y / 3.0) / (x ^ 0.5)))
end
function tmp = code(x, y)
	tmp = (1.0 + (-1.0 / (x * 9.0))) - ((y / 3.0) / (x ^ 0.5));
end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y / 3.0), $MachinePrecision] / N[Power[x, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

Alternative 2: 95.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+78} \lor \neg \left(y \leq 4.6 \cdot 10^{+50}\right):\\ \;\;\;\;1 - \frac{{x}^{-0.5}}{\frac{3}{y}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (or (<= y -1.95e+78) (not (<= y 4.6e+50)))
   (- 1.0 (/ (pow x -0.5) (/ 3.0 y)))
   (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
	double tmp;
	if ((y <= -1.95e+78) || !(y <= 4.6e+50)) {
		tmp = 1.0 - (pow(x, -0.5) / (3.0 / 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 <= (-1.95d+78)) .or. (.not. (y <= 4.6d+50))) then
        tmp = 1.0d0 - ((x ** (-0.5d0)) / (3.0d0 / 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 <= -1.95e+78) || !(y <= 4.6e+50)) {
		tmp = 1.0 - (Math.pow(x, -0.5) / (3.0 / y));
	} else {
		tmp = 1.0 + (-1.0 / (x * 9.0));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if (y <= -1.95e+78) or not (y <= 4.6e+50):
		tmp = 1.0 - (math.pow(x, -0.5) / (3.0 / y))
	else:
		tmp = 1.0 + (-1.0 / (x * 9.0))
	return tmp
function code(x, y)
	tmp = 0.0
	if ((y <= -1.95e+78) || !(y <= 4.6e+50))
		tmp = Float64(1.0 - Float64((x ^ -0.5) / Float64(3.0 / 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 <= -1.95e+78) || ~((y <= 4.6e+50)))
		tmp = 1.0 - ((x ^ -0.5) / (3.0 / y));
	else
		tmp = 1.0 + (-1.0 / (x * 9.0));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[Or[LessEqual[y, -1.95e+78], N[Not[LessEqual[y, 4.6e+50]], $MachinePrecision]], N[(1.0 - N[(N[Power[x, -0.5], $MachinePrecision] / N[(3.0 / 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 -1.95 \cdot 10^{+78} \lor \neg \left(y \leq 4.6 \cdot 10^{+50}\right):\\
\;\;\;\;1 - \frac{{x}^{-0.5}}{\frac{3}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.9500000000000002e78 or 4.59999999999999994e50 < y

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 93.7%

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

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

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

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

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

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

        \[\leadsto 1 - \frac{\color{blue}{\sqrt{\frac{1}{x}}}}{\frac{3}{y}} \]
      7. inv-pow93.9%

        \[\leadsto 1 - \frac{\sqrt{\color{blue}{{x}^{-1}}}}{\frac{3}{y}} \]
      8. sqrt-pow193.9%

        \[\leadsto 1 - \frac{\color{blue}{{x}^{\left(\frac{-1}{2}\right)}}}{\frac{3}{y}} \]
      9. metadata-eval93.9%

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

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

    if -1.9500000000000002e78 < y < 4.59999999999999994e50

    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-frac-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      17. 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. Add Preprocessing
    5. Taylor expanded in y around 0 96.9%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
    6. Step-by-step derivation
      1. clear-num96.9%

        \[\leadsto 1 + \color{blue}{\frac{1}{\frac{x}{-0.1111111111111111}}} \]
      2. div-inv97.0%

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

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

        \[\leadsto 1 + \frac{1}{x \cdot \color{blue}{\left(-9\right)}} \]
      5. distribute-rgt-neg-in97.0%

        \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
      6. distribute-neg-frac297.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
      7. distribute-neg-frac97.0%

        \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
      8. metadata-eval97.0%

        \[\leadsto 1 + \frac{\color{blue}{-1}}{x \cdot 9} \]
    7. Applied egg-rr97.0%

      \[\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 -1.95 \cdot 10^{+78} \lor \neg \left(y \leq 4.6 \cdot 10^{+50}\right):\\ \;\;\;\;1 - \frac{{x}^{-0.5}}{\frac{3}{y}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 95.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+78} \lor \neg \left(y \leq 3.5 \cdot 10^{+50}\right):\\ \;\;\;\;1 - \frac{y \cdot 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+78) (not (<= y 3.5e+50)))
   (- 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.5e+78) || !(y <= 3.5e+50)) {
		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.5d+78)) .or. (.not. (y <= 3.5d+50))) 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.5e+78) || !(y <= 3.5e+50)) {
		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.5e+78) or not (y <= 3.5e+50):
		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.5e+78) || !(y <= 3.5e+50))
		tmp = Float64(1.0 - Float64(Float64(y * 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+78) || ~((y <= 3.5e+50)))
		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.5e+78], N[Not[LessEqual[y, 3.5e+50]], $MachinePrecision]], N[(1.0 - N[(N[(y * 0.3333333333333333), $MachinePrecision] / 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^{+78} \lor \neg \left(y \leq 3.5 \cdot 10^{+50}\right):\\
\;\;\;\;1 - \frac{y \cdot 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.49999999999999992e78 or 3.50000000000000006e50 < y

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 93.7%

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{3}{y}}} \cdot \sqrt{\frac{1}{x}} \]
      5. clear-num93.9%

        \[\leadsto 1 - \color{blue}{\frac{y}{3}} \cdot \sqrt{\frac{1}{x}} \]
      6. sqrt-div93.8%

        \[\leadsto 1 - \frac{y}{3} \cdot \color{blue}{\frac{\sqrt{1}}{\sqrt{x}}} \]
      7. metadata-eval93.8%

        \[\leadsto 1 - \frac{y}{3} \cdot \frac{\color{blue}{1}}{\sqrt{x}} \]
      8. div-inv93.9%

        \[\leadsto 1 - \color{blue}{\frac{\frac{y}{3}}{\sqrt{x}}} \]
      9. pow1/293.9%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{{x}^{0.5}}} \]
      10. div-inv93.8%

        \[\leadsto 1 - \frac{\color{blue}{y \cdot \frac{1}{3}}}{{x}^{0.5}} \]
      11. metadata-eval93.8%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{0.3333333333333333}}{{x}^{0.5}} \]
    5. Applied egg-rr93.8%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot 0.3333333333333333}{{x}^{0.5}}} \]
    6. Step-by-step derivation
      1. pow1/293.8%

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

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

    if -2.49999999999999992e78 < y < 3.50000000000000006e50

    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-frac-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      17. 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. Add Preprocessing
    5. Taylor expanded in y around 0 96.9%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
    6. Step-by-step derivation
      1. clear-num96.9%

        \[\leadsto 1 + \color{blue}{\frac{1}{\frac{x}{-0.1111111111111111}}} \]
      2. div-inv97.0%

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

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

        \[\leadsto 1 + \frac{1}{x \cdot \color{blue}{\left(-9\right)}} \]
      5. distribute-rgt-neg-in97.0%

        \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
      6. distribute-neg-frac297.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
      7. distribute-neg-frac97.0%

        \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
      8. metadata-eval97.0%

        \[\leadsto 1 + \frac{\color{blue}{-1}}{x \cdot 9} \]
    7. Applied egg-rr97.0%

      \[\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.5 \cdot 10^{+78} \lor \neg \left(y \leq 3.5 \cdot 10^{+50}\right):\\ \;\;\;\;1 - \frac{y \cdot 0.3333333333333333}{\sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 95.0% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.6199999999999999e78 or 1.35e50 < y

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 93.7%

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

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

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

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

        \[\leadsto 1 - 0.3333333333333333 \cdot \color{blue}{\frac{y}{\sqrt{x}}} \]
      5. pow1/293.8%

        \[\leadsto 1 - 0.3333333333333333 \cdot \frac{y}{\color{blue}{{x}^{0.5}}} \]
    5. Applied egg-rr93.8%

      \[\leadsto 1 - 0.3333333333333333 \cdot \color{blue}{\frac{y}{{x}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/293.8%

        \[\leadsto 1 - 0.3333333333333333 \cdot \frac{y}{\color{blue}{\sqrt{x}}} \]
    7. Simplified93.8%

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

    if -1.6199999999999999e78 < y < 1.35e50

    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-frac-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      17. 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. Add Preprocessing
    5. Taylor expanded in y around 0 96.9%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
    6. Step-by-step derivation
      1. clear-num96.9%

        \[\leadsto 1 + \color{blue}{\frac{1}{\frac{x}{-0.1111111111111111}}} \]
      2. div-inv97.0%

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

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

        \[\leadsto 1 + \frac{1}{x \cdot \color{blue}{\left(-9\right)}} \]
      5. distribute-rgt-neg-in97.0%

        \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
      6. distribute-neg-frac297.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
      7. distribute-neg-frac97.0%

        \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
      8. metadata-eval97.0%

        \[\leadsto 1 + \frac{\color{blue}{-1}}{x \cdot 9} \]
    7. Applied egg-rr97.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.62 \cdot 10^{+78} \lor \neg \left(y \leq 1.35 \cdot 10^{+50}\right):\\ \;\;\;\;1 - 0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 93.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+80} \lor \neg \left(y \leq 8.6 \cdot 10^{+70}\right):\\ \;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (or (<= y -2.15e+80) (not (<= y 8.6e+70)))
   (* -0.3333333333333333 (* y (sqrt (/ 1.0 x))))
   (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
	double tmp;
	if ((y <= -2.15e+80) || !(y <= 8.6e+70)) {
		tmp = -0.3333333333333333 * (y * sqrt((1.0 / 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.15d+80)) .or. (.not. (y <= 8.6d+70))) then
        tmp = (-0.3333333333333333d0) * (y * sqrt((1.0d0 / 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.15e+80) || !(y <= 8.6e+70)) {
		tmp = -0.3333333333333333 * (y * Math.sqrt((1.0 / x)));
	} else {
		tmp = 1.0 + (-1.0 / (x * 9.0));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if (y <= -2.15e+80) or not (y <= 8.6e+70):
		tmp = -0.3333333333333333 * (y * math.sqrt((1.0 / x)))
	else:
		tmp = 1.0 + (-1.0 / (x * 9.0))
	return tmp
function code(x, y)
	tmp = 0.0
	if ((y <= -2.15e+80) || !(y <= 8.6e+70))
		tmp = Float64(-0.3333333333333333 * Float64(y * sqrt(Float64(1.0 / 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.15e+80) || ~((y <= 8.6e+70)))
		tmp = -0.3333333333333333 * (y * sqrt((1.0 / x)));
	else
		tmp = 1.0 + (-1.0 / (x * 9.0));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[Or[LessEqual[y, -2.15e+80], N[Not[LessEqual[y, 8.6e+70]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y * N[Sqrt[N[(1.0 / 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.15 \cdot 10^{+80} \lor \neg \left(y \leq 8.6 \cdot 10^{+70}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.15000000000000002e80 or 8.6000000000000002e70 < y

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 87.7%

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

    if -2.15000000000000002e80 < y < 8.6000000000000002e70

    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-frac-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      17. 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. Add Preprocessing
    5. Taylor expanded in y around 0 95.7%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
    6. Step-by-step derivation
      1. clear-num95.7%

        \[\leadsto 1 + \color{blue}{\frac{1}{\frac{x}{-0.1111111111111111}}} \]
      2. div-inv95.8%

        \[\leadsto 1 + \frac{1}{\color{blue}{x \cdot \frac{1}{-0.1111111111111111}}} \]
      3. metadata-eval95.8%

        \[\leadsto 1 + \frac{1}{x \cdot \color{blue}{-9}} \]
      4. metadata-eval95.8%

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

        \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
      6. distribute-neg-frac295.8%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
      7. distribute-neg-frac95.8%

        \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
      8. metadata-eval95.8%

        \[\leadsto 1 + \frac{\color{blue}{-1}}{x \cdot 9} \]
    7. Applied egg-rr95.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+80} \lor \neg \left(y \leq 8.6 \cdot 10^{+70}\right):\\ \;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 95.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 94.8%

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{3}{y}}} \cdot \sqrt{\frac{1}{x}} \]
      5. clear-num95.1%

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

        \[\leadsto 1 - \color{blue}{\frac{y \cdot \sqrt{\frac{1}{x}}}{3}} \]
      7. inv-pow94.9%

        \[\leadsto 1 - \frac{y \cdot \sqrt{\color{blue}{{x}^{-1}}}}{3} \]
      8. sqrt-pow195.1%

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

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

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

    if -4.79999999999999971e79 < y < 1.4999999999999999e50

    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-frac-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      17. 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. Add Preprocessing
    5. Taylor expanded in y around 0 96.9%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
    6. Step-by-step derivation
      1. clear-num96.9%

        \[\leadsto 1 + \color{blue}{\frac{1}{\frac{x}{-0.1111111111111111}}} \]
      2. div-inv97.0%

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

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

        \[\leadsto 1 + \frac{1}{x \cdot \color{blue}{\left(-9\right)}} \]
      5. distribute-rgt-neg-in97.0%

        \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
      6. distribute-neg-frac297.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
      7. distribute-neg-frac97.0%

        \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
      8. metadata-eval97.0%

        \[\leadsto 1 + \frac{\color{blue}{-1}}{x \cdot 9} \]
    7. Applied egg-rr97.0%

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

    if 1.4999999999999999e50 < y

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 92.8%

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{3}{y}}} \cdot \sqrt{\frac{1}{x}} \]
      5. clear-num92.8%

        \[\leadsto 1 - \color{blue}{\frac{y}{3}} \cdot \sqrt{\frac{1}{x}} \]
      6. sqrt-div92.7%

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

        \[\leadsto 1 - \frac{y}{3} \cdot \frac{\color{blue}{1}}{\sqrt{x}} \]
      8. div-inv92.7%

        \[\leadsto 1 - \color{blue}{\frac{\frac{y}{3}}{\sqrt{x}}} \]
      9. pow1/292.7%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{{x}^{0.5}}} \]
      10. div-inv92.8%

        \[\leadsto 1 - \frac{\color{blue}{y \cdot \frac{1}{3}}}{{x}^{0.5}} \]
      11. metadata-eval92.8%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{0.3333333333333333}}{{x}^{0.5}} \]
    5. Applied egg-rr92.8%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot 0.3333333333333333}{{x}^{0.5}}} \]
    6. Step-by-step derivation
      1. pow1/292.8%

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

      \[\leadsto 1 - \color{blue}{\frac{y \cdot 0.3333333333333333}{\sqrt{x}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 7: 95.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 94.8%

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{3}{y}}} \cdot \sqrt{\frac{1}{x}} \]
      5. clear-num95.1%

        \[\leadsto 1 - \color{blue}{\frac{y}{3}} \cdot \sqrt{\frac{1}{x}} \]
      6. sqrt-div94.9%

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

        \[\leadsto 1 - \frac{y}{3} \cdot \frac{\color{blue}{1}}{\sqrt{x}} \]
      8. div-inv95.1%

        \[\leadsto 1 - \color{blue}{\frac{\frac{y}{3}}{\sqrt{x}}} \]
      9. pow1/295.1%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{{x}^{0.5}}} \]
      10. div-inv95.0%

        \[\leadsto 1 - \frac{\color{blue}{y \cdot \frac{1}{3}}}{{x}^{0.5}} \]
      11. metadata-eval95.0%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{0.3333333333333333}}{{x}^{0.5}} \]
    5. Applied egg-rr95.0%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot 0.3333333333333333}{{x}^{0.5}}} \]
    6. Step-by-step derivation
      1. metadata-eval95.0%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{\frac{1}{3}}}{{x}^{0.5}} \]
      2. div-inv95.1%

        \[\leadsto 1 - \frac{\color{blue}{\frac{y}{3}}}{{x}^{0.5}} \]
      3. pow1/295.1%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{\sqrt{x}}} \]
      4. associate-/l/95.0%

        \[\leadsto 1 - \color{blue}{\frac{y}{\sqrt{x} \cdot 3}} \]
      5. associate-/r*95.0%

        \[\leadsto 1 - \color{blue}{\frac{\frac{y}{\sqrt{x}}}{3}} \]
    7. Applied egg-rr95.0%

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

    if -1.9500000000000002e78 < y < 1.2000000000000001e50

    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-frac-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      17. 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. Add Preprocessing
    5. Taylor expanded in y around 0 96.9%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
    6. Step-by-step derivation
      1. clear-num96.9%

        \[\leadsto 1 + \color{blue}{\frac{1}{\frac{x}{-0.1111111111111111}}} \]
      2. div-inv97.0%

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

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

        \[\leadsto 1 + \frac{1}{x \cdot \color{blue}{\left(-9\right)}} \]
      5. distribute-rgt-neg-in97.0%

        \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
      6. distribute-neg-frac297.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
      7. distribute-neg-frac97.0%

        \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
      8. metadata-eval97.0%

        \[\leadsto 1 + \frac{\color{blue}{-1}}{x \cdot 9} \]
    7. Applied egg-rr97.0%

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

    if 1.2000000000000001e50 < y

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 92.8%

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{3}{y}}} \cdot \sqrt{\frac{1}{x}} \]
      5. clear-num92.8%

        \[\leadsto 1 - \color{blue}{\frac{y}{3}} \cdot \sqrt{\frac{1}{x}} \]
      6. sqrt-div92.7%

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

        \[\leadsto 1 - \frac{y}{3} \cdot \frac{\color{blue}{1}}{\sqrt{x}} \]
      8. div-inv92.7%

        \[\leadsto 1 - \color{blue}{\frac{\frac{y}{3}}{\sqrt{x}}} \]
      9. pow1/292.7%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{{x}^{0.5}}} \]
      10. div-inv92.8%

        \[\leadsto 1 - \frac{\color{blue}{y \cdot \frac{1}{3}}}{{x}^{0.5}} \]
      11. metadata-eval92.8%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{0.3333333333333333}}{{x}^{0.5}} \]
    5. Applied egg-rr92.8%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot 0.3333333333333333}{{x}^{0.5}}} \]
    6. Step-by-step derivation
      1. pow1/292.8%

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

      \[\leadsto 1 - \color{blue}{\frac{y \cdot 0.3333333333333333}{\sqrt{x}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 95.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.62 \cdot 10^{+78}:\\ \;\;\;\;1 - \frac{y}{3 \cdot \sqrt{x}}\\ \mathbf{elif}\;y \leq 2.25 \cdot 10^{+51}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \mathbf{else}:\\ \;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= y -1.62e+78)
   (- 1.0 (/ y (* 3.0 (sqrt x))))
   (if (<= y 2.25e+51)
     (+ 1.0 (/ -1.0 (* x 9.0)))
     (- 1.0 (/ y (sqrt (* x 9.0)))))))
double code(double x, double y) {
	double tmp;
	if (y <= -1.62e+78) {
		tmp = 1.0 - (y / (3.0 * sqrt(x)));
	} else if (y <= 2.25e+51) {
		tmp = 1.0 + (-1.0 / (x * 9.0));
	} else {
		tmp = 1.0 - (y / sqrt((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 <= (-1.62d+78)) then
        tmp = 1.0d0 - (y / (3.0d0 * sqrt(x)))
    else if (y <= 2.25d+51) then
        tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
    else
        tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (y <= -1.62e+78) {
		tmp = 1.0 - (y / (3.0 * Math.sqrt(x)));
	} else if (y <= 2.25e+51) {
		tmp = 1.0 + (-1.0 / (x * 9.0));
	} else {
		tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if y <= -1.62e+78:
		tmp = 1.0 - (y / (3.0 * math.sqrt(x)))
	elif y <= 2.25e+51:
		tmp = 1.0 + (-1.0 / (x * 9.0))
	else:
		tmp = 1.0 - (y / math.sqrt((x * 9.0)))
	return tmp
function code(x, y)
	tmp = 0.0
	if (y <= -1.62e+78)
		tmp = Float64(1.0 - Float64(y / Float64(3.0 * sqrt(x))));
	elseif (y <= 2.25e+51)
		tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0)));
	else
		tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0))));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (y <= -1.62e+78)
		tmp = 1.0 - (y / (3.0 * sqrt(x)));
	elseif (y <= 2.25e+51)
		tmp = 1.0 + (-1.0 / (x * 9.0));
	else
		tmp = 1.0 - (y / sqrt((x * 9.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[y, -1.62e+78], N[(1.0 - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+51], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 94.8%

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{3}{y}}} \cdot \sqrt{\frac{1}{x}} \]
      5. clear-num95.1%

        \[\leadsto 1 - \color{blue}{\frac{y}{3}} \cdot \sqrt{\frac{1}{x}} \]
      6. sqrt-div94.9%

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

        \[\leadsto 1 - \frac{y}{3} \cdot \frac{\color{blue}{1}}{\sqrt{x}} \]
      8. div-inv95.1%

        \[\leadsto 1 - \color{blue}{\frac{\frac{y}{3}}{\sqrt{x}}} \]
      9. pow1/295.1%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{{x}^{0.5}}} \]
      10. div-inv95.0%

        \[\leadsto 1 - \frac{\color{blue}{y \cdot \frac{1}{3}}}{{x}^{0.5}} \]
      11. metadata-eval95.0%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{0.3333333333333333}}{{x}^{0.5}} \]
    5. Applied egg-rr95.0%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot 0.3333333333333333}{{x}^{0.5}}} \]
    6. Step-by-step derivation
      1. metadata-eval95.0%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{\frac{1}{3}}}{{x}^{0.5}} \]
      2. div-inv95.1%

        \[\leadsto 1 - \frac{\color{blue}{\frac{y}{3}}}{{x}^{0.5}} \]
      3. pow1/295.1%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{\sqrt{x}}} \]
      4. associate-/r*95.0%

        \[\leadsto 1 - \color{blue}{\frac{y}{3 \cdot \sqrt{x}}} \]
    7. Applied egg-rr95.0%

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

    if -1.6199999999999999e78 < y < 2.25e51

    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-frac-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      17. 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. Add Preprocessing
    5. Taylor expanded in y around 0 96.9%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
    6. Step-by-step derivation
      1. clear-num96.9%

        \[\leadsto 1 + \color{blue}{\frac{1}{\frac{x}{-0.1111111111111111}}} \]
      2. div-inv97.0%

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

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

        \[\leadsto 1 + \frac{1}{x \cdot \color{blue}{\left(-9\right)}} \]
      5. distribute-rgt-neg-in97.0%

        \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
      6. distribute-neg-frac297.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
      7. distribute-neg-frac97.0%

        \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
      8. metadata-eval97.0%

        \[\leadsto 1 + \frac{\color{blue}{-1}}{x \cdot 9} \]
    7. Applied egg-rr97.0%

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

    if 2.25e51 < y

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 92.8%

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{3}{y}}} \cdot \sqrt{\frac{1}{x}} \]
      5. clear-num92.8%

        \[\leadsto 1 - \color{blue}{\frac{y}{3}} \cdot \sqrt{\frac{1}{x}} \]
      6. sqrt-div92.7%

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

        \[\leadsto 1 - \frac{y}{3} \cdot \frac{\color{blue}{1}}{\sqrt{x}} \]
      8. div-inv92.7%

        \[\leadsto 1 - \color{blue}{\frac{\frac{y}{3}}{\sqrt{x}}} \]
      9. pow1/292.7%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{{x}^{0.5}}} \]
      10. div-inv92.8%

        \[\leadsto 1 - \frac{\color{blue}{y \cdot \frac{1}{3}}}{{x}^{0.5}} \]
      11. metadata-eval92.8%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{0.3333333333333333}}{{x}^{0.5}} \]
    5. Applied egg-rr92.8%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot 0.3333333333333333}{{x}^{0.5}}} \]
    6. Step-by-step derivation
      1. metadata-eval92.8%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{\frac{1}{3}}}{{x}^{0.5}} \]
      2. div-inv92.7%

        \[\leadsto 1 - \frac{\color{blue}{\frac{y}{3}}}{{x}^{0.5}} \]
      3. pow1/292.7%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{\sqrt{x}}} \]
      4. associate-/r*92.6%

        \[\leadsto 1 - \color{blue}{\frac{y}{3 \cdot \sqrt{x}}} \]
    7. Applied egg-rr92.6%

      \[\leadsto 1 - \color{blue}{\frac{y}{3 \cdot \sqrt{x}}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity92.6%

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

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

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

        \[\leadsto 1 - \frac{y}{1 \cdot \color{blue}{\sqrt{x \cdot 9}}} \]
      5. pow1/292.8%

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

      \[\leadsto 1 - \frac{y}{\color{blue}{1 \cdot {\left(x \cdot 9\right)}^{0.5}}} \]
    10. Step-by-step derivation
      1. *-lft-identity92.8%

        \[\leadsto 1 - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
      2. unpow1/292.8%

        \[\leadsto 1 - \frac{y}{\color{blue}{\sqrt{x \cdot 9}}} \]
    11. Simplified92.8%

      \[\leadsto 1 - \frac{y}{\color{blue}{\sqrt{x \cdot 9}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 95.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 94.8%

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

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

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

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

        \[\leadsto 1 - 0.3333333333333333 \cdot \color{blue}{\frac{y}{\sqrt{x}}} \]
      5. pow1/294.9%

        \[\leadsto 1 - 0.3333333333333333 \cdot \frac{y}{\color{blue}{{x}^{0.5}}} \]
    5. Applied egg-rr94.9%

      \[\leadsto 1 - 0.3333333333333333 \cdot \color{blue}{\frac{y}{{x}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/294.9%

        \[\leadsto 1 - 0.3333333333333333 \cdot \frac{y}{\color{blue}{\sqrt{x}}} \]
    7. Simplified94.9%

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

    if -1.6199999999999999e78 < y < 4e52

    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-frac-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      17. 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. Add Preprocessing
    5. Taylor expanded in y around 0 96.9%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
    6. Step-by-step derivation
      1. clear-num96.9%

        \[\leadsto 1 + \color{blue}{\frac{1}{\frac{x}{-0.1111111111111111}}} \]
      2. div-inv97.0%

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

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

        \[\leadsto 1 + \frac{1}{x \cdot \color{blue}{\left(-9\right)}} \]
      5. distribute-rgt-neg-in97.0%

        \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
      6. distribute-neg-frac297.0%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
      7. distribute-neg-frac97.0%

        \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
      8. metadata-eval97.0%

        \[\leadsto 1 + \frac{\color{blue}{-1}}{x \cdot 9} \]
    7. Applied egg-rr97.0%

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

    if 4e52 < y

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 92.8%

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

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

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

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

        \[\leadsto 1 - \color{blue}{\frac{1}{\frac{3}{y}}} \cdot \sqrt{\frac{1}{x}} \]
      5. clear-num92.8%

        \[\leadsto 1 - \color{blue}{\frac{y}{3}} \cdot \sqrt{\frac{1}{x}} \]
      6. sqrt-div92.7%

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

        \[\leadsto 1 - \frac{y}{3} \cdot \frac{\color{blue}{1}}{\sqrt{x}} \]
      8. div-inv92.7%

        \[\leadsto 1 - \color{blue}{\frac{\frac{y}{3}}{\sqrt{x}}} \]
      9. pow1/292.7%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{{x}^{0.5}}} \]
      10. div-inv92.8%

        \[\leadsto 1 - \frac{\color{blue}{y \cdot \frac{1}{3}}}{{x}^{0.5}} \]
      11. metadata-eval92.8%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{0.3333333333333333}}{{x}^{0.5}} \]
    5. Applied egg-rr92.8%

      \[\leadsto 1 - \color{blue}{\frac{y \cdot 0.3333333333333333}{{x}^{0.5}}} \]
    6. Step-by-step derivation
      1. metadata-eval92.8%

        \[\leadsto 1 - \frac{y \cdot \color{blue}{\frac{1}{3}}}{{x}^{0.5}} \]
      2. div-inv92.7%

        \[\leadsto 1 - \frac{\color{blue}{\frac{y}{3}}}{{x}^{0.5}} \]
      3. pow1/292.7%

        \[\leadsto 1 - \frac{\frac{y}{3}}{\color{blue}{\sqrt{x}}} \]
      4. associate-/r*92.6%

        \[\leadsto 1 - \color{blue}{\frac{y}{3 \cdot \sqrt{x}}} \]
    7. Applied egg-rr92.6%

      \[\leadsto 1 - \color{blue}{\frac{y}{3 \cdot \sqrt{x}}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity92.6%

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

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

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

        \[\leadsto 1 - \frac{y}{1 \cdot \color{blue}{\sqrt{x \cdot 9}}} \]
      5. pow1/292.8%

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

      \[\leadsto 1 - \frac{y}{\color{blue}{1 \cdot {\left(x \cdot 9\right)}^{0.5}}} \]
    10. Step-by-step derivation
      1. *-lft-identity92.8%

        \[\leadsto 1 - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
      2. unpow1/292.8%

        \[\leadsto 1 - \frac{y}{\color{blue}{\sqrt{x \cdot 9}}} \]
    11. Simplified92.8%

      \[\leadsto 1 - \frac{y}{\color{blue}{\sqrt{x \cdot 9}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 10: 93.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{x}}\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+82}:\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot t\_0\right)\\

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

\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot t\_0\right)\\


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

    1. Initial program 99.5%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*99.6%

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

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

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

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

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

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

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

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

    if -1.4e82 < y < 1.90000000000000003e72

    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-frac-neg99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
      17. 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. Add Preprocessing
    5. Taylor expanded in y around 0 95.7%

      \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
    6. Step-by-step derivation
      1. clear-num95.7%

        \[\leadsto 1 + \color{blue}{\frac{1}{\frac{x}{-0.1111111111111111}}} \]
      2. div-inv95.8%

        \[\leadsto 1 + \frac{1}{\color{blue}{x \cdot \frac{1}{-0.1111111111111111}}} \]
      3. metadata-eval95.8%

        \[\leadsto 1 + \frac{1}{x \cdot \color{blue}{-9}} \]
      4. metadata-eval95.8%

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

        \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
      6. distribute-neg-frac295.8%

        \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
      7. distribute-neg-frac95.8%

        \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
      8. metadata-eval95.8%

        \[\leadsto 1 + \frac{\color{blue}{-1}}{x \cdot 9} \]
    7. Applied egg-rr95.8%

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

    if 1.90000000000000003e72 < y

    1. Initial program 99.4%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 86.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+82}:\\ \;\;\;\;y \cdot \left(-0.3333333333333333 \cdot \sqrt{\frac{1}{x}}\right)\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+72}:\\ \;\;\;\;1 + \frac{-1}{x \cdot 9}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 99.6% accurate, 1.0× speedup?

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

\\
\left(1 + \frac{-1}{x \cdot 9}\right) - 0.3333333333333333 \cdot \frac{y}{\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. Add Preprocessing
  3. Step-by-step derivation
    1. associate-/r*99.7%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\color{blue}{\frac{\sqrt{\frac{y}{3}} \cdot \sqrt{\frac{y}{3}}}{{x}^{0.25}}}}{{x}^{0.25}} \]
    3. rem-square-sqrt99.6%

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\frac{\color{blue}{\frac{y}{3}}}{{x}^{0.25}}}{{x}^{0.25}} \]
    4. associate-/l/99.6%

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{\frac{y}{3}}{{x}^{\color{blue}{0.5}}} \]
    7. associate-/l/99.7%

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

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

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

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

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \color{blue}{0.3333333333333333} \cdot \frac{y}{{x}^{0.5}} \]
    16. unpow1/299.7%

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

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

    \[\leadsto \left(1 + \frac{-1}{x \cdot 9}\right) - 0.3333333333333333 \cdot \frac{y}{\sqrt{x}} \]
  8. Add Preprocessing

Alternative 12: 99.6% accurate, 1.0× speedup?

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

\\
1 + \left(\frac{-0.1111111111111111}{x} + y \cdot \frac{-0.3333333333333333}{\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. 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-frac-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
    17. 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. Add Preprocessing
  5. Applied egg-rr50.5%

    \[\leadsto 1 + \color{blue}{\mathsf{fma}\left(\frac{\sqrt{\frac{y}{3}}}{{x}^{0.25}}, -\frac{\sqrt{\frac{y}{3}}}{{x}^{0.25}}, \frac{-0.1111111111111111}{x}\right)} \]
  6. Step-by-step derivation
    1. fma-undefine50.5%

      \[\leadsto 1 + \color{blue}{\left(\frac{\sqrt{\frac{y}{3}}}{{x}^{0.25}} \cdot \left(-\frac{\sqrt{\frac{y}{3}}}{{x}^{0.25}}\right) + \frac{-0.1111111111111111}{x}\right)} \]
    2. *-commutative50.5%

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

      \[\leadsto 1 + \color{blue}{\left(\frac{-0.1111111111111111}{x} + \left(-\frac{\sqrt{\frac{y}{3}}}{{x}^{0.25}}\right) \cdot \frac{\sqrt{\frac{y}{3}}}{{x}^{0.25}}\right)} \]
    4. distribute-lft-neg-out50.5%

      \[\leadsto 1 + \left(\frac{-0.1111111111111111}{x} + \color{blue}{\left(-\frac{\sqrt{\frac{y}{3}}}{{x}^{0.25}} \cdot \frac{\sqrt{\frac{y}{3}}}{{x}^{0.25}}\right)}\right) \]
    5. associate-*r/50.5%

      \[\leadsto 1 + \left(\frac{-0.1111111111111111}{x} + \left(-\color{blue}{\frac{\frac{\sqrt{\frac{y}{3}}}{{x}^{0.25}} \cdot \sqrt{\frac{y}{3}}}{{x}^{0.25}}}\right)\right) \]
    6. associate-*l/50.5%

      \[\leadsto 1 + \left(\frac{-0.1111111111111111}{x} + \left(-\frac{\color{blue}{\frac{\sqrt{\frac{y}{3}} \cdot \sqrt{\frac{y}{3}}}{{x}^{0.25}}}}{{x}^{0.25}}\right)\right) \]
    7. rem-square-sqrt99.5%

      \[\leadsto 1 + \left(\frac{-0.1111111111111111}{x} + \left(-\frac{\frac{\color{blue}{\frac{y}{3}}}{{x}^{0.25}}}{{x}^{0.25}}\right)\right) \]
    8. associate-/l/99.5%

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

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

      \[\leadsto 1 + \left(\frac{-0.1111111111111111}{x} + \left(-\frac{\frac{y}{3}}{{x}^{\color{blue}{0.5}}}\right)\right) \]
    11. associate-/l/99.6%

      \[\leadsto 1 + \left(\frac{-0.1111111111111111}{x} + \left(-\color{blue}{\frac{y}{{x}^{0.5} \cdot 3}}\right)\right) \]
    12. associate-/r*99.6%

      \[\leadsto 1 + \left(\frac{-0.1111111111111111}{x} + \left(-\color{blue}{\frac{\frac{y}{{x}^{0.5}}}{3}}\right)\right) \]
    13. distribute-neg-frac99.6%

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

    \[\leadsto 1 + \color{blue}{\left(\frac{-0.1111111111111111}{x} + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\right)} \]
  8. Add Preprocessing

Alternative 13: 63.3% 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-frac-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
    17. 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. Add Preprocessing
  5. Taylor expanded in y around 0 67.5%

    \[\leadsto 1 + \color{blue}{\frac{-0.1111111111111111}{x}} \]
  6. Step-by-step derivation
    1. clear-num67.5%

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

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

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

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

      \[\leadsto 1 + \frac{1}{\color{blue}{-x \cdot 9}} \]
    6. distribute-neg-frac267.6%

      \[\leadsto 1 + \color{blue}{\left(-\frac{1}{x \cdot 9}\right)} \]
    7. distribute-neg-frac67.6%

      \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
    8. metadata-eval67.6%

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

    \[\leadsto 1 + \color{blue}{\frac{-1}{x \cdot 9}} \]
  8. Add Preprocessing

Alternative 14: 63.2% 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-frac-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \mathsf{fma}\left(y, \frac{-0.3333333333333333}{\sqrt{x}}, \frac{-\color{blue}{0.1111111111111111}}{x}\right) \]
    17. 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. Add Preprocessing
  5. Taylor expanded in y around 0 67.5%

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

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 2024097 
(FPCore (x y)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
  :precision binary64

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

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