Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B

Percentage Accurate: 99.4% → 99.5%
Time: 10.4s
Alternatives: 19
Speedup: 1.0×

Specification

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

\\
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\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 19 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.4% accurate, 1.0× speedup?

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

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

Alternative 1: 99.5% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 61.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{if}\;x \leq 2.9 \cdot 10^{-66}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{-21}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-11}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+15}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{+47} \lor \neg \left(x \leq 1.7 \cdot 10^{+178}\right):\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (sqrt x) (* y 3.0))))
   (if (<= x 2.9e-66)
     (pow (* x 9.0) -0.5)
     (if (<= x 3.3e-21)
       t_0
       (if (<= x 1.5e-11)
         (* (sqrt x) (/ 0.3333333333333333 x))
         (if (<= x 1.6e+15)
           t_0
           (if (or (<= x 6.8e+47) (not (<= x 1.7e+178)))
             (* (sqrt x) -3.0)
             (* (sqrt (* x 9.0)) y))))))))
double code(double x, double y) {
	double t_0 = sqrt(x) * (y * 3.0);
	double tmp;
	if (x <= 2.9e-66) {
		tmp = pow((x * 9.0), -0.5);
	} else if (x <= 3.3e-21) {
		tmp = t_0;
	} else if (x <= 1.5e-11) {
		tmp = sqrt(x) * (0.3333333333333333 / x);
	} else if (x <= 1.6e+15) {
		tmp = t_0;
	} else if ((x <= 6.8e+47) || !(x <= 1.7e+178)) {
		tmp = sqrt(x) * -3.0;
	} else {
		tmp = sqrt((x * 9.0)) * y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt(x) * (y * 3.0d0)
    if (x <= 2.9d-66) then
        tmp = (x * 9.0d0) ** (-0.5d0)
    else if (x <= 3.3d-21) then
        tmp = t_0
    else if (x <= 1.5d-11) then
        tmp = sqrt(x) * (0.3333333333333333d0 / x)
    else if (x <= 1.6d+15) then
        tmp = t_0
    else if ((x <= 6.8d+47) .or. (.not. (x <= 1.7d+178))) then
        tmp = sqrt(x) * (-3.0d0)
    else
        tmp = sqrt((x * 9.0d0)) * y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sqrt(x) * (y * 3.0);
	double tmp;
	if (x <= 2.9e-66) {
		tmp = Math.pow((x * 9.0), -0.5);
	} else if (x <= 3.3e-21) {
		tmp = t_0;
	} else if (x <= 1.5e-11) {
		tmp = Math.sqrt(x) * (0.3333333333333333 / x);
	} else if (x <= 1.6e+15) {
		tmp = t_0;
	} else if ((x <= 6.8e+47) || !(x <= 1.7e+178)) {
		tmp = Math.sqrt(x) * -3.0;
	} else {
		tmp = Math.sqrt((x * 9.0)) * y;
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sqrt(x) * (y * 3.0)
	tmp = 0
	if x <= 2.9e-66:
		tmp = math.pow((x * 9.0), -0.5)
	elif x <= 3.3e-21:
		tmp = t_0
	elif x <= 1.5e-11:
		tmp = math.sqrt(x) * (0.3333333333333333 / x)
	elif x <= 1.6e+15:
		tmp = t_0
	elif (x <= 6.8e+47) or not (x <= 1.7e+178):
		tmp = math.sqrt(x) * -3.0
	else:
		tmp = math.sqrt((x * 9.0)) * y
	return tmp
function code(x, y)
	t_0 = Float64(sqrt(x) * Float64(y * 3.0))
	tmp = 0.0
	if (x <= 2.9e-66)
		tmp = Float64(x * 9.0) ^ -0.5;
	elseif (x <= 3.3e-21)
		tmp = t_0;
	elseif (x <= 1.5e-11)
		tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x));
	elseif (x <= 1.6e+15)
		tmp = t_0;
	elseif ((x <= 6.8e+47) || !(x <= 1.7e+178))
		tmp = Float64(sqrt(x) * -3.0);
	else
		tmp = Float64(sqrt(Float64(x * 9.0)) * y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sqrt(x) * (y * 3.0);
	tmp = 0.0;
	if (x <= 2.9e-66)
		tmp = (x * 9.0) ^ -0.5;
	elseif (x <= 3.3e-21)
		tmp = t_0;
	elseif (x <= 1.5e-11)
		tmp = sqrt(x) * (0.3333333333333333 / x);
	elseif (x <= 1.6e+15)
		tmp = t_0;
	elseif ((x <= 6.8e+47) || ~((x <= 1.7e+178)))
		tmp = sqrt(x) * -3.0;
	else
		tmp = sqrt((x * 9.0)) * y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.9e-66], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3.3e-21], t$95$0, If[LessEqual[x, 1.5e-11], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+15], t$95$0, If[Or[LessEqual[x, 6.8e+47], N[Not[LessEqual[x, 1.7e+178]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;x \leq 2.9 \cdot 10^{-66}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 3.3 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 1.5 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+15}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 6.8 \cdot 10^{+47} \lor \neg \left(x \leq 1.7 \cdot 10^{+178}\right):\\
\;\;\;\;\sqrt{x} \cdot -3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < 2.90000000000000011e-66

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

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

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

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

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

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

    if 2.90000000000000011e-66 < x < 3.30000000000000009e-21 or 1.5e-11 < x < 1.6e15

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      4. sqrt-pow199.1%

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

        \[\leadsto {\left({\left(x \cdot 9\right)}^{\color{blue}{0.25}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    10. Applied egg-rr99.1%

      \[\leadsto \color{blue}{{\left({\left(x \cdot 9\right)}^{0.25}\right)}^{2}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    11. Taylor expanded in y around inf 68.8%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]
    12. Step-by-step derivation
      1. associate-*r*68.9%

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

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

        \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]
    13. Simplified68.9%

      \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]

    if 3.30000000000000009e-21 < x < 1.5e-11

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e15 < x < 6.7999999999999996e47 or 1.7000000000000001e178 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative70.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg70.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-3 \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
    10. Simplified70.0%

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

    if 6.7999999999999996e47 < x < 1.7000000000000001e178

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{y} \]
    6. Step-by-step derivation
      1. *-commutative99.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot y \]
  3. Recombined 5 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.9 \cdot 10^{-66}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-11}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+15}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{+47} \lor \neg \left(x \leq 1.7 \cdot 10^{+178}\right):\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 61.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 2.1 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-8}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{+15}:\\ \;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+48} \lor \neg \left(x \leq 1.8 \cdot 10^{+178}\right):\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x 2.1e-65)
   (pow (* x 9.0) -0.5)
   (if (<= x 2.3e-21)
     (* (sqrt x) (* y 3.0))
     (if (<= x 7.8e-8)
       (* (sqrt x) (/ 0.3333333333333333 x))
       (if (<= x 7.6e+15)
         (* y (* (sqrt x) 3.0))
         (if (or (<= x 1.45e+48) (not (<= x 1.8e+178)))
           (* (sqrt x) -3.0)
           (* (sqrt (* x 9.0)) y)))))))
double code(double x, double y) {
	double tmp;
	if (x <= 2.1e-65) {
		tmp = pow((x * 9.0), -0.5);
	} else if (x <= 2.3e-21) {
		tmp = sqrt(x) * (y * 3.0);
	} else if (x <= 7.8e-8) {
		tmp = sqrt(x) * (0.3333333333333333 / x);
	} else if (x <= 7.6e+15) {
		tmp = y * (sqrt(x) * 3.0);
	} else if ((x <= 1.45e+48) || !(x <= 1.8e+178)) {
		tmp = sqrt(x) * -3.0;
	} else {
		tmp = sqrt((x * 9.0)) * y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= 2.1d-65) then
        tmp = (x * 9.0d0) ** (-0.5d0)
    else if (x <= 2.3d-21) then
        tmp = sqrt(x) * (y * 3.0d0)
    else if (x <= 7.8d-8) then
        tmp = sqrt(x) * (0.3333333333333333d0 / x)
    else if (x <= 7.6d+15) then
        tmp = y * (sqrt(x) * 3.0d0)
    else if ((x <= 1.45d+48) .or. (.not. (x <= 1.8d+178))) then
        tmp = sqrt(x) * (-3.0d0)
    else
        tmp = sqrt((x * 9.0d0)) * y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= 2.1e-65) {
		tmp = Math.pow((x * 9.0), -0.5);
	} else if (x <= 2.3e-21) {
		tmp = Math.sqrt(x) * (y * 3.0);
	} else if (x <= 7.8e-8) {
		tmp = Math.sqrt(x) * (0.3333333333333333 / x);
	} else if (x <= 7.6e+15) {
		tmp = y * (Math.sqrt(x) * 3.0);
	} else if ((x <= 1.45e+48) || !(x <= 1.8e+178)) {
		tmp = Math.sqrt(x) * -3.0;
	} else {
		tmp = Math.sqrt((x * 9.0)) * y;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 2.1e-65:
		tmp = math.pow((x * 9.0), -0.5)
	elif x <= 2.3e-21:
		tmp = math.sqrt(x) * (y * 3.0)
	elif x <= 7.8e-8:
		tmp = math.sqrt(x) * (0.3333333333333333 / x)
	elif x <= 7.6e+15:
		tmp = y * (math.sqrt(x) * 3.0)
	elif (x <= 1.45e+48) or not (x <= 1.8e+178):
		tmp = math.sqrt(x) * -3.0
	else:
		tmp = math.sqrt((x * 9.0)) * y
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= 2.1e-65)
		tmp = Float64(x * 9.0) ^ -0.5;
	elseif (x <= 2.3e-21)
		tmp = Float64(sqrt(x) * Float64(y * 3.0));
	elseif (x <= 7.8e-8)
		tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x));
	elseif (x <= 7.6e+15)
		tmp = Float64(y * Float64(sqrt(x) * 3.0));
	elseif ((x <= 1.45e+48) || !(x <= 1.8e+178))
		tmp = Float64(sqrt(x) * -3.0);
	else
		tmp = Float64(sqrt(Float64(x * 9.0)) * y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= 2.1e-65)
		tmp = (x * 9.0) ^ -0.5;
	elseif (x <= 2.3e-21)
		tmp = sqrt(x) * (y * 3.0);
	elseif (x <= 7.8e-8)
		tmp = sqrt(x) * (0.3333333333333333 / x);
	elseif (x <= 7.6e+15)
		tmp = y * (sqrt(x) * 3.0);
	elseif ((x <= 1.45e+48) || ~((x <= 1.8e+178)))
		tmp = sqrt(x) * -3.0;
	else
		tmp = sqrt((x * 9.0)) * y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, 2.1e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 2.3e-21], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e-8], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.6e+15], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.45e+48], N[Not[LessEqual[x, 1.8e+178]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.1 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 2.3 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\

\mathbf{elif}\;x \leq 7.8 \cdot 10^{-8}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\

\mathbf{elif}\;x \leq 7.6 \cdot 10^{+15}:\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\

\mathbf{elif}\;x \leq 1.45 \cdot 10^{+48} \lor \neg \left(x \leq 1.8 \cdot 10^{+178}\right):\\
\;\;\;\;\sqrt{x} \cdot -3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < 2.10000000000000003e-65

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

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

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

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

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

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

    if 2.10000000000000003e-65 < x < 2.29999999999999999e-21

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 3 \cdot \color{blue}{\left(y \cdot \sqrt{x}\right)} \]
      2. associate-*l*61.7%

        \[\leadsto \color{blue}{\left(3 \cdot y\right) \cdot \sqrt{x}} \]
      3. *-commutative61.7%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot y\right)} \]
    7. Simplified61.7%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot y\right)} \]

    if 2.29999999999999999e-21 < x < 7.7999999999999997e-8

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.7999999999999997e-8 < x < 7.6e15

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{y} \]

    if 7.6e15 < x < 1.4499999999999999e48 or 1.7999999999999999e178 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative70.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg70.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-3 \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
    10. Simplified70.0%

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

    if 1.4499999999999999e48 < x < 1.7999999999999999e178

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{y} \]
    6. Step-by-step derivation
      1. *-commutative99.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot y \]
  3. Recombined 6 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.1 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-8}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{+15}:\\ \;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{+48} \lor \neg \left(x \leq 1.8 \cdot 10^{+178}\right):\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 61.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{if}\;x \leq 7.5 \cdot 10^{-66}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-21}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 8.6 \cdot 10^{-11}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+16}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+48} \lor \neg \left(x \leq 1.85 \cdot 10^{+178}\right):\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (sqrt x) (* y 3.0))))
   (if (<= x 7.5e-66)
     (pow (* x 9.0) -0.5)
     (if (<= x 3.5e-21)
       t_0
       (if (<= x 8.6e-11)
         (* (sqrt x) (/ 0.3333333333333333 x))
         (if (<= x 9e+16)
           t_0
           (if (or (<= x 1.15e+48) (not (<= x 1.85e+178)))
             (* (sqrt x) -3.0)
             (* (sqrt (* x 9.0)) y))))))))
