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

Percentage Accurate: 99.7% → 99.7%
Time: 8.0s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 99.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 3: 99.6% accurate, 1.0× speedup?

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

\\
\left(1 - \frac{0.1111111111111111}{x}\right) - {x}^{-0.5} \cdot \frac{y}{3}
\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. *-un-lft-identity99.7%

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

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

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

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

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

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

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

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

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

Alternative 4: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 99.6% 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. 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. inv-pow99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 91.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+103} \lor \neg \left(y \leq 1.9 \cdot 10^{+32}\right):\\
\;\;\;\;y \cdot \left({x}^{-0.5} \cdot -0.3333333333333333\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.20000000000000033e103 or 1.9000000000000002e32 < y

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \color{blue}{{\left(\frac{1}{x}\right)}^{0.5}}\right) \]
      4. unpow-190.6%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot {\color{blue}{\left({x}^{-1}\right)}}^{0.5}\right) \]
      5. exp-to-pow86.6%

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

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

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

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

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

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot e^{\log \left({x}^{\color{blue}{-1}}\right) \cdot 0.5}\right) \]
      11. unpow-186.6%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot e^{\log \color{blue}{\left(\frac{1}{x}\right)} \cdot 0.5}\right) \]
      12. log-rec86.6%

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

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

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

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

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

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

    if -7.20000000000000033e103 < y < 1.9000000000000002e32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+103} \lor \neg \left(y \leq 1.9 \cdot 10^{+32}\right):\\ \;\;\;\;y \cdot \left({x}^{-0.5} \cdot -0.3333333333333333\right)\\ \mathbf{else}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \end{array} \]

Alternative 7: 91.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \color{blue}{{\left(\frac{1}{x}\right)}^{0.5}}\right) \]
      4. unpow-197.5%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot {\color{blue}{\left({x}^{-1}\right)}}^{0.5}\right) \]
      5. exp-to-pow92.6%

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

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

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

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

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot \color{blue}{e^{\log \left({x}^{\left(\frac{-2}{2}\right)}\right) \cdot 0.5}}\right) \]
      10. metadata-eval92.5%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot e^{\log \left({x}^{\color{blue}{-1}}\right) \cdot 0.5}\right) \]
      11. unpow-192.5%

        \[\leadsto y \cdot \left(-0.3333333333333333 \cdot e^{\log \color{blue}{\left(\frac{1}{x}\right)} \cdot 0.5}\right) \]
      12. log-rec92.5%

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

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

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

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

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

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

    if -1.12000000000000003e104 < y < 1.9000000000000002e32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000002e32 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.12 \cdot 10^{+104}:\\ \;\;\;\;y \cdot \left({x}^{-0.5} \cdot -0.3333333333333333\right)\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+32}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left({x}^{-0.5} \cdot y\right)\\ \end{array} \]

Alternative 8: 91.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000033e103 < y < 1.9000000000000002e32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000002e32 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+103}:\\ \;\;\;\;{x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+32}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left({x}^{-0.5} \cdot y\right)\\ \end{array} \]

Alternative 9: 91.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+32}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000033e103 < y < 1.9000000000000002e32

    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. *-un-lft-identity99.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
    7. Step-by-step derivation
      1. associate-*r/96.8%

        \[\leadsto 1 - \color{blue}{\frac{0.1111111111111111 \cdot 1}{x}} \]
      2. metadata-eval96.8%

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

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

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

        \[\leadsto 1 - \color{blue}{{9}^{-1}} \cdot \frac{1}{x} \]
      3. inv-pow96.7%

        \[\leadsto 1 - {9}^{-1} \cdot \color{blue}{{x}^{-1}} \]
      4. unpow-prod-down96.9%

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

        \[\leadsto 1 - {\color{blue}{\left(x \cdot 9\right)}}^{-1} \]
    10. Applied egg-rr96.9%

      \[\leadsto 1 - \color{blue}{{\left(x \cdot 9\right)}^{-1}} \]

    if 1.9000000000000002e32 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.2 \cdot 10^{+103}:\\ \;\;\;\;{x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+32}:\\ \;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \left({x}^{-0.5} \cdot y\right)\\ \end{array} \]

