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

Percentage Accurate: 99.7% → 99.7%
Time: 12.1s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 99.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

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

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

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

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

    \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
  5. Step-by-step derivation
    1. unpow1/299.7%

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

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

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

Alternative 2: 95.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 inf 92.8%

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

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

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

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

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

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

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

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

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

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

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

    if -2.35e52 < y < 2.7000000000000002e46

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7000000000000002e46 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {x}^{\color{blue}{-0.5}} \cdot \left(-0.3333333333333333 \cdot y\right) \]
      4. expm1-log1p-u85.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{+52}:\\ \;\;\;\;1 + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+46}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + {x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 95.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 inf 92.8%

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

    if -2.4e52 < y < 5.60000000000000037e46

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.60000000000000037e46 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {x}^{\color{blue}{-0.5}} \cdot \left(-0.3333333333333333 \cdot y\right) \]
      4. expm1-log1p-u85.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+52}:\\ \;\;\;\;1 + -0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\ \mathbf{elif}\;y \leq 5.6 \cdot 10^{+46}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + {x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 95.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 inf 92.8%

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

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

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

    if -9.0000000000000006e56 < y < 2.0999999999999998e48

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0999999999999998e48 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {x}^{\color{blue}{-0.5}} \cdot \left(-0.3333333333333333 \cdot y\right) \]
      4. expm1-log1p-u85.8%

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

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

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

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

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

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

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