double code(double x, double y) {
	double t_0 = sqrt(x) * (y * 3.0);
	double tmp;
	if (x <= 7.5e-66) {
		tmp = pow((x * 9.0), -0.5);
	} else if (x <= 3.5e-21) {
		tmp = t_0;
	} else if (x <= 8.6e-11) {
		tmp = sqrt(x) * (0.3333333333333333 / x);
	} else if (x <= 9e+16) {
		tmp = t_0;
	} else if ((x <= 1.15e+48) || !(x <= 1.85e+178)) {
		tmp = sqrt(x) * -3.0;
	} else {
		tmp = sqrt((x * 9.0)) * y;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt(x) * (y * 3.0d0)
    if (x <= 7.5d-66) then
        tmp = (x * 9.0d0) ** (-0.5d0)
    else if (x <= 3.5d-21) then
        tmp = t_0
    else if (x <= 8.6d-11) then
        tmp = sqrt(x) * (0.3333333333333333d0 / x)
    else if (x <= 9d+16) then
        tmp = t_0
    else if ((x <= 1.15d+48) .or. (.not. (x <= 1.85d+178))) then
        tmp = sqrt(x) * (-3.0d0)
    else
        tmp = sqrt((x * 9.0d0)) * y
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sqrt(x) * (y * 3.0);
	double tmp;
	if (x <= 7.5e-66) {
		tmp = Math.pow((x * 9.0), -0.5);
	} else if (x <= 3.5e-21) {
		tmp = t_0;
	} else if (x <= 8.6e-11) {
		tmp = Math.sqrt(x) * (0.3333333333333333 / x);
	} else if (x <= 9e+16) {
		tmp = t_0;
	} else if ((x <= 1.15e+48) || !(x <= 1.85e+178)) {
		tmp = Math.sqrt(x) * -3.0;
	} else {
		tmp = Math.sqrt((x * 9.0)) * y;
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sqrt(x) * (y * 3.0)
	tmp = 0
	if x <= 7.5e-66:
		tmp = math.pow((x * 9.0), -0.5)
	elif x <= 3.5e-21:
		tmp = t_0
	elif x <= 8.6e-11:
		tmp = math.sqrt(x) * (0.3333333333333333 / x)
	elif x <= 9e+16:
		tmp = t_0
	elif (x <= 1.15e+48) or not (x <= 1.85e+178):
		tmp = math.sqrt(x) * -3.0
	else:
		tmp = math.sqrt((x * 9.0)) * y
	return tmp
function code(x, y)
	t_0 = Float64(sqrt(x) * Float64(y * 3.0))
	tmp = 0.0
	if (x <= 7.5e-66)
		tmp = Float64(x * 9.0) ^ -0.5;
	elseif (x <= 3.5e-21)
		tmp = t_0;
	elseif (x <= 8.6e-11)
		tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x));
	elseif (x <= 9e+16)
		tmp = t_0;
	elseif ((x <= 1.15e+48) || !(x <= 1.85e+178))
		tmp = Float64(sqrt(x) * -3.0);
	else
		tmp = Float64(sqrt(Float64(x * 9.0)) * y);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sqrt(x) * (y * 3.0);
	tmp = 0.0;
	if (x <= 7.5e-66)
		tmp = (x * 9.0) ^ -0.5;
	elseif (x <= 3.5e-21)
		tmp = t_0;
	elseif (x <= 8.6e-11)
		tmp = sqrt(x) * (0.3333333333333333 / x);
	elseif (x <= 9e+16)
		tmp = t_0;
	elseif ((x <= 1.15e+48) || ~((x <= 1.85e+178)))
		tmp = sqrt(x) * -3.0;
	else
		tmp = sqrt((x * 9.0)) * y;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 7.5e-66], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3.5e-21], t$95$0, If[LessEqual[x, 8.6e-11], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e+16], t$95$0, If[Or[LessEqual[x, 1.15e+48], N[Not[LessEqual[x, 1.85e+178]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;x \leq 7.5 \cdot 10^{-66}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 3.5 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 8.6 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\

\mathbf{elif}\;x \leq 9 \cdot 10^{+16}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 1.15 \cdot 10^{+48} \lor \neg \left(x \leq 1.85 \cdot 10^{+178}\right):\\
\;\;\;\;\sqrt{x} \cdot -3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < 7.49999999999999995e-66

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

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

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

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

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

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

    if 7.49999999999999995e-66 < x < 3.5000000000000003e-21 or 8.60000000000000003e-11 < x < 9e16

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 3 \cdot \color{blue}{\left(y \cdot \sqrt{x}\right)} \]
      2. associate-*l*68.9%

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

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

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot y\right)} \]

    if 3.5000000000000003e-21 < x < 8.60000000000000003e-11

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9e16 < x < 1.15e48 or 1.8500000000000001e178 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative70.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg70.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-3 \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
    10. Simplified70.0%

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

    if 1.15e48 < x < 1.8500000000000001e178

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{y} \]
    6. Step-by-step derivation
      1. *-commutative99.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot y \]
  3. Recombined 5 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 7.5 \cdot 10^{-66}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 8.6 \cdot 10^{-11}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 9 \cdot 10^{+16}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 1.15 \cdot 10^{+48} \lor \neg \left(x \leq 1.85 \cdot 10^{+178}\right):\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 61.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{if}\;x \leq 1.85 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-21}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{-11}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 3 \cdot 10^{+16} \lor \neg \left(x \leq 1.22 \cdot 10^{+48}\right) \land x \leq 2.15 \cdot 10^{+178}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (sqrt x) (* y 3.0))))
   (if (<= x 1.85e-65)
     (pow (* x 9.0) -0.5)
     (if (<= x 2e-21)
       t_0
       (if (<= x 1.32e-11)
         (* (sqrt x) (/ 0.3333333333333333 x))
         (if (or (<= x 3e+16) (and (not (<= x 1.22e+48)) (<= x 2.15e+178)))
           t_0
           (* (sqrt x) -3.0)))))))
