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

Percentage Accurate: 99.7% → 99.7%
Time: 10.3s
Alternatives: 12
Speedup: N/A×

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 - \left(\frac{0.1111111111111111}{x} - \color{blue}{\left(-0.3333333333333333 \cdot \sqrt{\frac{1}{x}}\right) \cdot y}\right) \]
    6. cancel-sign-sub-inv99.6%

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

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

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

Alternative 2: 94.2% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.19999999999999983e65 < y < 6.89999999999999993e68

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.89999999999999993e68 < 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. associate--l-99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \color{blue}{\frac{y \cdot -0.3333333333333333}{\sqrt{x}}} \]
    11. Step-by-step derivation
      1. div-inv93.0%

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

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

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

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

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

        \[\leadsto 1 + -0.3333333333333333 \cdot \left(y \cdot {x}^{\color{blue}{-0.5}}\right) \]
    12. Applied egg-rr93.4%

      \[\leadsto 1 + \color{blue}{-0.3333333333333333 \cdot \left(y \cdot {x}^{-0.5}\right)} \]
    13. Step-by-step derivation
      1. associate-*r*93.2%

        \[\leadsto 1 + \color{blue}{\left(-0.3333333333333333 \cdot y\right) \cdot {x}^{-0.5}} \]
      2. *-commutative93.2%

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

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

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

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

Alternative 3: 92.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+72} \lor \neg \left(y \leq 1.1 \cdot 10^{+85}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.3e72 or 1.1000000000000001e85 < y

    1. Initial program 99.5%

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

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

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

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

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

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

    if -3.3e72 < y < 1.1000000000000001e85

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 94.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+66} \lor \neg \left(y \leq 1.6 \cdot 10^{+69}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.2499999999999999e66 or 1.59999999999999992e69 < 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. associate--l-99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \color{blue}{\frac{y \cdot -0.3333333333333333}{\sqrt{x}}} \]
    11. Step-by-step derivation
      1. frac-2neg95.5%

        \[\leadsto 1 + \color{blue}{\frac{-y \cdot -0.3333333333333333}{-\sqrt{x}}} \]
      2. distribute-rgt-neg-in95.5%

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

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

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

        \[\leadsto 1 + \frac{\color{blue}{\frac{y}{3}}}{-\sqrt{x}} \]
      6. distribute-frac-neg295.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2499999999999999e66 < y < 1.59999999999999992e69

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 94.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+65} \lor \neg \left(y \leq 2.7 \cdot 10^{+68}\right):\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.09999999999999991e65 or 2.69999999999999991e68 < 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. associate--l-99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.09999999999999991e65 < y < 2.69999999999999991e68

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 99.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.2e20 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 99.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \frac{\color{blue}{0.3333333333333333 \cdot \left(\sqrt{x} \cdot \left(y \cdot {\left(\sqrt{-1}\right)}^{2}\right)\right)} - 0.1111111111111111}{x} \]
    7. Step-by-step derivation
      1. *-commutative0.0%

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

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

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

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

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

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

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

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

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

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

    if 4.3e20 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 98.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.028:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right) - 0.1111111111111111}{x}\\

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


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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0280000000000000006 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.028:\\ \;\;\;\;\frac{-0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right) - 0.1111111111111111}{x}\\ \mathbf{else}:\\ \;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.2% accurate, 22.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 31.9% accurate, 113.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 1 + \frac{\color{blue}{-0.1111111111111111}}{x} \]
    2. distribute-neg-frac64.9%

      \[\leadsto 1 + \color{blue}{\left(-\frac{0.1111111111111111}{x}\right)} \]
    3. add-sqr-sqrt64.7%

      \[\leadsto 1 + \left(-\color{blue}{\sqrt{\frac{0.1111111111111111}{x}} \cdot \sqrt{\frac{0.1111111111111111}{x}}}\right) \]
    4. sqrt-unprod48.0%

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

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

      \[\leadsto 1 + \left(-\sqrt{\frac{\color{blue}{0.012345679012345678}}{x \cdot x}}\right) \]
    7. metadata-eval48.1%

      \[\leadsto 1 + \left(-\sqrt{\frac{\color{blue}{-0.1111111111111111 \cdot -0.1111111111111111}}{x \cdot x}}\right) \]
    8. frac-times48.0%

      \[\leadsto 1 + \left(-\sqrt{\color{blue}{\frac{-0.1111111111111111}{x} \cdot \frac{-0.1111111111111111}{x}}}\right) \]
    9. sqrt-unprod0.0%

      \[\leadsto 1 + \left(-\color{blue}{\sqrt{\frac{-0.1111111111111111}{x}} \cdot \sqrt{\frac{-0.1111111111111111}{x}}}\right) \]
    10. add-sqr-sqrt31.6%

      \[\leadsto 1 + \left(-\color{blue}{\frac{-0.1111111111111111}{x}}\right) \]
  7. Applied egg-rr31.6%

    \[\leadsto 1 + \color{blue}{\left(-\frac{-0.1111111111111111}{x}\right)} \]
  8. Taylor expanded in x around inf 31.6%

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

    \[\leadsto 1 \]
  10. Add Preprocessing

Developer target: 99.7% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024082 
(FPCore (x y)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
  :precision binary64

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

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