Alternative 5: 95.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 inf 95.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-0.3333333333333333 \cdot {x}^{\color{blue}{-0.5}}\right) \cdot y \]
      6. expm1-log1p-u36.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-0.3333333333333333 \cdot {x}^{-0.5}\right) \cdot y\right)\right)} \]
      7. associate-*r*36.8%

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

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

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

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

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

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

    if -2.0000000000000002e54 < y < 8.8000000000000001e46

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+54} \lor \neg \left(y \leq 8.8 \cdot 10^{+46}\right):\\ \;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 95.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+53} \lor \neg \left(y \leq 2.95 \cdot 10^{+47}\right):\\
\;\;\;\;1 + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.6e53 or 2.95000000000000017e47 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 inf 95.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \frac{\color{blue}{y \cdot -0.3333333333333333}}{\sqrt{x}} \]
    9. Applied egg-rr95.5%

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

    if -3.6e53 < y < 2.95000000000000017e47

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+53} \lor \neg \left(y \leq 2.95 \cdot 10^{+47}\right):\\ \;\;\;\;1 + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 92.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+82} \lor \neg \left(y \leq 1.06 \cdot 10^{+51}\right):\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot {x}^{-0.5}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.99999999999999989e82 or 1.06000000000000004e51 < y

    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. *-commutative99.5%

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.6%

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{\sqrt{x \cdot 9}}} \]
    7. Taylor expanded in y around inf 90.5%

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

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

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

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \sqrt{\frac{1}{\color{blue}{e^{\log x}}}}\right) \]
      4. exp-neg85.7%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \sqrt{\color{blue}{e^{-\log x}}}\right) \]
      5. unpow1/285.7%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \color{blue}{{\left(e^{-\log x}\right)}^{0.5}}\right) \]
      6. exp-prod85.7%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \color{blue}{e^{\left(-\log x\right) \cdot 0.5}}\right) \]
      7. distribute-lft-neg-out85.7%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot e^{\color{blue}{-\log x \cdot 0.5}}\right) \]
      8. distribute-rgt-neg-in85.7%

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

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot e^{\log x \cdot \color{blue}{-0.5}}\right) \]
      10. exp-to-pow90.6%

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

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

    if -2.99999999999999989e82 < y < 1.06000000000000004e51

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+82} \lor \neg \left(y \leq 1.06 \cdot 10^{+51}\right):\\ \;\;\;\;y \cdot \left(-0.3333333333333333 \cdot {x}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 92.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+82}:\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot {x}^{-0.5}\right)\\

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

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


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

    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. *-commutative99.5%

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.7%

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{\sqrt{x \cdot 9}}} \]
    7. Taylor expanded in y around inf 92.3%

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

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

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

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \sqrt{\frac{1}{\color{blue}{e^{\log x}}}}\right) \]
      4. exp-neg86.9%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \sqrt{\color{blue}{e^{-\log x}}}\right) \]
      5. unpow1/286.9%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \color{blue}{{\left(e^{-\log x}\right)}^{0.5}}\right) \]
      6. exp-prod86.9%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \color{blue}{e^{\left(-\log x\right) \cdot 0.5}}\right) \]
      7. distribute-lft-neg-out86.9%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot e^{\color{blue}{-\log x \cdot 0.5}}\right) \]
      8. distribute-rgt-neg-in86.9%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot e^{\color{blue}{\log x \cdot \left(-0.5\right)}}\right) \]
      9. metadata-eval86.9%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot e^{\log x \cdot \color{blue}{-0.5}}\right) \]
      10. exp-to-pow92.3%

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

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

    if -2.99999999999999989e82 < y < 8.2000000000000002e50

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.2000000000000002e50 < y

    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. *-commutative99.5%

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.5%

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

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

      \[\leadsto \left(1 - \color{blue}{\frac{0.1111111111111111}{x}}\right) - \frac{y}{\sqrt{x \cdot 9}} \]
    8. Taylor expanded in y around inf 88.9%

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(-0.3333333333333333 \cdot y\right)} \]
    11. Step-by-step derivation
      1. inv-pow89.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+82}:\\ \;\;\;\;y \cdot \left(-0.3333333333333333 \cdot {x}^{-0.5}\right)\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{+50}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;{x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 92.5% accurate, 1.0× speedup?

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

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

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

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


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

    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. *-commutative99.5%

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.7%

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{\sqrt{x \cdot 9}}} \]
    7. Taylor expanded in y around inf 92.3%

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

    if -2.85000000000000008e82 < y < 1.06000000000000004e51

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.06000000000000004e51 < y

    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. *-commutative99.5%

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.5%

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

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

      \[\leadsto \left(1 - \color{blue}{\frac{0.1111111111111111}{x}}\right) - \frac{y}{\sqrt{x \cdot 9}} \]
    8. Taylor expanded in y around inf 88.9%

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{x}} \cdot \left(-0.3333333333333333 \cdot y\right)} \]
    11. Step-by-step derivation
      1. inv-pow89.0%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 92.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.05000000000000009e84 or 3.10000000000000003e50 < y

    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. *-commutative99.5%

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.6%

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{\sqrt{x \cdot 9}}} \]
    7. Taylor expanded in y around inf 90.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-0.3333333333333333 \cdot y\right) \cdot {x}^{-0.5}\right)\right)} \]
      7. *-commutative38.4%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({x}^{-0.5} \cdot \left(-0.3333333333333333 \cdot y\right)\right)} - 1} \]
      9. associate-*r*38.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left({x}^{-0.5} \cdot -0.3333333333333333\right) \cdot y}\right)} - 1 \]
      10. *-commutative38.5%

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(-0.3333333333333333 \cdot \frac{\color{blue}{1}}{\sqrt{x}}\right)\right)} - 1 \]
      17. un-div-inv38.5%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y \cdot -0.3333333333333333}{\sqrt{x}}} \]
      4. associate-*l/90.4%

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

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

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

    if -1.05000000000000009e84 < y < 3.10000000000000003e50

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 92.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+82} \lor \neg \left(y \leq 1.06 \cdot 10^{+51}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.80000000000000033e82 or 1.06000000000000004e51 < y

    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. *-commutative99.5%

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.6%

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

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

      \[\leadsto \left(1 - \color{blue}{\frac{0.1111111111111111}{x}}\right) - \frac{y}{\sqrt{x \cdot 9}} \]
    8. Taylor expanded in y around inf 90.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-0.3333333333333333 \cdot {x}^{-0.5}\right) \cdot y\right)\right)} \]
      7. associate-*r*38.4%

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

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

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

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

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

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

    if -3.80000000000000033e82 < y < 1.06000000000000004e51

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+82} \lor \neg \left(y \leq 1.06 \cdot 10^{+51}\right):\\ \;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 92.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.8000000000000002e83 or 7.4999999999999999e50 < y

    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. *-commutative99.5%

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.6%

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{\sqrt{x \cdot 9}}} \]
    7. Taylor expanded in y around inf 90.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(-0.3333333333333333 \cdot y\right) \cdot {x}^{-0.5}\right)\right)} \]
      7. *-commutative38.4%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({x}^{-0.5} \cdot \left(-0.3333333333333333 \cdot y\right)\right)} - 1} \]
      9. associate-*r*38.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left({x}^{-0.5} \cdot -0.3333333333333333\right) \cdot y}\right)} - 1 \]
      10. *-commutative38.5%

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(y \cdot \left(-0.3333333333333333 \cdot \frac{\color{blue}{1}}{\sqrt{x}}\right)\right)} - 1 \]
      17. un-div-inv38.5%

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

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

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

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

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

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

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

    if -3.8000000000000002e83 < y < 7.4999999999999999e50

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 99.7% accurate, 1.0× speedup?

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

\\
1 + \left(\frac{-0.1111111111111111}{x} - y \cdot \sqrt{\frac{0.1111111111111111}{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. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutative99.7%

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

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

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

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

    \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
  5. Step-by-step derivation
    1. unpow1/299.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \left(\frac{-0.1111111111111111}{x} - y \cdot \sqrt{\color{blue}{0.1111111111111111} \cdot {x}^{-1}}\right) \]
    15. inv-pow99.7%

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

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

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

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

Alternative 14: 99.7% accurate, 1.0× speedup?

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

\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{\sqrt{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. Add Preprocessing
  3. Step-by-step derivation
    1. *-commutative99.7%

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

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

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

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

    \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
  5. Step-by-step derivation
    1. unpow1/299.7%

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

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

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

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

Alternative 15: 60.8% accurate, 14.1× speedup?

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

      \[\leadsto \left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}} \]
    5. Step-by-step derivation
      1. unpow1/299.6%

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

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

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

    if 0.110000000000000001 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 61.8% 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. sub-neg99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 1 + \frac{-0.1111111111111111}{x} \]
  9. Add Preprocessing

Alternative 17: 31.6% accurate, 113.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1} \]
  6. Final simplification34.1%

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

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

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