double code(double x, double y) {
	double t_0 = sqrt(x) * (y * 3.0);
	double tmp;
	if (x <= 1.85e-65) {
		tmp = pow((x * 9.0), -0.5);
	} else if (x <= 2e-21) {
		tmp = t_0;
	} else if (x <= 1.32e-11) {
		tmp = sqrt(x) * (0.3333333333333333 / x);
	} else if ((x <= 3e+16) || (!(x <= 1.22e+48) && (x <= 2.15e+178))) {
		tmp = t_0;
	} else {
		tmp = sqrt(x) * -3.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt(x) * (y * 3.0d0)
    if (x <= 1.85d-65) then
        tmp = (x * 9.0d0) ** (-0.5d0)
    else if (x <= 2d-21) then
        tmp = t_0
    else if (x <= 1.32d-11) then
        tmp = sqrt(x) * (0.3333333333333333d0 / x)
    else if ((x <= 3d+16) .or. (.not. (x <= 1.22d+48)) .and. (x <= 2.15d+178)) then
        tmp = t_0
    else
        tmp = sqrt(x) * (-3.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sqrt(x) * (y * 3.0);
	double tmp;
	if (x <= 1.85e-65) {
		tmp = Math.pow((x * 9.0), -0.5);
	} else if (x <= 2e-21) {
		tmp = t_0;
	} else if (x <= 1.32e-11) {
		tmp = Math.sqrt(x) * (0.3333333333333333 / x);
	} else if ((x <= 3e+16) || (!(x <= 1.22e+48) && (x <= 2.15e+178))) {
		tmp = t_0;
	} else {
		tmp = Math.sqrt(x) * -3.0;
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sqrt(x) * (y * 3.0)
	tmp = 0
	if x <= 1.85e-65:
		tmp = math.pow((x * 9.0), -0.5)
	elif x <= 2e-21:
		tmp = t_0
	elif x <= 1.32e-11:
		tmp = math.sqrt(x) * (0.3333333333333333 / x)
	elif (x <= 3e+16) or (not (x <= 1.22e+48) and (x <= 2.15e+178)):
		tmp = t_0
	else:
		tmp = math.sqrt(x) * -3.0
	return tmp
function code(x, y)
	t_0 = Float64(sqrt(x) * Float64(y * 3.0))
	tmp = 0.0
	if (x <= 1.85e-65)
		tmp = Float64(x * 9.0) ^ -0.5;
	elseif (x <= 2e-21)
		tmp = t_0;
	elseif (x <= 1.32e-11)
		tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x));
	elseif ((x <= 3e+16) || (!(x <= 1.22e+48) && (x <= 2.15e+178)))
		tmp = t_0;
	else
		tmp = Float64(sqrt(x) * -3.0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sqrt(x) * (y * 3.0);
	tmp = 0.0;
	if (x <= 1.85e-65)
		tmp = (x * 9.0) ^ -0.5;
	elseif (x <= 2e-21)
		tmp = t_0;
	elseif (x <= 1.32e-11)
		tmp = sqrt(x) * (0.3333333333333333 / x);
	elseif ((x <= 3e+16) || (~((x <= 1.22e+48)) && (x <= 2.15e+178)))
		tmp = t_0;
	else
		tmp = sqrt(x) * -3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.85e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 2e-21], t$95$0, If[LessEqual[x, 1.32e-11], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 3e+16], And[N[Not[LessEqual[x, 1.22e+48]], $MachinePrecision], LessEqual[x, 2.15e+178]]], t$95$0, N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;x \leq 1.85 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 2 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 1.32 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\

\mathbf{elif}\;x \leq 3 \cdot 10^{+16} \lor \neg \left(x \leq 1.22 \cdot 10^{+48}\right) \land x \leq 2.15 \cdot 10^{+178}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 1.85e-65

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

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

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

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

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

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

    if 1.85e-65 < x < 1.99999999999999982e-21 or 1.32e-11 < x < 3e16 or 1.22000000000000004e48 < x < 2.1500000000000001e178

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]
    6. Step-by-step derivation
      1. *-commutative68.2%

        \[\leadsto 3 \cdot \color{blue}{\left(y \cdot \sqrt{x}\right)} \]
      2. associate-*l*68.3%

        \[\leadsto \color{blue}{\left(3 \cdot y\right) \cdot \sqrt{x}} \]
      3. *-commutative68.3%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot y\right)} \]
    7. Simplified68.3%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot y\right)} \]

    if 1.99999999999999982e-21 < x < 1.32e-11

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e16 < x < 1.22000000000000004e48 or 2.1500000000000001e178 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative70.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg70.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-3 \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
    10. Simplified70.0%

      \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.85 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{-11}:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\ \mathbf{elif}\;x \leq 3 \cdot 10^{+16} \lor \neg \left(x \leq 1.22 \cdot 10^{+48}\right) \land x \leq 2.15 \cdot 10^{+178}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 61.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{if}\;x \leq 2.9 \cdot 10^{-66}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-21}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-11}:\\ \;\;\;\;\frac{{x}^{-0.5}}{3}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+16} \lor \neg \left(x \leq 7.2 \cdot 10^{+47}\right) \land x \leq 1.9 \cdot 10^{+178}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* (sqrt x) (* y 3.0))))
   (if (<= x 2.9e-66)
     (pow (* x 9.0) -0.5)
     (if (<= x 3.4e-21)
       t_0
       (if (<= x 1.45e-11)
         (/ (pow x -0.5) 3.0)
         (if (or (<= x 8e+16) (and (not (<= x 7.2e+47)) (<= x 1.9e+178)))
           t_0
           (* (sqrt x) -3.0)))))))
double code(double x, double y) {
	double t_0 = sqrt(x) * (y * 3.0);
	double tmp;
	if (x <= 2.9e-66) {
		tmp = pow((x * 9.0), -0.5);
	} else if (x <= 3.4e-21) {
		tmp = t_0;
	} else if (x <= 1.45e-11) {
		tmp = pow(x, -0.5) / 3.0;
	} else if ((x <= 8e+16) || (!(x <= 7.2e+47) && (x <= 1.9e+178))) {
		tmp = t_0;
	} else {
		tmp = sqrt(x) * -3.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt(x) * (y * 3.0d0)
    if (x <= 2.9d-66) then
        tmp = (x * 9.0d0) ** (-0.5d0)
    else if (x <= 3.4d-21) then
        tmp = t_0
    else if (x <= 1.45d-11) then
        tmp = (x ** (-0.5d0)) / 3.0d0
    else if ((x <= 8d+16) .or. (.not. (x <= 7.2d+47)) .and. (x <= 1.9d+178)) then
        tmp = t_0
    else
        tmp = sqrt(x) * (-3.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sqrt(x) * (y * 3.0);
	double tmp;
	if (x <= 2.9e-66) {
		tmp = Math.pow((x * 9.0), -0.5);
	} else if (x <= 3.4e-21) {
		tmp = t_0;
	} else if (x <= 1.45e-11) {
		tmp = Math.pow(x, -0.5) / 3.0;
	} else if ((x <= 8e+16) || (!(x <= 7.2e+47) && (x <= 1.9e+178))) {
		tmp = t_0;
	} else {
		tmp = Math.sqrt(x) * -3.0;
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sqrt(x) * (y * 3.0)
	tmp = 0
	if x <= 2.9e-66:
		tmp = math.pow((x * 9.0), -0.5)
	elif x <= 3.4e-21:
		tmp = t_0
	elif x <= 1.45e-11:
		tmp = math.pow(x, -0.5) / 3.0
	elif (x <= 8e+16) or (not (x <= 7.2e+47) and (x <= 1.9e+178)):
		tmp = t_0
	else:
		tmp = math.sqrt(x) * -3.0
	return tmp
function code(x, y)
	t_0 = Float64(sqrt(x) * Float64(y * 3.0))
	tmp = 0.0
	if (x <= 2.9e-66)
		tmp = Float64(x * 9.0) ^ -0.5;
	elseif (x <= 3.4e-21)
		tmp = t_0;
	elseif (x <= 1.45e-11)
		tmp = Float64((x ^ -0.5) / 3.0);
	elseif ((x <= 8e+16) || (!(x <= 7.2e+47) && (x <= 1.9e+178)))
		tmp = t_0;
	else
		tmp = Float64(sqrt(x) * -3.0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sqrt(x) * (y * 3.0);
	tmp = 0.0;
	if (x <= 2.9e-66)
		tmp = (x * 9.0) ^ -0.5;
	elseif (x <= 3.4e-21)
		tmp = t_0;
	elseif (x <= 1.45e-11)
		tmp = (x ^ -0.5) / 3.0;
	elseif ((x <= 8e+16) || (~((x <= 7.2e+47)) && (x <= 1.9e+178)))
		tmp = t_0;
	else
		tmp = sqrt(x) * -3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.9e-66], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3.4e-21], t$95$0, If[LessEqual[x, 1.45e-11], N[(N[Power[x, -0.5], $MachinePrecision] / 3.0), $MachinePrecision], If[Or[LessEqual[x, 8e+16], And[N[Not[LessEqual[x, 7.2e+47]], $MachinePrecision], LessEqual[x, 1.9e+178]]], t$95$0, N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;x \leq 2.9 \cdot 10^{-66}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 3.4 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 1.45 \cdot 10^{-11}:\\
\;\;\;\;\frac{{x}^{-0.5}}{3}\\

\mathbf{elif}\;x \leq 8 \cdot 10^{+16} \lor \neg \left(x \leq 7.2 \cdot 10^{+47}\right) \land x \leq 1.9 \cdot 10^{+178}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 2.90000000000000011e-66

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

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

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

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

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

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

    if 2.90000000000000011e-66 < x < 3.4e-21 or 1.45e-11 < x < 8e16 or 7.20000000000000015e47 < x < 1.89999999999999999e178

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]
    6. Step-by-step derivation
      1. *-commutative68.2%

        \[\leadsto 3 \cdot \color{blue}{\left(y \cdot \sqrt{x}\right)} \]
      2. associate-*l*68.3%

        \[\leadsto \color{blue}{\left(3 \cdot y\right) \cdot \sqrt{x}} \]
      3. *-commutative68.3%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot y\right)} \]
    7. Simplified68.3%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot y\right)} \]

    if 3.4e-21 < x < 1.45e-11

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval76.2%

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

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111 \cdot \frac{1}{x}}} \]
      3. *-commutative76.2%

        \[\leadsto \sqrt{\color{blue}{\frac{1}{x} \cdot 0.1111111111111111}} \]
      4. metadata-eval76.2%

        \[\leadsto \sqrt{\frac{1}{x} \cdot \color{blue}{\frac{1}{9}}} \]
      5. div-inv76.4%

        \[\leadsto \sqrt{\color{blue}{\frac{\frac{1}{x}}{9}}} \]
      6. sqrt-div76.2%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{9}}} \]
      7. inv-pow76.2%

        \[\leadsto \frac{\sqrt{\color{blue}{{x}^{-1}}}}{\sqrt{9}} \]
      8. sqrt-pow176.2%

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

        \[\leadsto \frac{{x}^{\color{blue}{-0.5}}}{\sqrt{9}} \]
      10. metadata-eval76.2%

        \[\leadsto \frac{{x}^{-0.5}}{\color{blue}{3}} \]
    7. Applied egg-rr76.2%

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

    if 8e16 < x < 7.20000000000000015e47 or 1.89999999999999999e178 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative70.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg70.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-3 \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
    10. Simplified70.0%

      \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.9 \cdot 10^{-66}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3.4 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 1.45 \cdot 10^{-11}:\\ \;\;\;\;\frac{{x}^{-0.5}}{3}\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+16} \lor \neg \left(x \leq 7.2 \cdot 10^{+47}\right) \land x \leq 1.9 \cdot 10^{+178}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 61.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 3 \cdot \left(y \cdot \sqrt{x}\right)\\ \mathbf{if}\;x \leq 1.95 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-21}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-11}:\\ \;\;\;\;\frac{{x}^{-0.5}}{3}\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{+16} \lor \neg \left(x \leq 7.8 \cdot 10^{+47}\right) \land x \leq 1.8 \cdot 10^{+178}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (* 3.0 (* y (sqrt x)))))
   (if (<= x 1.95e-65)
     (pow (* x 9.0) -0.5)
     (if (<= x 3.8e-21)
       t_0
       (if (<= x 2.7e-11)
         (/ (pow x -0.5) 3.0)
         (if (or (<= x 1.4e+16) (and (not (<= x 7.8e+47)) (<= x 1.8e+178)))
           t_0
           (* (sqrt x) -3.0)))))))