Alternative 10: 66.6% accurate, 6.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 - \frac{0.012345679012345678}{x \cdot x}\\ \mathbf{if}\;y \leq -1.58 \cdot 10^{+112}:\\ \;\;\;\;\frac{t_0}{1 + -0.1111111111111111 \cdot \frac{1}{x}}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+132}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{1 + \frac{0.1111111111111111}{x}}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (- 1.0 (/ 0.012345679012345678 (* x x)))))
   (if (<= y -1.58e+112)
     (/ t_0 (+ 1.0 (* -0.1111111111111111 (/ 1.0 x))))
     (if (<= y 2.1e+132)
       (+ 1.0 (/ -0.1111111111111111 x))
       (/ t_0 (+ 1.0 (/ 0.1111111111111111 x)))))))
double code(double x, double y) {
	double t_0 = 1.0 - (0.012345679012345678 / (x * x));
	double tmp;
	if (y <= -1.58e+112) {
		tmp = t_0 / (1.0 + (-0.1111111111111111 * (1.0 / x)));
	} else if (y <= 2.1e+132) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = t_0 / (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) :: t_0
    real(8) :: tmp
    t_0 = 1.0d0 - (0.012345679012345678d0 / (x * x))
    if (y <= (-1.58d+112)) then
        tmp = t_0 / (1.0d0 + ((-0.1111111111111111d0) * (1.0d0 / x)))
    else if (y <= 2.1d+132) then
        tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
    else
        tmp = t_0 / (1.0d0 + (0.1111111111111111d0 / x))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = 1.0 - (0.012345679012345678 / (x * x));
	double tmp;
	if (y <= -1.58e+112) {
		tmp = t_0 / (1.0 + (-0.1111111111111111 * (1.0 / x)));
	} else if (y <= 2.1e+132) {
		tmp = 1.0 + (-0.1111111111111111 / x);
	} else {
		tmp = t_0 / (1.0 + (0.1111111111111111 / x));
	}
	return tmp;
}
def code(x, y):
	t_0 = 1.0 - (0.012345679012345678 / (x * x))
	tmp = 0
	if y <= -1.58e+112:
		tmp = t_0 / (1.0 + (-0.1111111111111111 * (1.0 / x)))
	elif y <= 2.1e+132:
		tmp = 1.0 + (-0.1111111111111111 / x)
	else:
		tmp = t_0 / (1.0 + (0.1111111111111111 / x))
	return tmp