double code(double x, double y) {
	double t_0 = 3.0 * (y * sqrt(x));
	double tmp;
	if (x <= 1.95e-65) {
		tmp = pow((x * 9.0), -0.5);
	} else if (x <= 3.8e-21) {
		tmp = t_0;
	} else if (x <= 2.7e-11) {
		tmp = pow(x, -0.5) / 3.0;
	} else if ((x <= 1.4e+16) || (!(x <= 7.8e+47) && (x <= 1.8e+178))) {
		tmp = t_0;
	} else {
		tmp = sqrt(x) * -3.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: tmp
    t_0 = 3.0d0 * (y * sqrt(x))
    if (x <= 1.95d-65) then
        tmp = (x * 9.0d0) ** (-0.5d0)
    else if (x <= 3.8d-21) then
        tmp = t_0
    else if (x <= 2.7d-11) then
        tmp = (x ** (-0.5d0)) / 3.0d0
    else if ((x <= 1.4d+16) .or. (.not. (x <= 7.8d+47)) .and. (x <= 1.8d+178)) then
        tmp = t_0
    else
        tmp = sqrt(x) * (-3.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = 3.0 * (y * Math.sqrt(x));
	double tmp;
	if (x <= 1.95e-65) {
		tmp = Math.pow((x * 9.0), -0.5);
	} else if (x <= 3.8e-21) {
		tmp = t_0;
	} else if (x <= 2.7e-11) {
		tmp = Math.pow(x, -0.5) / 3.0;
	} else if ((x <= 1.4e+16) || (!(x <= 7.8e+47) && (x <= 1.8e+178))) {
		tmp = t_0;
	} else {
		tmp = Math.sqrt(x) * -3.0;
	}
	return tmp;
}
def code(x, y):
	t_0 = 3.0 * (y * math.sqrt(x))
	tmp = 0
	if x <= 1.95e-65:
		tmp = math.pow((x * 9.0), -0.5)
	elif x <= 3.8e-21:
		tmp = t_0
	elif x <= 2.7e-11:
		tmp = math.pow(x, -0.5) / 3.0
	elif (x <= 1.4e+16) or (not (x <= 7.8e+47) and (x <= 1.8e+178)):
		tmp = t_0
	else:
		tmp = math.sqrt(x) * -3.0
	return tmp
function code(x, y)
	t_0 = Float64(3.0 * Float64(y * sqrt(x)))
	tmp = 0.0
	if (x <= 1.95e-65)
		tmp = Float64(x * 9.0) ^ -0.5;
	elseif (x <= 3.8e-21)
		tmp = t_0;
	elseif (x <= 2.7e-11)
		tmp = Float64((x ^ -0.5) / 3.0);
	elseif ((x <= 1.4e+16) || (!(x <= 7.8e+47) && (x <= 1.8e+178)))
		tmp = t_0;
	else
		tmp = Float64(sqrt(x) * -3.0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = 3.0 * (y * sqrt(x));
	tmp = 0.0;
	if (x <= 1.95e-65)
		tmp = (x * 9.0) ^ -0.5;
	elseif (x <= 3.8e-21)
		tmp = t_0;
	elseif (x <= 2.7e-11)
		tmp = (x ^ -0.5) / 3.0;
	elseif ((x <= 1.4e+16) || (~((x <= 7.8e+47)) && (x <= 1.8e+178)))
		tmp = t_0;
	else
		tmp = sqrt(x) * -3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.95e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3.8e-21], t$95$0, If[LessEqual[x, 2.7e-11], N[(N[Power[x, -0.5], $MachinePrecision] / 3.0), $MachinePrecision], If[Or[LessEqual[x, 1.4e+16], And[N[Not[LessEqual[x, 7.8e+47]], $MachinePrecision], LessEqual[x, 1.8e+178]]], t$95$0, N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 3 \cdot \left(y \cdot \sqrt{x}\right)\\
\mathbf{if}\;x \leq 1.95 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 3.8 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 2.7 \cdot 10^{-11}:\\
\;\;\;\;\frac{{x}^{-0.5}}{3}\\

\mathbf{elif}\;x \leq 1.4 \cdot 10^{+16} \lor \neg \left(x \leq 7.8 \cdot 10^{+47}\right) \land x \leq 1.8 \cdot 10^{+178}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 1.9500000000000002e-65

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

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

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

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

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

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

    if 1.9500000000000002e-65 < x < 3.7999999999999998e-21 or 2.70000000000000005e-11 < x < 1.4e16 or 7.8000000000000005e47 < x < 1.7999999999999999e178

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]

    if 3.7999999999999998e-21 < x < 2.70000000000000005e-11

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval76.2%

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

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111 \cdot \frac{1}{x}}} \]
      3. *-commutative76.2%

        \[\leadsto \sqrt{\color{blue}{\frac{1}{x} \cdot 0.1111111111111111}} \]
      4. metadata-eval76.2%

        \[\leadsto \sqrt{\frac{1}{x} \cdot \color{blue}{\frac{1}{9}}} \]
      5. div-inv76.4%

        \[\leadsto \sqrt{\color{blue}{\frac{\frac{1}{x}}{9}}} \]
      6. sqrt-div76.2%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{9}}} \]
      7. inv-pow76.2%

        \[\leadsto \frac{\sqrt{\color{blue}{{x}^{-1}}}}{\sqrt{9}} \]
      8. sqrt-pow176.2%

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

        \[\leadsto \frac{{x}^{\color{blue}{-0.5}}}{\sqrt{9}} \]
      10. metadata-eval76.2%

        \[\leadsto \frac{{x}^{-0.5}}{\color{blue}{3}} \]
    7. Applied egg-rr76.2%

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

    if 1.4e16 < x < 7.8000000000000005e47 or 1.7999999999999999e178 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative70.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg70.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-3 \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
    10. Simplified70.0%

      \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification75.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.95 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-21}:\\ \;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\ \mathbf{elif}\;x \leq 2.7 \cdot 10^{-11}:\\ \;\;\;\;\frac{{x}^{-0.5}}{3}\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{+16} \lor \neg \left(x \leq 7.8 \cdot 10^{+47}\right) \land x \leq 1.8 \cdot 10^{+178}:\\ \;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 85.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt{x \cdot 9} \cdot y\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+34}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y \leq 4.8 \cdot 10^{+31}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\

\mathbf{elif}\;y \leq 8 \cdot 10^{+78}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+99}:\\
\;\;\;\;\frac{{x}^{-0.5}}{3}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.74999999999999999e34 or 4.5e99 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot y \]
    8. Step-by-step derivation
      1. unpow199.6%

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

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot y \]

    if -1.74999999999999999e34 < y < 4.79999999999999965e31

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg96.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(-1 + \frac{0.1111111111111111}{x}\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative96.5%

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

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

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

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

        \[\leadsto \sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + \color{blue}{-3}\right) \]
    9. Applied egg-rr96.6%

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

    if 4.79999999999999965e31 < y < 8.00000000000000007e78

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    9. Step-by-step derivation
      1. add-sqr-sqrt98.8%

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      4. sqrt-pow198.9%

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

        \[\leadsto {\left({\left(x \cdot 9\right)}^{\color{blue}{0.25}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    10. Applied egg-rr98.9%

      \[\leadsto \color{blue}{{\left({\left(x \cdot 9\right)}^{0.25}\right)}^{2}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    11. Taylor expanded in y around inf 72.4%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]
    12. Step-by-step derivation
      1. associate-*r*72.5%

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

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

        \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]
    13. Simplified72.6%

      \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]

    if 8.00000000000000007e78 < y < 4.5e99

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval78.6%

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

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111 \cdot \frac{1}{x}}} \]
      3. *-commutative78.8%

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

        \[\leadsto \sqrt{\frac{1}{x} \cdot \color{blue}{\frac{1}{9}}} \]
      5. div-inv78.8%

        \[\leadsto \sqrt{\color{blue}{\frac{\frac{1}{x}}{9}}} \]
      6. sqrt-div78.8%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{9}}} \]
      7. inv-pow78.8%

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

        \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{-1}{2}\right)}}}{\sqrt{9}} \]
      9. metadata-eval78.8%

        \[\leadsto \frac{{x}^{\color{blue}{-0.5}}}{\sqrt{9}} \]
      10. metadata-eval78.8%

        \[\leadsto \frac{{x}^{-0.5}}{\color{blue}{3}} \]
    7. Applied egg-rr78.8%

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{3}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification88.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.75 \cdot 10^{+34}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \mathbf{elif}\;y \leq 4.8 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+78}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+99}:\\ \;\;\;\;\frac{{x}^{-0.5}}{3}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 85.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt{x \cdot 9} \cdot y\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+36}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y \leq 2.9 \cdot 10^{+31}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\

\mathbf{elif}\;y \leq 2 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\