function code(x, y)
	t_0 = Float64(1.0 - Float64(0.012345679012345678 / Float64(x * x)))
	tmp = 0.0
	if (y <= -1.58e+112)
		tmp = Float64(t_0 / Float64(1.0 + Float64(-0.1111111111111111 * Float64(1.0 / x))));
	elseif (y <= 2.1e+132)
		tmp = Float64(1.0 + Float64(-0.1111111111111111 / x));
	else
		tmp = Float64(t_0 / Float64(1.0 + Float64(0.1111111111111111 / x)));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = 1.0 - (0.012345679012345678 / (x * x));
	tmp = 0.0;
	if (y <= -1.58e+112)
		tmp = t_0 / (1.0 + (-0.1111111111111111 * (1.0 / x)));
	elseif (y <= 2.1e+132)
		tmp = 1.0 + (-0.1111111111111111 / x);
	else
		tmp = t_0 / (1.0 + (0.1111111111111111 / x));
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(0.012345679012345678 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.58e+112], N[(t$95$0 / N[(1.0 + N[(-0.1111111111111111 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+132], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(1.0 + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 1 - \frac{0.012345679012345678}{x \cdot x}\\
\mathbf{if}\;y \leq -1.58 \cdot 10^{+112}:\\
\;\;\;\;\frac{t_0}{1 + -0.1111111111111111 \cdot \frac{1}{x}}\\

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

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


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

    1. Initial program 99.6%

      \[\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}} \]
    2. Applied egg-rr58.4%

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

      \[\leadsto \color{blue}{\frac{1 - 0.012345679012345678 \cdot \frac{1}{{x}^{2}}}{1 + 0.1111111111111111 \cdot \frac{1}{x}}} \]
    4. Step-by-step derivation
      1. associate-*r/2.7%

        \[\leadsto \frac{1 - \color{blue}{\frac{0.012345679012345678 \cdot 1}{{x}^{2}}}}{1 + 0.1111111111111111 \cdot \frac{1}{x}} \]
      2. metadata-eval2.7%

        \[\leadsto \frac{1 - \frac{\color{blue}{0.012345679012345678}}{{x}^{2}}}{1 + 0.1111111111111111 \cdot \frac{1}{x}} \]
      3. unpow22.7%

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

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

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

      \[\leadsto \color{blue}{\frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 + \frac{0.1111111111111111}{x}}} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt2.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 + \color{blue}{\frac{-0.1111111111111111}{x}}} \]
      9. div-inv23.5%

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

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

    if -1.57999999999999992e112 < y < 2.09999999999999993e132

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.09999999999999993e132 < y

    1. Initial program 99.5%

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

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

      \[\leadsto \color{blue}{\frac{1 - 0.012345679012345678 \cdot \frac{1}{{x}^{2}}}{1 + 0.1111111111111111 \cdot \frac{1}{x}}} \]
    4. Step-by-step derivation
      1. associate-*r/17.9%

        \[\leadsto \frac{1 - \color{blue}{\frac{0.012345679012345678 \cdot 1}{{x}^{2}}}}{1 + 0.1111111111111111 \cdot \frac{1}{x}} \]
      2. metadata-eval17.9%

        \[\leadsto \frac{1 - \frac{\color{blue}{0.012345679012345678}}{{x}^{2}}}{1 + 0.1111111111111111 \cdot \frac{1}{x}} \]
      3. unpow217.9%

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

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 + \color{blue}{\frac{0.1111111111111111 \cdot 1}{x}}} \]
      5. metadata-eval17.9%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 + \frac{\color{blue}{0.1111111111111111}}{x}} \]
    5. Simplified17.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.58 \cdot 10^{+112}:\\ \;\;\;\;\frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 + -0.1111111111111111 \cdot \frac{1}{x}}\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+132}:\\ \;\;\;\;1 + \frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 + \frac{0.1111111111111111}{x}}\\ \end{array} \]

Alternative 11: 64.0% accurate, 7.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.1 \cdot 10^{+132}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.09999999999999993e132 < y

    1. Initial program 99.5%

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

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

      \[\leadsto \color{blue}{\frac{1 - 0.012345679012345678 \cdot \frac{1}{{x}^{2}}}{1 + 0.1111111111111111 \cdot \frac{1}{x}}} \]
    4. Step-by-step derivation
      1. associate-*r/17.9%

        \[\leadsto \frac{1 - \color{blue}{\frac{0.012345679012345678 \cdot 1}{{x}^{2}}}}{1 + 0.1111111111111111 \cdot \frac{1}{x}} \]
      2. metadata-eval17.9%

        \[\leadsto \frac{1 - \frac{\color{blue}{0.012345679012345678}}{{x}^{2}}}{1 + 0.1111111111111111 \cdot \frac{1}{x}} \]
      3. unpow217.9%

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

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 + \color{blue}{\frac{0.1111111111111111 \cdot 1}{x}}} \]
      5. metadata-eval17.9%

        \[\leadsto \frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 + \frac{\color{blue}{0.1111111111111111}}{x}} \]
    5. Simplified17.9%

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

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

Alternative 12: 59.1% accurate, 22.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+26}:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000001e26 < 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. distribute-frac-neg99.8%

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

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

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

        \[\leadsto \left(1 - \frac{\color{blue}{0.1111111111111111}}{x}\right) + \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. Taylor expanded in x around inf 64.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 5 \cdot 10^{+26}:\\ \;\;\;\;\frac{-0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;1\\ \end{array} \]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 1 \]

Developer target: 99.7% accurate, 1.0× speedup?

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

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

Reproduce

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