\mathbf{elif}\;y \leq 9.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{{x}^{-0.5}}{3}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.05000000000000006e36 or 9.20000000000000053e98 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot y \]
    8. Step-by-step derivation
      1. unpow199.6%

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

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot y \]

    if -2.05000000000000006e36 < y < 2.9e31

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(0.3333333333333333 \cdot \frac{1}{x} - 3\right)} \]
    6. Step-by-step derivation
      1. sub-neg96.5%

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

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

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

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

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(-3 + \frac{0.3333333333333333}{x}\right)} \]
    7. Simplified96.6%

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

    if 2.9e31 < y < 1.99999999999999993e79

    1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    9. Step-by-step derivation
      1. add-sqr-sqrt98.8%

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      4. sqrt-pow198.9%

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

        \[\leadsto {\left({\left(x \cdot 9\right)}^{\color{blue}{0.25}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    10. Applied egg-rr98.9%

      \[\leadsto \color{blue}{{\left({\left(x \cdot 9\right)}^{0.25}\right)}^{2}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    11. Taylor expanded in y around inf 72.4%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]
    12. Step-by-step derivation
      1. associate-*r*72.5%

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

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

        \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]
    13. Simplified72.6%

      \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]

    if 1.99999999999999993e79 < y < 9.20000000000000053e98

    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval78.6%

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

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111 \cdot \frac{1}{x}}} \]
      3. *-commutative78.8%

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

        \[\leadsto \sqrt{\frac{1}{x} \cdot \color{blue}{\frac{1}{9}}} \]
      5. div-inv78.8%

        \[\leadsto \sqrt{\color{blue}{\frac{\frac{1}{x}}{9}}} \]
      6. sqrt-div78.8%

        \[\leadsto \color{blue}{\frac{\sqrt{\frac{1}{x}}}{\sqrt{9}}} \]
      7. inv-pow78.8%

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

        \[\leadsto \frac{\color{blue}{{x}^{\left(\frac{-1}{2}\right)}}}{\sqrt{9}} \]
      9. metadata-eval78.8%

        \[\leadsto \frac{{x}^{\color{blue}{-0.5}}}{\sqrt{9}} \]
      10. metadata-eval78.8%

        \[\leadsto \frac{{x}^{-0.5}}{\color{blue}{3}} \]
    7. Applied egg-rr78.8%

      \[\leadsto \color{blue}{\frac{{x}^{-0.5}}{3}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification88.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.05 \cdot 10^{+36}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+79}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;y \leq 9.2 \cdot 10^{+98}:\\ \;\;\;\;\frac{{x}^{-0.5}}{3}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 85.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.1 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 2.5 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\

\mathbf{elif}\;x \leq 0.00023:\\
\;\;\;\;\sqrt{x} \cdot \left(0.3333333333333333 \cdot \frac{1}{x} - 3\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 2.10000000000000003e-65

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

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

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

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

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

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

    if 2.10000000000000003e-65 < x < 2.49999999999999986e-21

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      4. sqrt-pow199.2%

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

        \[\leadsto {\left({\left(x \cdot 9\right)}^{\color{blue}{0.25}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    10. Applied egg-rr99.2%

      \[\leadsto \color{blue}{{\left({\left(x \cdot 9\right)}^{0.25}\right)}^{2}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    11. Taylor expanded in y around inf 61.7%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]
    12. Step-by-step derivation
      1. associate-*r*61.6%

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

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

        \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]
    13. Simplified61.7%

      \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]

    if 2.49999999999999986e-21 < x < 2.3000000000000001e-4

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3000000000000001e-4 < x

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 85.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 2.2 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\

\mathbf{elif}\;x \leq 1.65 \cdot 10^{-7}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 1.30000000000000005e-65

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

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

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

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

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

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

    if 1.30000000000000005e-65 < x < 2.2000000000000001e-21

    1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      4. sqrt-pow199.2%

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

        \[\leadsto {\left({\left(x \cdot 9\right)}^{\color{blue}{0.25}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    10. Applied egg-rr99.2%

      \[\leadsto \color{blue}{{\left({\left(x \cdot 9\right)}^{0.25}\right)}^{2}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    11. Taylor expanded in y around inf 61.7%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]
    12. Step-by-step derivation
      1. associate-*r*61.6%

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

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

        \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]
    13. Simplified61.7%

      \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]

    if 2.2000000000000001e-21 < x < 1.6500000000000001e-7

    1. Initial program 98.8%

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

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

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

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

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*98.9%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval98.9%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval98.9%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified98.9%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 85.2%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*85.0%

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative85.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg85.0%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \color{blue}{\left(0.1111111111111111 \cdot \frac{1}{x} + \left(-1\right)\right)} \]
      4. associate-*r/84.7%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\color{blue}{\frac{0.1111111111111111 \cdot 1}{x}} + \left(-1\right)\right) \]
      5. metadata-eval84.7%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(-1\right)\right) \]
      6. metadata-eval84.7%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{0.1111111111111111}{x} + \color{blue}{-1}\right) \]
      7. associate-*l*85.4%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)} \]
      8. +-commutative85.4%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(-1 + \frac{0.1111111111111111}{x}\right)}\right) \]
    7. Simplified85.4%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(-1 + \frac{0.1111111111111111}{x}\right)\right)} \]

    if 1.6500000000000001e-7 < x

    1. Initial program 99.5%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. sub-neg99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
      2. +-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
      3. associate-+l+99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
      4. *-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. metadata-eval99.5%

        \[\leadsto \left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      3. sqrt-prod99.7%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      4. pow199.7%

        \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    7. Step-by-step derivation
      1. unpow199.7%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    8. Simplified99.7%

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    9. Taylor expanded in x around inf 98.6%

      \[\leadsto \sqrt{x \cdot 9} \cdot \color{blue}{\left(y - 1\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification89.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.3 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-7}:\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 85.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.65 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-6}:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x 1.65e-65)
   (pow (* x 9.0) -0.5)
   (if (<= x 2e-21)
     (* (sqrt x) (* y 3.0))
     (if (<= x 3.8e-6)
       (* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))
       (* (sqrt (* x 9.0)) (+ y -1.0))))))
double code(double x, double y) {
	double tmp;
	if (x <= 1.65e-65) {
		tmp = pow((x * 9.0), -0.5);
	} else if (x <= 2e-21) {
		tmp = sqrt(x) * (y * 3.0);
	} else if (x <= 3.8e-6) {
		tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0);
	} else {
		tmp = sqrt((x * 9.0)) * (y + -1.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= 1.65d-65) then
        tmp = (x * 9.0d0) ** (-0.5d0)
    else if (x <= 2d-21) then
        tmp = sqrt(x) * (y * 3.0d0)
    else if (x <= 3.8d-6) then
        tmp = sqrt(x) * ((0.3333333333333333d0 / x) + (-3.0d0))
    else
        tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= 1.65e-65) {
		tmp = Math.pow((x * 9.0), -0.5);
	} else if (x <= 2e-21) {
		tmp = Math.sqrt(x) * (y * 3.0);
	} else if (x <= 3.8e-6) {
		tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
	} else {
		tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 1.65e-65:
		tmp = math.pow((x * 9.0), -0.5)
	elif x <= 2e-21:
		tmp = math.sqrt(x) * (y * 3.0)
	elif x <= 3.8e-6:
		tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0)
	else:
		tmp = math.sqrt((x * 9.0)) * (y + -1.0)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= 1.65e-65)
		tmp = Float64(x * 9.0) ^ -0.5;
	elseif (x <= 2e-21)
		tmp = Float64(sqrt(x) * Float64(y * 3.0));
	elseif (x <= 3.8e-6)
		tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / x) + -3.0));
	else
		tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= 1.65e-65)
		tmp = (x * 9.0) ^ -0.5;
	elseif (x <= 2e-21)
		tmp = sqrt(x) * (y * 3.0);
	elseif (x <= 3.8e-6)
		tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0);
	else
		tmp = sqrt((x * 9.0)) * (y + -1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, 1.65e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 2e-21], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e-6], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.65 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 2 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\

\mathbf{elif}\;x \leq 3.8 \cdot 10^{-6}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 1.6500000000000001e-65

    1. Initial program 99.2%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. associate-*l*99.1%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\right)} \]
      3. associate--l+99.1%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(y + \left(\frac{1}{x \cdot 9} - 1\right)\right)}\right) \]
      4. distribute-lft-in99.1%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-define99.2%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\mathsf{fma}\left(3, y, 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      6. sub-neg99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(-1\right)\right)}\right) \]
      7. +-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\left(-1\right) + \frac{1}{x \cdot 9}\right)}\right) \]
      8. distribute-lft-in99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{3 \cdot \left(-1\right) + 3 \cdot \frac{1}{x \cdot 9}}\right) \]
      9. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{-1} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      10. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{-3} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      11. *-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \frac{1}{\color{blue}{9 \cdot x}}\right) \]
      12. associate-/r*99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      13. associate-*r/99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \color{blue}{\frac{3 \cdot \frac{1}{9}}{x}}\right) \]
      14. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{3 \cdot \color{blue}{0.1111111111111111}}{x}\right) \]
      15. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{\color{blue}{0.3333333333333333}}{x}\right) \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 83.4%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111 \cdot \frac{1}{x}}} \]
      3. metadata-eval83.6%

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

        \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{\left(\frac{-1}{2}\right)}} \]
      8. metadata-eval83.7%

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

      \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{-0.5}} \]

    if 1.6500000000000001e-65 < x < 1.99999999999999982e-21

    1. Initial program 99.2%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. sub-neg99.2%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
      2. +-commutative99.2%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
      3. associate-+l+99.2%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
      4. *-commutative99.2%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*99.3%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval99.3%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval99.3%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. metadata-eval99.2%

        \[\leadsto \left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      3. sqrt-prod99.3%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      4. pow199.3%

        \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    6. Applied egg-rr99.1%

      \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    7. Step-by-step derivation
      1. unpow199.3%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    8. Simplified99.1%

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    9. Step-by-step derivation
      1. add-sqr-sqrt98.9%

        \[\leadsto \color{blue}{\left(\sqrt{\sqrt{x \cdot 9}} \cdot \sqrt{\sqrt{x \cdot 9}}\right)} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      2. pow298.9%

        \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{x \cdot 9}}\right)}^{2}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      3. pow1/298.9%

        \[\leadsto {\left(\sqrt{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      4. sqrt-pow199.2%

        \[\leadsto {\color{blue}{\left({\left(x \cdot 9\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      5. metadata-eval99.2%

        \[\leadsto {\left({\left(x \cdot 9\right)}^{\color{blue}{0.25}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    10. Applied egg-rr99.2%

      \[\leadsto \color{blue}{{\left({\left(x \cdot 9\right)}^{0.25}\right)}^{2}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    11. Taylor expanded in y around inf 61.7%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]
    12. Step-by-step derivation
      1. associate-*r*61.6%

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot y} \]
      2. *-commutative61.6%

        \[\leadsto \color{blue}{y \cdot \left(3 \cdot \sqrt{x}\right)} \]
      3. associate-*r*61.7%

        \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]
    13. Simplified61.7%

      \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]

    if 1.99999999999999982e-21 < x < 3.8e-6

    1. Initial program 98.8%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. sub-neg98.8%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
      2. +-commutative98.8%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
      3. associate-+l+98.8%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
      4. *-commutative98.8%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*98.9%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval98.9%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval98.9%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified98.9%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 85.2%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*85.0%

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative85.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg85.0%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \color{blue}{\left(0.1111111111111111 \cdot \frac{1}{x} + \left(-1\right)\right)} \]
      4. associate-*r/84.7%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\color{blue}{\frac{0.1111111111111111 \cdot 1}{x}} + \left(-1\right)\right) \]
      5. metadata-eval84.7%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(-1\right)\right) \]
      6. metadata-eval84.7%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{0.1111111111111111}{x} + \color{blue}{-1}\right) \]
      7. associate-*l*85.4%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)} \]
      8. +-commutative85.4%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(-1 + \frac{0.1111111111111111}{x}\right)}\right) \]
    7. Simplified85.4%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(-1 + \frac{0.1111111111111111}{x}\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative85.4%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(\frac{0.1111111111111111}{x} + -1\right)}\right) \]
      2. distribute-lft-in85.4%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot \frac{0.1111111111111111}{x} + 3 \cdot -1\right)} \]
      3. associate-*r/85.2%

        \[\leadsto \sqrt{x} \cdot \left(\color{blue}{\frac{3 \cdot 0.1111111111111111}{x}} + 3 \cdot -1\right) \]
      4. metadata-eval85.2%

        \[\leadsto \sqrt{x} \cdot \left(\frac{\color{blue}{0.3333333333333333}}{x} + 3 \cdot -1\right) \]
      5. metadata-eval85.2%

        \[\leadsto \sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + \color{blue}{-3}\right) \]
    9. Applied egg-rr85.2%

      \[\leadsto \sqrt{x} \cdot \color{blue}{\left(\frac{0.3333333333333333}{x} + -3\right)} \]

    if 3.8e-6 < x

    1. Initial program 99.5%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. sub-neg99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
      2. +-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
      3. associate-+l+99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
      4. *-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. metadata-eval99.5%

        \[\leadsto \left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      3. sqrt-prod99.7%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      4. pow199.7%

        \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    7. Step-by-step derivation
      1. unpow199.7%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    8. Simplified99.7%

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    9. Taylor expanded in x around inf 98.6%

      \[\leadsto \sqrt{x \cdot 9} \cdot \color{blue}{\left(y - 1\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification89.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.65 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 2 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-6}:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 85.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.95 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-11}:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3 - 3\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x 1.95e-65)
   (pow (* x 9.0) -0.5)
   (if (<= x 3e-21)
     (* (sqrt x) (* y 3.0))
     (if (<= x 8.5e-11)
       (* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))
       (* (sqrt x) (- (* y 3.0) 3.0))))))
double code(double x, double y) {
	double tmp;
	if (x <= 1.95e-65) {
		tmp = pow((x * 9.0), -0.5);
	} else if (x <= 3e-21) {
		tmp = sqrt(x) * (y * 3.0);
	} else if (x <= 8.5e-11) {
		tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0);
	} else {
		tmp = sqrt(x) * ((y * 3.0) - 3.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= 1.95d-65) then
        tmp = (x * 9.0d0) ** (-0.5d0)
    else if (x <= 3d-21) then
        tmp = sqrt(x) * (y * 3.0d0)
    else if (x <= 8.5d-11) then
        tmp = sqrt(x) * ((0.3333333333333333d0 / x) + (-3.0d0))
    else
        tmp = sqrt(x) * ((y * 3.0d0) - 3.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= 1.95e-65) {
		tmp = Math.pow((x * 9.0), -0.5);
	} else if (x <= 3e-21) {
		tmp = Math.sqrt(x) * (y * 3.0);
	} else if (x <= 8.5e-11) {
		tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
	} else {
		tmp = Math.sqrt(x) * ((y * 3.0) - 3.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 1.95e-65:
		tmp = math.pow((x * 9.0), -0.5)
	elif x <= 3e-21:
		tmp = math.sqrt(x) * (y * 3.0)
	elif x <= 8.5e-11:
		tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0)
	else:
		tmp = math.sqrt(x) * ((y * 3.0) - 3.0)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= 1.95e-65)
		tmp = Float64(x * 9.0) ^ -0.5;
	elseif (x <= 3e-21)
		tmp = Float64(sqrt(x) * Float64(y * 3.0));
	elseif (x <= 8.5e-11)
		tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / x) + -3.0));
	else
		tmp = Float64(sqrt(x) * Float64(Float64(y * 3.0) - 3.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= 1.95e-65)
		tmp = (x * 9.0) ^ -0.5;
	elseif (x <= 3e-21)
		tmp = sqrt(x) * (y * 3.0);
	elseif (x <= 8.5e-11)
		tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0);
	else
		tmp = sqrt(x) * ((y * 3.0) - 3.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, 1.95e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3e-21], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.5e-11], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(y * 3.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.95 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{elif}\;x \leq 3 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\

\mathbf{elif}\;x \leq 8.5 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3 - 3\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < 1.9500000000000002e-65

    1. Initial program 99.2%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. associate-*l*99.1%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\right)} \]
      3. associate--l+99.1%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(y + \left(\frac{1}{x \cdot 9} - 1\right)\right)}\right) \]
      4. distribute-lft-in99.1%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-define99.2%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\mathsf{fma}\left(3, y, 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      6. sub-neg99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(-1\right)\right)}\right) \]
      7. +-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\left(-1\right) + \frac{1}{x \cdot 9}\right)}\right) \]
      8. distribute-lft-in99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{3 \cdot \left(-1\right) + 3 \cdot \frac{1}{x \cdot 9}}\right) \]
      9. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{-1} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      10. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{-3} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      11. *-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \frac{1}{\color{blue}{9 \cdot x}}\right) \]
      12. associate-/r*99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      13. associate-*r/99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \color{blue}{\frac{3 \cdot \frac{1}{9}}{x}}\right) \]
      14. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{3 \cdot \color{blue}{0.1111111111111111}}{x}\right) \]
      15. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{\color{blue}{0.3333333333333333}}{x}\right) \]
    3. Simplified99.2%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 83.4%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval83.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod83.6%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111 \cdot \frac{1}{x}}} \]
      3. metadata-eval83.6%

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow83.6%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down83.8%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative83.8%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow183.7%

        \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{\left(\frac{-1}{2}\right)}} \]
      8. metadata-eval83.7%

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr83.7%

      \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{-0.5}} \]

    if 1.9500000000000002e-65 < x < 2.99999999999999991e-21

    1. Initial program 99.2%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. sub-neg99.2%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
      2. +-commutative99.2%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
      3. associate-+l+99.2%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
      4. *-commutative99.2%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*99.3%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval99.3%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval99.3%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. metadata-eval99.2%

        \[\leadsto \left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      3. sqrt-prod99.3%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      4. pow199.3%

        \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    6. Applied egg-rr99.1%

      \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    7. Step-by-step derivation
      1. unpow199.3%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    8. Simplified99.1%

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    9. Step-by-step derivation
      1. add-sqr-sqrt98.9%

        \[\leadsto \color{blue}{\left(\sqrt{\sqrt{x \cdot 9}} \cdot \sqrt{\sqrt{x \cdot 9}}\right)} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      2. pow298.9%

        \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{x \cdot 9}}\right)}^{2}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      3. pow1/298.9%

        \[\leadsto {\left(\sqrt{\color{blue}{{\left(x \cdot 9\right)}^{0.5}}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      4. sqrt-pow199.2%

        \[\leadsto {\color{blue}{\left({\left(x \cdot 9\right)}^{\left(\frac{0.5}{2}\right)}\right)}}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
      5. metadata-eval99.2%

        \[\leadsto {\left({\left(x \cdot 9\right)}^{\color{blue}{0.25}}\right)}^{2} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    10. Applied egg-rr99.2%

      \[\leadsto \color{blue}{{\left({\left(x \cdot 9\right)}^{0.25}\right)}^{2}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    11. Taylor expanded in y around inf 61.7%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot y\right)} \]
    12. Step-by-step derivation
      1. associate-*r*61.6%

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot y} \]
      2. *-commutative61.6%

        \[\leadsto \color{blue}{y \cdot \left(3 \cdot \sqrt{x}\right)} \]
      3. associate-*r*61.7%

        \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]
    13. Simplified61.7%

      \[\leadsto \color{blue}{\left(y \cdot 3\right) \cdot \sqrt{x}} \]

    if 2.99999999999999991e-21 < x < 8.50000000000000037e-11

    1. Initial program 98.8%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. sub-neg98.8%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
      2. +-commutative98.8%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
      3. associate-+l+98.8%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
      4. *-commutative98.8%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*98.9%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval98.9%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval98.9%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified98.9%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 85.2%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*85.0%

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative85.0%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg85.0%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \color{blue}{\left(0.1111111111111111 \cdot \frac{1}{x} + \left(-1\right)\right)} \]
      4. associate-*r/84.7%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\color{blue}{\frac{0.1111111111111111 \cdot 1}{x}} + \left(-1\right)\right) \]
      5. metadata-eval84.7%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(-1\right)\right) \]
      6. metadata-eval84.7%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{0.1111111111111111}{x} + \color{blue}{-1}\right) \]
      7. associate-*l*85.4%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)} \]
      8. +-commutative85.4%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(-1 + \frac{0.1111111111111111}{x}\right)}\right) \]
    7. Simplified85.4%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(-1 + \frac{0.1111111111111111}{x}\right)\right)} \]
    8. Step-by-step derivation
      1. +-commutative85.4%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(\frac{0.1111111111111111}{x} + -1\right)}\right) \]
      2. distribute-lft-in85.4%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot \frac{0.1111111111111111}{x} + 3 \cdot -1\right)} \]
      3. associate-*r/85.2%

        \[\leadsto \sqrt{x} \cdot \left(\color{blue}{\frac{3 \cdot 0.1111111111111111}{x}} + 3 \cdot -1\right) \]
      4. metadata-eval85.2%

        \[\leadsto \sqrt{x} \cdot \left(\frac{\color{blue}{0.3333333333333333}}{x} + 3 \cdot -1\right) \]
      5. metadata-eval85.2%

        \[\leadsto \sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + \color{blue}{-3}\right) \]
    9. Applied egg-rr85.2%

      \[\leadsto \sqrt{x} \cdot \color{blue}{\left(\frac{0.3333333333333333}{x} + -3\right)} \]

    if 8.50000000000000037e-11 < x

    1. Initial program 99.5%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. associate-*l*99.5%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\right)} \]
      3. associate--l+99.5%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(y + \left(\frac{1}{x \cdot 9} - 1\right)\right)}\right) \]
      4. distribute-lft-in99.5%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-define99.5%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\mathsf{fma}\left(3, y, 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      6. sub-neg99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(-1\right)\right)}\right) \]
      7. +-commutative99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\left(-1\right) + \frac{1}{x \cdot 9}\right)}\right) \]
      8. distribute-lft-in99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{3 \cdot \left(-1\right) + 3 \cdot \frac{1}{x \cdot 9}}\right) \]
      9. metadata-eval99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{-1} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      10. metadata-eval99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{-3} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      11. *-commutative99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \frac{1}{\color{blue}{9 \cdot x}}\right) \]
      12. associate-/r*99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      13. associate-*r/99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \color{blue}{\frac{3 \cdot \frac{1}{9}}{x}}\right) \]
      14. metadata-eval99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{3 \cdot \color{blue}{0.1111111111111111}}{x}\right) \]
      15. metadata-eval99.5%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{\color{blue}{0.3333333333333333}}{x}\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 98.5%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot y - 3\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification89.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.95 \cdot 10^{-65}:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{elif}\;x \leq 3 \cdot 10^{-21}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-11}:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(y \cdot 3 - 3\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 98.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 27.5:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333 + 3 \cdot \left(x \cdot y\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x 27.5)
   (* (sqrt x) (/ (+ 0.3333333333333333 (* 3.0 (* x y))) x))
   (* (sqrt (* x 9.0)) (+ y -1.0))))
double code(double x, double y) {
	double tmp;
	if (x <= 27.5) {
		tmp = sqrt(x) * ((0.3333333333333333 + (3.0 * (x * y))) / x);
	} else {
		tmp = sqrt((x * 9.0)) * (y + -1.0);
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= 27.5d0) then
        tmp = sqrt(x) * ((0.3333333333333333d0 + (3.0d0 * (x * y))) / x)
    else
        tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= 27.5) {
		tmp = Math.sqrt(x) * ((0.3333333333333333 + (3.0 * (x * y))) / x);
	} else {
		tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 27.5:
		tmp = math.sqrt(x) * ((0.3333333333333333 + (3.0 * (x * y))) / x)
	else:
		tmp = math.sqrt((x * 9.0)) * (y + -1.0)
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= 27.5)
		tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 + Float64(3.0 * Float64(x * y))) / x));
	else
		tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0));
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= 27.5)
		tmp = sqrt(x) * ((0.3333333333333333 + (3.0 * (x * y))) / x);
	else
		tmp = sqrt((x * 9.0)) * (y + -1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, 27.5], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 + N[(3.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 27.5:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333 + 3 \cdot \left(x \cdot y\right)}{x}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 27.5

    1. Initial program 99.2%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. associate-*l*99.2%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\right)} \]
      3. associate--l+99.2%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(y + \left(\frac{1}{x \cdot 9} - 1\right)\right)}\right) \]
      4. distribute-lft-in99.2%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-define99.2%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\mathsf{fma}\left(3, y, 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      6. sub-neg99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(-1\right)\right)}\right) \]
      7. +-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\left(-1\right) + \frac{1}{x \cdot 9}\right)}\right) \]
      8. distribute-lft-in99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{3 \cdot \left(-1\right) + 3 \cdot \frac{1}{x \cdot 9}}\right) \]
      9. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{-1} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      10. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{-3} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      11. *-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \frac{1}{\color{blue}{9 \cdot x}}\right) \]
      12. associate-/r*99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      13. associate-*r/99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \color{blue}{\frac{3 \cdot \frac{1}{9}}{x}}\right) \]
      14. metadata-eval99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{3 \cdot \color{blue}{0.1111111111111111}}{x}\right) \]
      15. metadata-eval99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{\color{blue}{0.3333333333333333}}{x}\right) \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 99.3%

      \[\leadsto \sqrt{x} \cdot \color{blue}{\frac{0.3333333333333333 + x \cdot \left(3 \cdot y - 3\right)}{x}} \]
    6. Taylor expanded in y around inf 98.8%

      \[\leadsto \sqrt{x} \cdot \frac{0.3333333333333333 + \color{blue}{3 \cdot \left(x \cdot y\right)}}{x} \]

    if 27.5 < x

    1. Initial program 99.5%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. sub-neg99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
      2. +-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
      3. associate-+l+99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
      4. *-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.5%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. metadata-eval99.5%

        \[\leadsto \left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      3. sqrt-prod99.7%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      4. pow199.7%

        \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    7. Step-by-step derivation
      1. unpow199.7%

        \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    8. Simplified99.7%

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
    9. Taylor expanded in x around inf 98.6%

      \[\leadsto \sqrt{x \cdot 9} \cdot \color{blue}{\left(y - 1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 27.5:\\ \;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333 + 3 \cdot \left(x \cdot y\right)}{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 99.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \sqrt{x \cdot 9} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \end{array} \]
(FPCore (x y)
 :precision binary64
 (* (sqrt (* x 9.0)) (+ (/ 0.1111111111111111 x) (+ y -1.0))))
double code(double x, double y) {
	return sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = sqrt((x * 9.0d0)) * ((0.1111111111111111d0 / x) + (y + (-1.0d0)))
end function
public static double code(double x, double y) {
	return Math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0));
}
def code(x, y):
	return math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0))
function code(x, y)
	return Float64(sqrt(Float64(x * 9.0)) * Float64(Float64(0.1111111111111111 / x) + Float64(y + -1.0)))
end
function tmp = code(x, y)
	tmp = sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0));
end
code[x_, y_] := N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(N[(0.1111111111111111 / x), $MachinePrecision] + N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{x \cdot 9} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)
\end{array}
Derivation
  1. Initial program 99.3%

    \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
  2. Step-by-step derivation
    1. sub-neg99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
    2. +-commutative99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
    3. associate-+l+99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
    4. *-commutative99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
    5. associate-/r*99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
    6. metadata-eval99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
    7. metadata-eval99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
  3. Simplified99.3%

    \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-commutative99.3%

      \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. metadata-eval99.3%

      \[\leadsto \left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    3. sqrt-prod99.5%

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    4. pow199.5%

      \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
  6. Applied egg-rr99.5%

    \[\leadsto \color{blue}{{\left(\sqrt{x \cdot 9}\right)}^{1}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
  7. Step-by-step derivation
    1. unpow199.5%

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
  8. Simplified99.5%

    \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right) \]
  9. Add Preprocessing

Alternative 16: 60.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 27.5:\\ \;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x 27.5) (pow (* x 9.0) -0.5) (* (sqrt x) -3.0)))
double code(double x, double y) {
	double tmp;
	if (x <= 27.5) {
		tmp = pow((x * 9.0), -0.5);
	} else {
		tmp = sqrt(x) * -3.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= 27.5d0) then
        tmp = (x * 9.0d0) ** (-0.5d0)
    else
        tmp = sqrt(x) * (-3.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= 27.5) {
		tmp = Math.pow((x * 9.0), -0.5);
	} else {
		tmp = Math.sqrt(x) * -3.0;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 27.5:
		tmp = math.pow((x * 9.0), -0.5)
	else:
		tmp = math.sqrt(x) * -3.0
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= 27.5)
		tmp = Float64(x * 9.0) ^ -0.5;
	else
		tmp = Float64(sqrt(x) * -3.0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= 27.5)
		tmp = (x * 9.0) ^ -0.5;
	else
		tmp = sqrt(x) * -3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, 27.5], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 27.5:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 27.5

    1. Initial program 99.2%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. associate-*l*99.2%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\right)} \]
      3. associate--l+99.2%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(y + \left(\frac{1}{x \cdot 9} - 1\right)\right)}\right) \]
      4. distribute-lft-in99.2%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-define99.2%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\mathsf{fma}\left(3, y, 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      6. sub-neg99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(-1\right)\right)}\right) \]
      7. +-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\left(-1\right) + \frac{1}{x \cdot 9}\right)}\right) \]
      8. distribute-lft-in99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{3 \cdot \left(-1\right) + 3 \cdot \frac{1}{x \cdot 9}}\right) \]
      9. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{-1} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      10. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{-3} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      11. *-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \frac{1}{\color{blue}{9 \cdot x}}\right) \]
      12. associate-/r*99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      13. associate-*r/99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \color{blue}{\frac{3 \cdot \frac{1}{9}}{x}}\right) \]
      14. metadata-eval99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{3 \cdot \color{blue}{0.1111111111111111}}{x}\right) \]
      15. metadata-eval99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{\color{blue}{0.3333333333333333}}{x}\right) \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 75.2%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval75.2%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod75.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111 \cdot \frac{1}{x}}} \]
      3. metadata-eval75.4%

        \[\leadsto \sqrt{\color{blue}{{9}^{-1}} \cdot \frac{1}{x}} \]
      4. inv-pow75.4%

        \[\leadsto \sqrt{{9}^{-1} \cdot \color{blue}{{x}^{-1}}} \]
      5. unpow-prod-down75.5%

        \[\leadsto \sqrt{\color{blue}{{\left(9 \cdot x\right)}^{-1}}} \]
      6. *-commutative75.5%

        \[\leadsto \sqrt{{\color{blue}{\left(x \cdot 9\right)}}^{-1}} \]
      7. sqrt-pow175.5%

        \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{\left(\frac{-1}{2}\right)}} \]
      8. metadata-eval75.5%

        \[\leadsto {\left(x \cdot 9\right)}^{\color{blue}{-0.5}} \]
    7. Applied egg-rr75.5%

      \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{-0.5}} \]

    if 27.5 < x

    1. Initial program 99.5%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. sub-neg99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
      2. +-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
      3. associate-+l+99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
      4. *-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 50.9%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*50.9%

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative50.9%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg50.9%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \color{blue}{\left(0.1111111111111111 \cdot \frac{1}{x} + \left(-1\right)\right)} \]
      4. associate-*r/50.9%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\color{blue}{\frac{0.1111111111111111 \cdot 1}{x}} + \left(-1\right)\right) \]
      5. metadata-eval50.9%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(-1\right)\right) \]
      6. metadata-eval50.9%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{0.1111111111111111}{x} + \color{blue}{-1}\right) \]
      7. associate-*l*50.9%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)} \]
      8. +-commutative50.9%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(-1 + \frac{0.1111111111111111}{x}\right)}\right) \]
    7. Simplified50.9%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(-1 + \frac{0.1111111111111111}{x}\right)\right)} \]
    8. Taylor expanded in x around inf 49.8%

      \[\leadsto \color{blue}{-3 \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative49.8%

        \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
    10. Simplified49.8%

      \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 60.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 27.5:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x 27.5) (sqrt (/ 0.1111111111111111 x)) (* (sqrt x) -3.0)))
double code(double x, double y) {
	double tmp;
	if (x <= 27.5) {
		tmp = sqrt((0.1111111111111111 / x));
	} else {
		tmp = sqrt(x) * -3.0;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: tmp
    if (x <= 27.5d0) then
        tmp = sqrt((0.1111111111111111d0 / x))
    else
        tmp = sqrt(x) * (-3.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double tmp;
	if (x <= 27.5) {
		tmp = Math.sqrt((0.1111111111111111 / x));
	} else {
		tmp = Math.sqrt(x) * -3.0;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 27.5:
		tmp = math.sqrt((0.1111111111111111 / x))
	else:
		tmp = math.sqrt(x) * -3.0
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= 27.5)
		tmp = sqrt(Float64(0.1111111111111111 / x));
	else
		tmp = Float64(sqrt(x) * -3.0);
	end
	return tmp
end
function tmp_2 = code(x, y)
	tmp = 0.0;
	if (x <= 27.5)
		tmp = sqrt((0.1111111111111111 / x));
	else
		tmp = sqrt(x) * -3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, 27.5], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 27.5:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 27.5

    1. Initial program 99.2%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. *-commutative99.2%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
      2. associate-*l*99.2%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\right)} \]
      3. associate--l+99.2%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(y + \left(\frac{1}{x \cdot 9} - 1\right)\right)}\right) \]
      4. distribute-lft-in99.2%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-define99.2%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\mathsf{fma}\left(3, y, 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      6. sub-neg99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(-1\right)\right)}\right) \]
      7. +-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\left(-1\right) + \frac{1}{x \cdot 9}\right)}\right) \]
      8. distribute-lft-in99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{3 \cdot \left(-1\right) + 3 \cdot \frac{1}{x \cdot 9}}\right) \]
      9. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{-1} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      10. metadata-eval99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{-3} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
      11. *-commutative99.2%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \frac{1}{\color{blue}{9 \cdot x}}\right) \]
      12. associate-/r*99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
      13. associate-*r/99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \color{blue}{\frac{3 \cdot \frac{1}{9}}{x}}\right) \]
      14. metadata-eval99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{3 \cdot \color{blue}{0.1111111111111111}}{x}\right) \]
      15. metadata-eval99.3%

        \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{\color{blue}{0.3333333333333333}}{x}\right) \]
    3. Simplified99.3%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 75.2%

      \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
    6. Step-by-step derivation
      1. metadata-eval75.2%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
      2. sqrt-prod75.4%

        \[\leadsto \color{blue}{\sqrt{0.1111111111111111 \cdot \frac{1}{x}}} \]
      3. div-inv75.4%

        \[\leadsto \sqrt{\color{blue}{\frac{0.1111111111111111}{x}}} \]
    7. Applied egg-rr75.4%

      \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]

    if 27.5 < x

    1. Initial program 99.5%

      \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. Step-by-step derivation
      1. sub-neg99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
      2. +-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
      3. associate-+l+99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
      4. *-commutative99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
      5. associate-/r*99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
      6. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
      7. metadata-eval99.5%

        \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
    3. Simplified99.5%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 50.9%

      \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*50.9%

        \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
      2. *-commutative50.9%

        \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
      3. sub-neg50.9%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \color{blue}{\left(0.1111111111111111 \cdot \frac{1}{x} + \left(-1\right)\right)} \]
      4. associate-*r/50.9%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\color{blue}{\frac{0.1111111111111111 \cdot 1}{x}} + \left(-1\right)\right) \]
      5. metadata-eval50.9%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(-1\right)\right) \]
      6. metadata-eval50.9%

        \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{0.1111111111111111}{x} + \color{blue}{-1}\right) \]
      7. associate-*l*50.9%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)} \]
      8. +-commutative50.9%

        \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(-1 + \frac{0.1111111111111111}{x}\right)}\right) \]
    7. Simplified50.9%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(-1 + \frac{0.1111111111111111}{x}\right)\right)} \]
    8. Taylor expanded in x around inf 49.8%

      \[\leadsto \color{blue}{-3 \cdot \sqrt{x}} \]
    9. Step-by-step derivation
      1. *-commutative49.8%

        \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
    10. Simplified49.8%

      \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 37.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \sqrt{\frac{0.1111111111111111}{x}} \end{array} \]
(FPCore (x y) :precision binary64 (sqrt (/ 0.1111111111111111 x)))
double code(double x, double y) {
	return sqrt((0.1111111111111111 / x));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = sqrt((0.1111111111111111d0 / x))
end function
public static double code(double x, double y) {
	return Math.sqrt((0.1111111111111111 / x));
}
def code(x, y):
	return math.sqrt((0.1111111111111111 / x))
function code(x, y)
	return sqrt(Float64(0.1111111111111111 / x))
end
function tmp = code(x, y)
	tmp = sqrt((0.1111111111111111 / x));
end
code[x_, y_] := N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\frac{0.1111111111111111}{x}}
\end{array}
Derivation
  1. Initial program 99.3%

    \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
  2. Step-by-step derivation
    1. *-commutative99.3%

      \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
    2. associate-*l*99.3%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)\right)} \]
    3. associate--l+99.3%

      \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(y + \left(\frac{1}{x \cdot 9} - 1\right)\right)}\right) \]
    4. distribute-lft-in99.3%

      \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
    5. fma-define99.4%

      \[\leadsto \sqrt{x} \cdot \color{blue}{\mathsf{fma}\left(3, y, 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
    6. sub-neg99.4%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(-1\right)\right)}\right) \]
    7. +-commutative99.4%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{\left(\left(-1\right) + \frac{1}{x \cdot 9}\right)}\right) \]
    8. distribute-lft-in99.3%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{3 \cdot \left(-1\right) + 3 \cdot \frac{1}{x \cdot 9}}\right) \]
    9. metadata-eval99.3%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, 3 \cdot \color{blue}{-1} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
    10. metadata-eval99.3%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, \color{blue}{-3} + 3 \cdot \frac{1}{x \cdot 9}\right) \]
    11. *-commutative99.3%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \frac{1}{\color{blue}{9 \cdot x}}\right) \]
    12. associate-/r*99.4%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + 3 \cdot \color{blue}{\frac{\frac{1}{9}}{x}}\right) \]
    13. associate-*r/99.4%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \color{blue}{\frac{3 \cdot \frac{1}{9}}{x}}\right) \]
    14. metadata-eval99.4%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{3 \cdot \color{blue}{0.1111111111111111}}{x}\right) \]
    15. metadata-eval99.4%

      \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{\color{blue}{0.3333333333333333}}{x}\right) \]
  3. Simplified99.4%

    \[\leadsto \color{blue}{\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in x around 0 40.9%

    \[\leadsto \color{blue}{0.3333333333333333 \cdot \sqrt{\frac{1}{x}}} \]
  6. Step-by-step derivation
    1. metadata-eval40.9%

      \[\leadsto \color{blue}{\sqrt{0.1111111111111111}} \cdot \sqrt{\frac{1}{x}} \]
    2. sqrt-prod41.0%

      \[\leadsto \color{blue}{\sqrt{0.1111111111111111 \cdot \frac{1}{x}}} \]
    3. div-inv41.1%

      \[\leadsto \sqrt{\color{blue}{\frac{0.1111111111111111}{x}}} \]
  7. Applied egg-rr41.1%

    \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
  8. Add Preprocessing

Alternative 19: 3.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \sqrt{x \cdot 9} \end{array} \]
(FPCore (x y) :precision binary64 (sqrt (* x 9.0)))
double code(double x, double y) {
	return sqrt((x * 9.0));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = sqrt((x * 9.0d0))
end function
public static double code(double x, double y) {
	return Math.sqrt((x * 9.0));
}
def code(x, y):
	return math.sqrt((x * 9.0))
function code(x, y)
	return sqrt(Float64(x * 9.0))
end
function tmp = code(x, y)
	tmp = sqrt((x * 9.0));
end
code[x_, y_] := N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{x \cdot 9}
\end{array}
Derivation
  1. Initial program 99.3%

    \[\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right) \]
  2. Step-by-step derivation
    1. sub-neg99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(y + \frac{1}{x \cdot 9}\right) + \left(-1\right)\right)} \]
    2. +-commutative99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\left(\frac{1}{x \cdot 9} + y\right)} + \left(-1\right)\right) \]
    3. associate-+l+99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\frac{1}{x \cdot 9} + \left(y + \left(-1\right)\right)\right)} \]
    4. *-commutative99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{1}{\color{blue}{9 \cdot x}} + \left(y + \left(-1\right)\right)\right) \]
    5. associate-/r*99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\frac{\frac{1}{9}}{x}} + \left(y + \left(-1\right)\right)\right) \]
    6. metadata-eval99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(y + \left(-1\right)\right)\right) \]
    7. metadata-eval99.3%

      \[\leadsto \left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + \color{blue}{-1}\right)\right) \]
  3. Simplified99.3%

    \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 63.9%

    \[\leadsto \color{blue}{3 \cdot \left(\sqrt{x} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)\right)} \]
  6. Step-by-step derivation
    1. associate-*r*63.9%

      \[\leadsto \color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right)} \]
    2. *-commutative63.9%

      \[\leadsto \color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \left(0.1111111111111111 \cdot \frac{1}{x} - 1\right) \]
    3. sub-neg63.9%

      \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \color{blue}{\left(0.1111111111111111 \cdot \frac{1}{x} + \left(-1\right)\right)} \]
    4. associate-*r/63.9%

      \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\color{blue}{\frac{0.1111111111111111 \cdot 1}{x}} + \left(-1\right)\right) \]
    5. metadata-eval63.9%

      \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{\color{blue}{0.1111111111111111}}{x} + \left(-1\right)\right) \]
    6. metadata-eval63.9%

      \[\leadsto \left(\sqrt{x} \cdot 3\right) \cdot \left(\frac{0.1111111111111111}{x} + \color{blue}{-1}\right) \]
    7. associate-*l*64.0%

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)} \]
    8. +-commutative64.0%

      \[\leadsto \sqrt{x} \cdot \left(3 \cdot \color{blue}{\left(-1 + \frac{0.1111111111111111}{x}\right)}\right) \]
  7. Simplified64.0%

    \[\leadsto \color{blue}{\sqrt{x} \cdot \left(3 \cdot \left(-1 + \frac{0.1111111111111111}{x}\right)\right)} \]
  8. Taylor expanded in x around inf 24.3%

    \[\leadsto \color{blue}{-3 \cdot \sqrt{x}} \]
  9. Step-by-step derivation
    1. *-commutative24.3%

      \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
  10. Simplified24.3%

    \[\leadsto \color{blue}{\sqrt{x} \cdot -3} \]
  11. Step-by-step derivation
    1. add-sqr-sqrt0.0%

      \[\leadsto \color{blue}{\sqrt{\sqrt{x} \cdot -3} \cdot \sqrt{\sqrt{x} \cdot -3}} \]
    2. sqrt-unprod3.5%

      \[\leadsto \color{blue}{\sqrt{\left(\sqrt{x} \cdot -3\right) \cdot \left(\sqrt{x} \cdot -3\right)}} \]
    3. swap-sqr3.5%

      \[\leadsto \sqrt{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \left(-3 \cdot -3\right)}} \]
    4. add-sqr-sqrt3.5%

      \[\leadsto \sqrt{\color{blue}{x} \cdot \left(-3 \cdot -3\right)} \]
    5. metadata-eval3.5%

      \[\leadsto \sqrt{x \cdot \color{blue}{9}} \]
    6. pow1/23.5%

      \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{0.5}} \]
  12. Applied egg-rr3.5%

    \[\leadsto \color{blue}{{\left(x \cdot 9\right)}^{0.5}} \]
  13. Step-by-step derivation
    1. unpow1/23.5%

      \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \]
  14. Simplified3.5%

    \[\leadsto \color{blue}{\sqrt{x \cdot 9}} \]
  15. Add Preprocessing

Developer target: 99.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ 3 \cdot \left(y \cdot \sqrt{x} + \left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right) \end{array} \]
(FPCore (x y)
 :precision binary64
 (* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x)))))
double code(double x, double y) {
	return 3.0 * ((y * sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * sqrt(x)));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = 3.0d0 * ((y * sqrt(x)) + (((1.0d0 / (x * 9.0d0)) - 1.0d0) * sqrt(x)))
end function
public static double code(double x, double y) {
	return 3.0 * ((y * Math.sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * Math.sqrt(x)));
}
def code(x, y):
	return 3.0 * ((y * math.sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * math.sqrt(x)))
function code(x, y)
	return Float64(3.0 * Float64(Float64(y * sqrt(x)) + Float64(Float64(Float64(1.0 / Float64(x * 9.0)) - 1.0) * sqrt(x))))
end
function tmp = code(x, y)
	tmp = 3.0 * ((y * sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * sqrt(x)));
end
code[x_, y_] := N[(3.0 * N[(N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
3 \cdot \left(y \cdot \sqrt{x} + \left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right)
\end{array}

Reproduce

?
herbie shell --seed 2024103 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B"
  :precision binary64

  :alt
  (* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x))))

  (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))