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

Percentage Accurate: 99.4% → 99.4%
Time: 13.2s
Alternatives: 11
Speedup: N/A×

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 11 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.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right) \end{array} \]
(FPCore (x y)
 :precision binary64
 (* (sqrt x) (fma 3.0 y (+ -3.0 (/ 0.3333333333333333 x)))))
double code(double x, double y) {
	return sqrt(x) * fma(3.0, y, (-3.0 + (0.3333333333333333 / x)));
}
function code(x, y)
	return Float64(sqrt(x) * fma(3.0, y, Float64(-3.0 + Float64(0.3333333333333333 / x))))
end
code[x_, y_] := N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * y + N[(-3.0 + N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right)
\end{array}
Derivation
  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.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+99.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-in99.6%

      \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
    5. fma-def99.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. Final simplification99.5%

    \[\leadsto \sqrt{x} \cdot \mathsf{fma}\left(3, y, -3 + \frac{0.3333333333333333}{x}\right) \]

Alternative 2: 59.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\frac{0.1111111111111111}{x}}\\ t_1 := 3 \cdot \left(\sqrt{x} \cdot y\right)\\ t_2 := \sqrt{x} \cdot -3\\ \mathbf{if}\;y \leq -8 \cdot 10^{-6}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -4.35 \cdot 10^{-225}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-297}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-252}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 2100000000 \lor \neg \left(y \leq 1.7 \cdot 10^{+59}\right) \land y \leq 2.35 \cdot 10^{+113}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (sqrt (/ 0.1111111111111111 x)))
        (t_1 (* 3.0 (* (sqrt x) y)))
        (t_2 (* (sqrt x) -3.0)))
   (if (<= y -8e-6)
     t_1
     (if (<= y -4.35e-225)
       t_2
       (if (<= y 3.7e-297)
         t_0
         (if (<= y 5e-252)
           t_2
           (if (or (<= y 2100000000.0)
                   (and (not (<= y 1.7e+59)) (<= y 2.35e+113)))
             t_0
             t_1)))))))
double code(double x, double y) {
	double t_0 = sqrt((0.1111111111111111 / x));
	double t_1 = 3.0 * (sqrt(x) * y);
	double t_2 = sqrt(x) * -3.0;
	double tmp;
	if (y <= -8e-6) {
		tmp = t_1;
	} else if (y <= -4.35e-225) {
		tmp = t_2;
	} else if (y <= 3.7e-297) {
		tmp = t_0;
	} else if (y <= 5e-252) {
		tmp = t_2;
	} else if ((y <= 2100000000.0) || (!(y <= 1.7e+59) && (y <= 2.35e+113))) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = sqrt((0.1111111111111111d0 / x))
    t_1 = 3.0d0 * (sqrt(x) * y)
    t_2 = sqrt(x) * (-3.0d0)
    if (y <= (-8d-6)) then
        tmp = t_1
    else if (y <= (-4.35d-225)) then
        tmp = t_2
    else if (y <= 3.7d-297) then
        tmp = t_0
    else if (y <= 5d-252) then
        tmp = t_2
    else if ((y <= 2100000000.0d0) .or. (.not. (y <= 1.7d+59)) .and. (y <= 2.35d+113)) then
        tmp = t_0
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sqrt((0.1111111111111111 / x));
	double t_1 = 3.0 * (Math.sqrt(x) * y);
	double t_2 = Math.sqrt(x) * -3.0;
	double tmp;
	if (y <= -8e-6) {
		tmp = t_1;
	} else if (y <= -4.35e-225) {
		tmp = t_2;
	} else if (y <= 3.7e-297) {
		tmp = t_0;
	} else if (y <= 5e-252) {
		tmp = t_2;
	} else if ((y <= 2100000000.0) || (!(y <= 1.7e+59) && (y <= 2.35e+113))) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sqrt((0.1111111111111111 / x))
	t_1 = 3.0 * (math.sqrt(x) * y)
	t_2 = math.sqrt(x) * -3.0
	tmp = 0
	if y <= -8e-6:
		tmp = t_1
	elif y <= -4.35e-225:
		tmp = t_2
	elif y <= 3.7e-297:
		tmp = t_0
	elif y <= 5e-252:
		tmp = t_2
	elif (y <= 2100000000.0) or (not (y <= 1.7e+59) and (y <= 2.35e+113)):
		tmp = t_0
	else:
		tmp = t_1
	return tmp
function code(x, y)
	t_0 = sqrt(Float64(0.1111111111111111 / x))
	t_1 = Float64(3.0 * Float64(sqrt(x) * y))
	t_2 = Float64(sqrt(x) * -3.0)
	tmp = 0.0
	if (y <= -8e-6)
		tmp = t_1;
	elseif (y <= -4.35e-225)
		tmp = t_2;
	elseif (y <= 3.7e-297)
		tmp = t_0;
	elseif (y <= 5e-252)
		tmp = t_2;
	elseif ((y <= 2100000000.0) || (!(y <= 1.7e+59) && (y <= 2.35e+113)))
		tmp = t_0;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sqrt((0.1111111111111111 / x));
	t_1 = 3.0 * (sqrt(x) * y);
	t_2 = sqrt(x) * -3.0;
	tmp = 0.0;
	if (y <= -8e-6)
		tmp = t_1;
	elseif (y <= -4.35e-225)
		tmp = t_2;
	elseif (y <= 3.7e-297)
		tmp = t_0;
	elseif (y <= 5e-252)
		tmp = t_2;
	elseif ((y <= 2100000000.0) || (~((y <= 1.7e+59)) && (y <= 2.35e+113)))
		tmp = t_0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]}, If[LessEqual[y, -8e-6], t$95$1, If[LessEqual[y, -4.35e-225], t$95$2, If[LessEqual[y, 3.7e-297], t$95$0, If[LessEqual[y, 5e-252], t$95$2, If[Or[LessEqual[y, 2100000000.0], And[N[Not[LessEqual[y, 1.7e+59]], $MachinePrecision], LessEqual[y, 2.35e+113]]], t$95$0, t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\frac{0.1111111111111111}{x}}\\
t_1 := 3 \cdot \left(\sqrt{x} \cdot y\right)\\
t_2 := \sqrt{x} \cdot -3\\
\mathbf{if}\;y \leq -8 \cdot 10^{-6}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -4.35 \cdot 10^{-225}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 3.7 \cdot 10^{-297}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y \leq 5 \cdot 10^{-252}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 2100000000 \lor \neg \left(y \leq 1.7 \cdot 10^{+59}\right) \land y \leq 2.35 \cdot 10^{+113}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.99999999999999964e-6 or 2.1e9 < y < 1.70000000000000003e59 or 2.3499999999999999e113 < 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. associate-*l*99.6%

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

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

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

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

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

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

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

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

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

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

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

    if -7.99999999999999964e-6 < y < -4.3500000000000003e-225 or 3.7e-297 < y < 5.00000000000000008e-252

    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-def99.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.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. Taylor expanded in y around 0 97.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)} \]
    7. Taylor expanded in x around inf 61.0%

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

    if -4.3500000000000003e-225 < y < 3.7e-297 or 5.00000000000000008e-252 < y < 2.1e9 or 1.70000000000000003e59 < y < 2.3499999999999999e113

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

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

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

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

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

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

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

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

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

      \[\leadsto 3 \cdot \left(\sqrt{x} \cdot \color{blue}{\frac{0.1111111111111111}{x}}\right) \]
    5. Step-by-step derivation
      1. expm1-log1p-u54.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)\right)} \]
      2. expm1-udef54.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)} - 1} \]
      3. associate-*r*54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \frac{0.1111111111111111}{x}}\right)} - 1 \]
      4. *-commutative54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      5. metadata-eval54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      6. sqrt-prod54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x \cdot 9}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      7. add-sqr-sqrt54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot 9} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      8. metadata-eval54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      9. swap-sqr54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot -3\right) \cdot \left(\sqrt{x} \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      10. sqrt-unprod0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\sqrt{x} \cdot -3} \cdot \sqrt{\sqrt{x} \cdot -3}\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      11. add-sqr-sqrt1.1%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot -3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    6. Applied egg-rr1.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def1.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)\right)} \]
      2. expm1-log1p2.2%

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

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

        \[\leadsto \color{blue}{\left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right) \cdot -3} \]
      5. associate-*l/2.2%

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

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot 0.1111111111111111}}{x} \cdot -3 \]
      7. rem-square-sqrt2.2%

        \[\leadsto \frac{\sqrt{x} \cdot 0.1111111111111111}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \cdot -3 \]
      8. times-frac2.2%

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

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

        \[\leadsto \color{blue}{\frac{0.1111111111111111}{\sqrt{x}}} \cdot -3 \]
      11. metadata-eval2.2%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot 0.3333333333333333}}{\sqrt{x}} \cdot -3 \]
      12. metadata-eval2.2%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{1}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      13. *-inverses2.2%

        \[\leadsto \frac{\frac{0.3333333333333333}{\color{blue}{\frac{\sqrt{x}}{\sqrt{x}}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      14. associate-/l*2.2%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot \sqrt{x}}{\sqrt{x}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      15. associate-*l/2.2%

        \[\leadsto \frac{\color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      16. associate-*r/2.2%

        \[\leadsto \color{blue}{\left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \cdot -3 \]
      17. associate-*r*2.2%

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

        \[\leadsto \left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)}\right) \cdot -3 \]
      19. associate-*r*2.2%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot -3\right)} \]
      20. associate-*r*2.2%

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

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

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\sqrt{x}}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}}} \cdot \sqrt{\frac{-0.3333333333333333}{\sqrt{x}}}} \]
      2. sqrt-unprod58.4%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}} \cdot \frac{-0.3333333333333333}{\sqrt{x}}}} \]
      3. frac-times58.4%

        \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333 \cdot -0.3333333333333333}{\sqrt{x} \cdot \sqrt{x}}}} \]
      4. metadata-eval58.4%

        \[\leadsto \sqrt{\frac{\color{blue}{0.1111111111111111}}{\sqrt{x} \cdot \sqrt{x}}} \]
      5. add-sqr-sqrt58.5%

        \[\leadsto \sqrt{\frac{0.1111111111111111}{\color{blue}{x}}} \]
      6. pow1/258.5%

        \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    10. Applied egg-rr58.5%

      \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    11. Step-by-step derivation
      1. unpow1/258.5%

        \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
    12. Simplified58.5%

      \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-6}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;y \leq -4.35 \cdot 10^{-225}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{elif}\;y \leq 5 \cdot 10^{-252}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{elif}\;y \leq 2100000000 \lor \neg \left(y \leq 1.7 \cdot 10^{+59}\right) \land y \leq 2.35 \cdot 10^{+113}:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \end{array} \]

Alternative 3: 59.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\frac{0.1111111111111111}{x}}\\ t_1 := \sqrt{x} \cdot -3\\ \mathbf{if}\;y \leq -8 \cdot 10^{-6}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;y \leq -1.26 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-297}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-252}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 56000000000 \lor \neg \left(y \leq 5.9 \cdot 10^{+56}\right) \land y \leq 2.35 \cdot 10^{+113}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (sqrt (/ 0.1111111111111111 x))) (t_1 (* (sqrt x) -3.0)))
   (if (<= y -8e-6)
     (* 3.0 (* (sqrt x) y))
     (if (<= y -1.26e-225)
       t_1
       (if (<= y 6.5e-297)
         t_0
         (if (<= y 9.5e-252)
           t_1
           (if (or (<= y 56000000000.0)
                   (and (not (<= y 5.9e+56)) (<= y 2.35e+113)))
             t_0
             (* (sqrt x) (* 3.0 y)))))))))
double code(double x, double y) {
	double t_0 = sqrt((0.1111111111111111 / x));
	double t_1 = sqrt(x) * -3.0;
	double tmp;
	if (y <= -8e-6) {
		tmp = 3.0 * (sqrt(x) * y);
	} else if (y <= -1.26e-225) {
		tmp = t_1;
	} else if (y <= 6.5e-297) {
		tmp = t_0;
	} else if (y <= 9.5e-252) {
		tmp = t_1;
	} else if ((y <= 56000000000.0) || (!(y <= 5.9e+56) && (y <= 2.35e+113))) {
		tmp = t_0;
	} else {
		tmp = sqrt(x) * (3.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) :: t_1
    real(8) :: tmp
    t_0 = sqrt((0.1111111111111111d0 / x))
    t_1 = sqrt(x) * (-3.0d0)
    if (y <= (-8d-6)) then
        tmp = 3.0d0 * (sqrt(x) * y)
    else if (y <= (-1.26d-225)) then
        tmp = t_1
    else if (y <= 6.5d-297) then
        tmp = t_0
    else if (y <= 9.5d-252) then
        tmp = t_1
    else if ((y <= 56000000000.0d0) .or. (.not. (y <= 5.9d+56)) .and. (y <= 2.35d+113)) then
        tmp = t_0
    else
        tmp = sqrt(x) * (3.0d0 * y)
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sqrt((0.1111111111111111 / x));
	double t_1 = Math.sqrt(x) * -3.0;
	double tmp;
	if (y <= -8e-6) {
		tmp = 3.0 * (Math.sqrt(x) * y);
	} else if (y <= -1.26e-225) {
		tmp = t_1;
	} else if (y <= 6.5e-297) {
		tmp = t_0;
	} else if (y <= 9.5e-252) {
		tmp = t_1;
	} else if ((y <= 56000000000.0) || (!(y <= 5.9e+56) && (y <= 2.35e+113))) {
		tmp = t_0;
	} else {
		tmp = Math.sqrt(x) * (3.0 * y);
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sqrt((0.1111111111111111 / x))
	t_1 = math.sqrt(x) * -3.0
	tmp = 0
	if y <= -8e-6:
		tmp = 3.0 * (math.sqrt(x) * y)
	elif y <= -1.26e-225:
		tmp = t_1
	elif y <= 6.5e-297:
		tmp = t_0
	elif y <= 9.5e-252:
		tmp = t_1
	elif (y <= 56000000000.0) or (not (y <= 5.9e+56) and (y <= 2.35e+113)):
		tmp = t_0
	else:
		tmp = math.sqrt(x) * (3.0 * y)
	return tmp
function code(x, y)
	t_0 = sqrt(Float64(0.1111111111111111 / x))
	t_1 = Float64(sqrt(x) * -3.0)
	tmp = 0.0
	if (y <= -8e-6)
		tmp = Float64(3.0 * Float64(sqrt(x) * y));
	elseif (y <= -1.26e-225)
		tmp = t_1;
	elseif (y <= 6.5e-297)
		tmp = t_0;
	elseif (y <= 9.5e-252)
		tmp = t_1;
	elseif ((y <= 56000000000.0) || (!(y <= 5.9e+56) && (y <= 2.35e+113)))
		tmp = t_0;
	else
		tmp = Float64(sqrt(x) * Float64(3.0 * y));
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sqrt((0.1111111111111111 / x));
	t_1 = sqrt(x) * -3.0;
	tmp = 0.0;
	if (y <= -8e-6)
		tmp = 3.0 * (sqrt(x) * y);
	elseif (y <= -1.26e-225)
		tmp = t_1;
	elseif (y <= 6.5e-297)
		tmp = t_0;
	elseif (y <= 9.5e-252)
		tmp = t_1;
	elseif ((y <= 56000000000.0) || (~((y <= 5.9e+56)) && (y <= 2.35e+113)))
		tmp = t_0;
	else
		tmp = sqrt(x) * (3.0 * y);
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]}, If[LessEqual[y, -8e-6], N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.26e-225], t$95$1, If[LessEqual[y, 6.5e-297], t$95$0, If[LessEqual[y, 9.5e-252], t$95$1, If[Or[LessEqual[y, 56000000000.0], And[N[Not[LessEqual[y, 5.9e+56]], $MachinePrecision], LessEqual[y, 2.35e+113]]], t$95$0, N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\frac{0.1111111111111111}{x}}\\
t_1 := \sqrt{x} \cdot -3\\
\mathbf{if}\;y \leq -8 \cdot 10^{-6}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\

\mathbf{elif}\;y \leq -1.26 \cdot 10^{-225}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{-297}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{-252}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 56000000000 \lor \neg \left(y \leq 5.9 \cdot 10^{+56}\right) \land y \leq 2.35 \cdot 10^{+113}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.99999999999999964e-6

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.99999999999999964e-6 < y < -1.2599999999999999e-225 or 6.5000000000000002e-297 < y < 9.4999999999999993e-252

    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-def99.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.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. Taylor expanded in y around 0 97.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)} \]
    7. Taylor expanded in x around inf 61.0%

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

    if -1.2599999999999999e-225 < y < 6.5000000000000002e-297 or 9.4999999999999993e-252 < y < 5.6e10 or 5.9000000000000001e56 < y < 2.3499999999999999e113

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

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

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

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

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

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

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

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

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

      \[\leadsto 3 \cdot \left(\sqrt{x} \cdot \color{blue}{\frac{0.1111111111111111}{x}}\right) \]
    5. Step-by-step derivation
      1. expm1-log1p-u54.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)\right)} \]
      2. expm1-udef54.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)} - 1} \]
      3. associate-*r*54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \frac{0.1111111111111111}{x}}\right)} - 1 \]
      4. *-commutative54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      5. metadata-eval54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      6. sqrt-prod54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x \cdot 9}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      7. add-sqr-sqrt54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot 9} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      8. metadata-eval54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      9. swap-sqr54.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot -3\right) \cdot \left(\sqrt{x} \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      10. sqrt-unprod0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\sqrt{x} \cdot -3} \cdot \sqrt{\sqrt{x} \cdot -3}\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      11. add-sqr-sqrt1.1%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot -3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    6. Applied egg-rr1.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def1.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)\right)} \]
      2. expm1-log1p2.2%

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

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

        \[\leadsto \color{blue}{\left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right) \cdot -3} \]
      5. associate-*l/2.2%

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

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot 0.1111111111111111}}{x} \cdot -3 \]
      7. rem-square-sqrt2.2%

        \[\leadsto \frac{\sqrt{x} \cdot 0.1111111111111111}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \cdot -3 \]
      8. times-frac2.2%

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

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

        \[\leadsto \color{blue}{\frac{0.1111111111111111}{\sqrt{x}}} \cdot -3 \]
      11. metadata-eval2.2%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot 0.3333333333333333}}{\sqrt{x}} \cdot -3 \]
      12. metadata-eval2.2%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{1}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      13. *-inverses2.2%

        \[\leadsto \frac{\frac{0.3333333333333333}{\color{blue}{\frac{\sqrt{x}}{\sqrt{x}}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      14. associate-/l*2.2%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot \sqrt{x}}{\sqrt{x}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      15. associate-*l/2.2%

        \[\leadsto \frac{\color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      16. associate-*r/2.2%

        \[\leadsto \color{blue}{\left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \cdot -3 \]
      17. associate-*r*2.2%

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

        \[\leadsto \left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)}\right) \cdot -3 \]
      19. associate-*r*2.2%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot -3\right)} \]
      20. associate-*r*2.2%

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

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

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\sqrt{x}}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}}} \cdot \sqrt{\frac{-0.3333333333333333}{\sqrt{x}}}} \]
      2. sqrt-unprod58.4%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}} \cdot \frac{-0.3333333333333333}{\sqrt{x}}}} \]
      3. frac-times58.4%

        \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333 \cdot -0.3333333333333333}{\sqrt{x} \cdot \sqrt{x}}}} \]
      4. metadata-eval58.4%

        \[\leadsto \sqrt{\frac{\color{blue}{0.1111111111111111}}{\sqrt{x} \cdot \sqrt{x}}} \]
      5. add-sqr-sqrt58.5%

        \[\leadsto \sqrt{\frac{0.1111111111111111}{\color{blue}{x}}} \]
      6. pow1/258.5%

        \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    10. Applied egg-rr58.5%

      \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    11. Step-by-step derivation
      1. unpow1/258.5%

        \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
    12. Simplified58.5%

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

    if 5.6e10 < y < 5.9000000000000001e56 or 2.3499999999999999e113 < y

    1. Initial program 99.6%

      \[\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.6%

        \[\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.9%

        \[\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.9%

        \[\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.9%

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

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-6}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;y \leq -1.26 \cdot 10^{-225}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{-252}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{elif}\;y \leq 56000000000 \lor \neg \left(y \leq 5.9 \cdot 10^{+56}\right) \land y \leq 2.35 \cdot 10^{+113}:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\ \end{array} \]

Alternative 4: 59.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\frac{0.1111111111111111}{x}}\\ t_1 := \sqrt{x} \cdot -3\\ \mathbf{if}\;y \leq -8 \cdot 10^{-6}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;y \leq -1.26 \cdot 10^{-225}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-297}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-252}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 56000000000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{+48} \lor \neg \left(y \leq 2.35 \cdot 10^{+113}\right):\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{x} \cdot 0.3333333333333333}{x}\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (let* ((t_0 (sqrt (/ 0.1111111111111111 x))) (t_1 (* (sqrt x) -3.0)))
   (if (<= y -8e-6)
     (* 3.0 (* (sqrt x) y))
     (if (<= y -1.26e-225)
       t_1
       (if (<= y 3e-297)
         t_0
         (if (<= y 1.2e-252)
           t_1
           (if (<= y 56000000000.0)
             t_0
             (if (or (<= y 5.7e+48) (not (<= y 2.35e+113)))
               (* (sqrt x) (* 3.0 y))
               (/ (* (sqrt x) 0.3333333333333333) x)))))))))
double code(double x, double y) {
	double t_0 = sqrt((0.1111111111111111 / x));
	double t_1 = sqrt(x) * -3.0;
	double tmp;
	if (y <= -8e-6) {
		tmp = 3.0 * (sqrt(x) * y);
	} else if (y <= -1.26e-225) {
		tmp = t_1;
	} else if (y <= 3e-297) {
		tmp = t_0;
	} else if (y <= 1.2e-252) {
		tmp = t_1;
	} else if (y <= 56000000000.0) {
		tmp = t_0;
	} else if ((y <= 5.7e+48) || !(y <= 2.35e+113)) {
		tmp = sqrt(x) * (3.0 * y);
	} else {
		tmp = (sqrt(x) * 0.3333333333333333) / x;
	}
	return tmp;
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = sqrt((0.1111111111111111d0 / x))
    t_1 = sqrt(x) * (-3.0d0)
    if (y <= (-8d-6)) then
        tmp = 3.0d0 * (sqrt(x) * y)
    else if (y <= (-1.26d-225)) then
        tmp = t_1
    else if (y <= 3d-297) then
        tmp = t_0
    else if (y <= 1.2d-252) then
        tmp = t_1
    else if (y <= 56000000000.0d0) then
        tmp = t_0
    else if ((y <= 5.7d+48) .or. (.not. (y <= 2.35d+113))) then
        tmp = sqrt(x) * (3.0d0 * y)
    else
        tmp = (sqrt(x) * 0.3333333333333333d0) / x
    end if
    code = tmp
end function
public static double code(double x, double y) {
	double t_0 = Math.sqrt((0.1111111111111111 / x));
	double t_1 = Math.sqrt(x) * -3.0;
	double tmp;
	if (y <= -8e-6) {
		tmp = 3.0 * (Math.sqrt(x) * y);
	} else if (y <= -1.26e-225) {
		tmp = t_1;
	} else if (y <= 3e-297) {
		tmp = t_0;
	} else if (y <= 1.2e-252) {
		tmp = t_1;
	} else if (y <= 56000000000.0) {
		tmp = t_0;
	} else if ((y <= 5.7e+48) || !(y <= 2.35e+113)) {
		tmp = Math.sqrt(x) * (3.0 * y);
	} else {
		tmp = (Math.sqrt(x) * 0.3333333333333333) / x;
	}
	return tmp;
}
def code(x, y):
	t_0 = math.sqrt((0.1111111111111111 / x))
	t_1 = math.sqrt(x) * -3.0
	tmp = 0
	if y <= -8e-6:
		tmp = 3.0 * (math.sqrt(x) * y)
	elif y <= -1.26e-225:
		tmp = t_1
	elif y <= 3e-297:
		tmp = t_0
	elif y <= 1.2e-252:
		tmp = t_1
	elif y <= 56000000000.0:
		tmp = t_0
	elif (y <= 5.7e+48) or not (y <= 2.35e+113):
		tmp = math.sqrt(x) * (3.0 * y)
	else:
		tmp = (math.sqrt(x) * 0.3333333333333333) / x
	return tmp
function code(x, y)
	t_0 = sqrt(Float64(0.1111111111111111 / x))
	t_1 = Float64(sqrt(x) * -3.0)
	tmp = 0.0
	if (y <= -8e-6)
		tmp = Float64(3.0 * Float64(sqrt(x) * y));
	elseif (y <= -1.26e-225)
		tmp = t_1;
	elseif (y <= 3e-297)
		tmp = t_0;
	elseif (y <= 1.2e-252)
		tmp = t_1;
	elseif (y <= 56000000000.0)
		tmp = t_0;
	elseif ((y <= 5.7e+48) || !(y <= 2.35e+113))
		tmp = Float64(sqrt(x) * Float64(3.0 * y));
	else
		tmp = Float64(Float64(sqrt(x) * 0.3333333333333333) / x);
	end
	return tmp
end
function tmp_2 = code(x, y)
	t_0 = sqrt((0.1111111111111111 / x));
	t_1 = sqrt(x) * -3.0;
	tmp = 0.0;
	if (y <= -8e-6)
		tmp = 3.0 * (sqrt(x) * y);
	elseif (y <= -1.26e-225)
		tmp = t_1;
	elseif (y <= 3e-297)
		tmp = t_0;
	elseif (y <= 1.2e-252)
		tmp = t_1;
	elseif (y <= 56000000000.0)
		tmp = t_0;
	elseif ((y <= 5.7e+48) || ~((y <= 2.35e+113)))
		tmp = sqrt(x) * (3.0 * y);
	else
		tmp = (sqrt(x) * 0.3333333333333333) / x;
	end
	tmp_2 = tmp;
end
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]}, If[LessEqual[y, -8e-6], N[(3.0 * N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.26e-225], t$95$1, If[LessEqual[y, 3e-297], t$95$0, If[LessEqual[y, 1.2e-252], t$95$1, If[LessEqual[y, 56000000000.0], t$95$0, If[Or[LessEqual[y, 5.7e+48], N[Not[LessEqual[y, 2.35e+113]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * y), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[x], $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / x), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\frac{0.1111111111111111}{x}}\\
t_1 := \sqrt{x} \cdot -3\\
\mathbf{if}\;y \leq -8 \cdot 10^{-6}:\\
\;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\

\mathbf{elif}\;y \leq -1.26 \cdot 10^{-225}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 3 \cdot 10^{-297}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y \leq 1.2 \cdot 10^{-252}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 56000000000:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y \leq 5.7 \cdot 10^{+48} \lor \neg \left(y \leq 2.35 \cdot 10^{+113}\right):\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -7.99999999999999964e-6

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.99999999999999964e-6 < y < -1.2599999999999999e-225 or 2.99999999999999995e-297 < y < 1.2000000000000001e-252

    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-def99.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.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. Taylor expanded in y around 0 97.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)} \]
    7. Taylor expanded in x around inf 61.0%

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

    if -1.2599999999999999e-225 < y < 2.99999999999999995e-297 or 1.2000000000000001e-252 < y < 5.6e10

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

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

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

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

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

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

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

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

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

      \[\leadsto 3 \cdot \left(\sqrt{x} \cdot \color{blue}{\frac{0.1111111111111111}{x}}\right) \]
    5. Step-by-step derivation
      1. expm1-log1p-u52.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)\right)} \]
      2. expm1-udef53.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)} - 1} \]
      3. associate-*r*53.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \frac{0.1111111111111111}{x}}\right)} - 1 \]
      4. *-commutative53.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      5. metadata-eval53.0%

        \[\leadsto e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      6. sqrt-prod53.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x \cdot 9}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      7. add-sqr-sqrt53.0%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot 9} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      8. metadata-eval53.0%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      9. swap-sqr53.0%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot -3\right) \cdot \left(\sqrt{x} \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      10. sqrt-unprod0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\sqrt{x} \cdot -3} \cdot \sqrt{\sqrt{x} \cdot -3}\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      11. add-sqr-sqrt1.2%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot -3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    6. Applied egg-rr1.2%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def1.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)\right)} \]
      2. expm1-log1p2.4%

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

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

        \[\leadsto \color{blue}{\left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right) \cdot -3} \]
      5. associate-*l/2.4%

        \[\leadsto \color{blue}{\frac{0.1111111111111111 \cdot \sqrt{x}}{x}} \cdot -3 \]
      6. *-commutative2.4%

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot 0.1111111111111111}}{x} \cdot -3 \]
      7. rem-square-sqrt2.4%

        \[\leadsto \frac{\sqrt{x} \cdot 0.1111111111111111}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \cdot -3 \]
      8. times-frac2.4%

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

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

        \[\leadsto \color{blue}{\frac{0.1111111111111111}{\sqrt{x}}} \cdot -3 \]
      11. metadata-eval2.4%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot 0.3333333333333333}}{\sqrt{x}} \cdot -3 \]
      12. metadata-eval2.4%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{1}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      13. *-inverses2.4%

        \[\leadsto \frac{\frac{0.3333333333333333}{\color{blue}{\frac{\sqrt{x}}{\sqrt{x}}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      14. associate-/l*2.4%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot \sqrt{x}}{\sqrt{x}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      15. associate-*l/2.4%

        \[\leadsto \frac{\color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      16. associate-*r/2.4%

        \[\leadsto \color{blue}{\left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \cdot -3 \]
      17. associate-*r*2.4%

        \[\leadsto \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)\right)} \cdot -3 \]
      18. *-commutative2.4%

        \[\leadsto \left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)}\right) \cdot -3 \]
      19. associate-*r*2.4%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot -3\right)} \]
      20. associate-*r*2.4%

        \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot -3\right)\right)} \]
      21. *-commutative2.4%

        \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \]
    8. Simplified2.4%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\sqrt{x}}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}}} \cdot \sqrt{\frac{-0.3333333333333333}{\sqrt{x}}}} \]
      2. sqrt-unprod56.5%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}} \cdot \frac{-0.3333333333333333}{\sqrt{x}}}} \]
      3. frac-times56.6%

        \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333 \cdot -0.3333333333333333}{\sqrt{x} \cdot \sqrt{x}}}} \]
      4. metadata-eval56.6%

        \[\leadsto \sqrt{\frac{\color{blue}{0.1111111111111111}}{\sqrt{x} \cdot \sqrt{x}}} \]
      5. add-sqr-sqrt56.6%

        \[\leadsto \sqrt{\frac{0.1111111111111111}{\color{blue}{x}}} \]
      6. pow1/256.6%

        \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    10. Applied egg-rr56.6%

      \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    11. Step-by-step derivation
      1. unpow1/256.6%

        \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
    12. Simplified56.6%

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

    if 5.6e10 < y < 5.69999999999999968e48 or 2.3499999999999999e113 < y

    1. Initial program 99.6%

      \[\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.6%

        \[\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.9%

        \[\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.9%

        \[\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.9%

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

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

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

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

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

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

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

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

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

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

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

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

    if 5.69999999999999968e48 < y < 2.3499999999999999e113

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 3 \cdot \color{blue}{\frac{\sqrt{x} \cdot 0.1111111111111111}{x}} \]
      2. associate-*r/65.5%

        \[\leadsto \color{blue}{\frac{3 \cdot \left(\sqrt{x} \cdot 0.1111111111111111\right)}{x}} \]
      3. *-commutative65.5%

        \[\leadsto \frac{3 \cdot \color{blue}{\left(0.1111111111111111 \cdot \sqrt{x}\right)}}{x} \]
    6. Applied egg-rr65.5%

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

        \[\leadsto \frac{\color{blue}{\left(3 \cdot 0.1111111111111111\right) \cdot \sqrt{x}}}{x} \]
      2. metadata-eval65.7%

        \[\leadsto \frac{\color{blue}{0.3333333333333333} \cdot \sqrt{x}}{x} \]
    8. Simplified65.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-6}:\\ \;\;\;\;3 \cdot \left(\sqrt{x} \cdot y\right)\\ \mathbf{elif}\;y \leq -1.26 \cdot 10^{-225}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{elif}\;y \leq 3 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-252}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \mathbf{elif}\;y \leq 56000000000:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{elif}\;y \leq 5.7 \cdot 10^{+48} \lor \neg \left(y \leq 2.35 \cdot 10^{+113}\right):\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{x} \cdot 0.3333333333333333}{x}\\ \end{array} \]

Alternative 5: 85.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.45 \cdot 10^{-55}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\

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

\mathbf{elif}\;x \leq 4.6 \cdot 10^{-9}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{1}{\frac{x}{0.3333333333333333}} - 3\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(y + -1\right)\right)\\


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

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

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

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

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

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

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

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

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

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

      \[\leadsto 3 \cdot \left(\sqrt{x} \cdot \color{blue}{\frac{0.1111111111111111}{x}}\right) \]
    5. Step-by-step derivation
      1. expm1-log1p-u75.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)\right)} \]
      2. expm1-udef75.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)} - 1} \]
      3. associate-*r*75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \frac{0.1111111111111111}{x}}\right)} - 1 \]
      4. *-commutative75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      5. metadata-eval75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      6. sqrt-prod75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x \cdot 9}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      7. add-sqr-sqrt75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot 9} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      8. metadata-eval75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      9. swap-sqr75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot -3\right) \cdot \left(\sqrt{x} \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      10. sqrt-unprod0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\sqrt{x} \cdot -3} \cdot \sqrt{\sqrt{x} \cdot -3}\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      11. add-sqr-sqrt0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot -3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    6. Applied egg-rr0.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def0.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)\right)} \]
      2. expm1-log1p1.3%

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

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

        \[\leadsto \color{blue}{\left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right) \cdot -3} \]
      5. associate-*l/1.3%

        \[\leadsto \color{blue}{\frac{0.1111111111111111 \cdot \sqrt{x}}{x}} \cdot -3 \]
      6. *-commutative1.3%

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot 0.1111111111111111}}{x} \cdot -3 \]
      7. rem-square-sqrt1.3%

        \[\leadsto \frac{\sqrt{x} \cdot 0.1111111111111111}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \cdot -3 \]
      8. times-frac1.3%

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

        \[\leadsto \left(\color{blue}{1} \cdot \frac{0.1111111111111111}{\sqrt{x}}\right) \cdot -3 \]
      10. *-lft-identity1.3%

        \[\leadsto \color{blue}{\frac{0.1111111111111111}{\sqrt{x}}} \cdot -3 \]
      11. metadata-eval1.3%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot 0.3333333333333333}}{\sqrt{x}} \cdot -3 \]
      12. metadata-eval1.3%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{1}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      13. *-inverses1.3%

        \[\leadsto \frac{\frac{0.3333333333333333}{\color{blue}{\frac{\sqrt{x}}{\sqrt{x}}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      14. associate-/l*1.3%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot \sqrt{x}}{\sqrt{x}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      15. associate-*l/1.3%

        \[\leadsto \frac{\color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      16. associate-*r/1.3%

        \[\leadsto \color{blue}{\left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \cdot -3 \]
      17. associate-*r*1.3%

        \[\leadsto \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)\right)} \cdot -3 \]
      18. *-commutative1.3%

        \[\leadsto \left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)}\right) \cdot -3 \]
      19. associate-*r*1.3%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot -3\right)} \]
      20. associate-*r*1.3%

        \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot -3\right)\right)} \]
      21. *-commutative1.3%

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

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\sqrt{x}}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}}} \cdot \sqrt{\frac{-0.3333333333333333}{\sqrt{x}}}} \]
      2. sqrt-unprod81.9%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}} \cdot \frac{-0.3333333333333333}{\sqrt{x}}}} \]
      3. frac-times82.0%

        \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333 \cdot -0.3333333333333333}{\sqrt{x} \cdot \sqrt{x}}}} \]
      4. metadata-eval82.0%

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

        \[\leadsto \sqrt{\frac{0.1111111111111111}{\color{blue}{x}}} \]
      6. pow1/282.1%

        \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    10. Applied egg-rr82.1%

      \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    11. Step-by-step derivation
      1. unpow1/282.1%

        \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
    12. Simplified82.1%

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

    if 1.45e-55 < x < 2.5000000000000001e-28

    1. Initial program 99.6%

      \[\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.6%

        \[\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.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+99.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-in99.6%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-def99.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.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.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. Taylor expanded in y around inf 65.1%

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

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

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

    if 2.5000000000000001e-28 < x < 4.5999999999999998e-9

    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.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.4%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-def99.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.0%

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

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

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

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

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

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

        \[\leadsto \left(\color{blue}{\frac{0.3333333333333333}{x}} - 3\right) \cdot \sqrt{x} \]
      2. clear-num75.9%

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

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

    if 4.5999999999999998e-9 < 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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.45 \cdot 10^{-55}:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{-28}:\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\ \mathbf{elif}\;x \leq 4.6 \cdot 10^{-9}:\\ \;\;\;\;\sqrt{x} \cdot \left(\frac{1}{\frac{x}{0.3333333333333333}} - 3\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(y + -1\right)\right)\\ \end{array} \]

Alternative 6: 85.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 6 \cdot 10^{-55}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(y + -1\right)\right)\\


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

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

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

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

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

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

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

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

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

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

      \[\leadsto 3 \cdot \left(\sqrt{x} \cdot \color{blue}{\frac{0.1111111111111111}{x}}\right) \]
    5. Step-by-step derivation
      1. expm1-log1p-u75.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)\right)} \]
      2. expm1-udef75.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)} - 1} \]
      3. associate-*r*75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \frac{0.1111111111111111}{x}}\right)} - 1 \]
      4. *-commutative75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      5. metadata-eval75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      6. sqrt-prod75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x \cdot 9}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      7. add-sqr-sqrt75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot 9} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      8. metadata-eval75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      9. swap-sqr75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot -3\right) \cdot \left(\sqrt{x} \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      10. sqrt-unprod0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\sqrt{x} \cdot -3} \cdot \sqrt{\sqrt{x} \cdot -3}\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      11. add-sqr-sqrt0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot -3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    6. Applied egg-rr0.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def0.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)\right)} \]
      2. expm1-log1p1.3%

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

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

        \[\leadsto \color{blue}{\left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right) \cdot -3} \]
      5. associate-*l/1.3%

        \[\leadsto \color{blue}{\frac{0.1111111111111111 \cdot \sqrt{x}}{x}} \cdot -3 \]
      6. *-commutative1.3%

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot 0.1111111111111111}}{x} \cdot -3 \]
      7. rem-square-sqrt1.3%

        \[\leadsto \frac{\sqrt{x} \cdot 0.1111111111111111}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \cdot -3 \]
      8. times-frac1.3%

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

        \[\leadsto \left(\color{blue}{1} \cdot \frac{0.1111111111111111}{\sqrt{x}}\right) \cdot -3 \]
      10. *-lft-identity1.3%

        \[\leadsto \color{blue}{\frac{0.1111111111111111}{\sqrt{x}}} \cdot -3 \]
      11. metadata-eval1.3%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot 0.3333333333333333}}{\sqrt{x}} \cdot -3 \]
      12. metadata-eval1.3%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{1}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      13. *-inverses1.3%

        \[\leadsto \frac{\frac{0.3333333333333333}{\color{blue}{\frac{\sqrt{x}}{\sqrt{x}}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      14. associate-/l*1.3%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot \sqrt{x}}{\sqrt{x}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      15. associate-*l/1.3%

        \[\leadsto \frac{\color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      16. associate-*r/1.3%

        \[\leadsto \color{blue}{\left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \cdot -3 \]
      17. associate-*r*1.3%

        \[\leadsto \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)\right)} \cdot -3 \]
      18. *-commutative1.3%

        \[\leadsto \left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)}\right) \cdot -3 \]
      19. associate-*r*1.3%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot -3\right)} \]
      20. associate-*r*1.3%

        \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot -3\right)\right)} \]
      21. *-commutative1.3%

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

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\sqrt{x}}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}}} \cdot \sqrt{\frac{-0.3333333333333333}{\sqrt{x}}}} \]
      2. sqrt-unprod81.9%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}} \cdot \frac{-0.3333333333333333}{\sqrt{x}}}} \]
      3. frac-times82.0%

        \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333 \cdot -0.3333333333333333}{\sqrt{x} \cdot \sqrt{x}}}} \]
      4. metadata-eval82.0%

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

        \[\leadsto \sqrt{\frac{0.1111111111111111}{\color{blue}{x}}} \]
      6. pow1/282.1%

        \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    10. Applied egg-rr82.1%

      \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    11. Step-by-step derivation
      1. unpow1/282.1%

        \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
    12. Simplified82.1%

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

    if 6.00000000000000033e-55 < x < 9.19999999999999965e-29

    1. Initial program 99.6%

      \[\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.6%

        \[\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.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+99.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-in99.6%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-def99.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.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.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. Taylor expanded in y around inf 65.1%

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

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

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

    if 9.19999999999999965e-29 < x < 3.89999999999999977e-16

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 3 \cdot \color{blue}{\frac{\sqrt{x} \cdot 0.1111111111111111}{x}} \]
      2. associate-*r/81.5%

        \[\leadsto \color{blue}{\frac{3 \cdot \left(\sqrt{x} \cdot 0.1111111111111111\right)}{x}} \]
      3. *-commutative81.5%

        \[\leadsto \frac{3 \cdot \color{blue}{\left(0.1111111111111111 \cdot \sqrt{x}\right)}}{x} \]
    6. Applied egg-rr81.5%

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

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

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

        \[\leadsto \frac{0.1111111111111111 \cdot \left(\sqrt{x} \cdot \color{blue}{\left(--3\right)}\right)}{x} \]
      4. distribute-rgt-neg-in81.3%

        \[\leadsto \frac{0.1111111111111111 \cdot \color{blue}{\left(-\sqrt{x} \cdot -3\right)}}{x} \]
      5. distribute-rgt-neg-out81.3%

        \[\leadsto \frac{\color{blue}{-0.1111111111111111 \cdot \left(\sqrt{x} \cdot -3\right)}}{x} \]
      6. distribute-neg-frac81.3%

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

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

        \[\leadsto -\color{blue}{\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}} \]
      9. *-commutative81.6%

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

        \[\leadsto -\color{blue}{\left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right) \cdot -3} \]
    8. Simplified81.6%

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

    if 3.89999999999999977e-16 < 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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 6 \cdot 10^{-55}:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{elif}\;x \leq 9.2 \cdot 10^{-29}:\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{-16}:\\ \;\;\;\;\frac{--0.3333333333333333}{\sqrt{x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(y + -1\right)\right)\\ \end{array} \]

Alternative 7: 86.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.2 \cdot 10^{-54}:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(y + -1\right)\right)\\


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

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

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

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

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

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

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

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

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

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

      \[\leadsto 3 \cdot \left(\sqrt{x} \cdot \color{blue}{\frac{0.1111111111111111}{x}}\right) \]
    5. Step-by-step derivation
      1. expm1-log1p-u75.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)\right)} \]
      2. expm1-udef75.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)} - 1} \]
      3. associate-*r*75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \frac{0.1111111111111111}{x}}\right)} - 1 \]
      4. *-commutative75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      5. metadata-eval75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      6. sqrt-prod75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x \cdot 9}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      7. add-sqr-sqrt75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot 9} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      8. metadata-eval75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      9. swap-sqr75.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot -3\right) \cdot \left(\sqrt{x} \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      10. sqrt-unprod0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\sqrt{x} \cdot -3} \cdot \sqrt{\sqrt{x} \cdot -3}\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      11. add-sqr-sqrt0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot -3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    6. Applied egg-rr0.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def0.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)\right)} \]
      2. expm1-log1p1.3%

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

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

        \[\leadsto \color{blue}{\left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right) \cdot -3} \]
      5. associate-*l/1.3%

        \[\leadsto \color{blue}{\frac{0.1111111111111111 \cdot \sqrt{x}}{x}} \cdot -3 \]
      6. *-commutative1.3%

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot 0.1111111111111111}}{x} \cdot -3 \]
      7. rem-square-sqrt1.3%

        \[\leadsto \frac{\sqrt{x} \cdot 0.1111111111111111}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \cdot -3 \]
      8. times-frac1.3%

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

        \[\leadsto \left(\color{blue}{1} \cdot \frac{0.1111111111111111}{\sqrt{x}}\right) \cdot -3 \]
      10. *-lft-identity1.3%

        \[\leadsto \color{blue}{\frac{0.1111111111111111}{\sqrt{x}}} \cdot -3 \]
      11. metadata-eval1.3%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot 0.3333333333333333}}{\sqrt{x}} \cdot -3 \]
      12. metadata-eval1.3%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{1}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      13. *-inverses1.3%

        \[\leadsto \frac{\frac{0.3333333333333333}{\color{blue}{\frac{\sqrt{x}}{\sqrt{x}}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      14. associate-/l*1.3%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot \sqrt{x}}{\sqrt{x}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      15. associate-*l/1.3%

        \[\leadsto \frac{\color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      16. associate-*r/1.3%

        \[\leadsto \color{blue}{\left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \cdot -3 \]
      17. associate-*r*1.3%

        \[\leadsto \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)\right)} \cdot -3 \]
      18. *-commutative1.3%

        \[\leadsto \left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)}\right) \cdot -3 \]
      19. associate-*r*1.3%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot -3\right)} \]
      20. associate-*r*1.3%

        \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot -3\right)\right)} \]
      21. *-commutative1.3%

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

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\sqrt{x}}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}}} \cdot \sqrt{\frac{-0.3333333333333333}{\sqrt{x}}}} \]
      2. sqrt-unprod81.9%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}} \cdot \frac{-0.3333333333333333}{\sqrt{x}}}} \]
      3. frac-times82.0%

        \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333 \cdot -0.3333333333333333}{\sqrt{x} \cdot \sqrt{x}}}} \]
      4. metadata-eval82.0%

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

        \[\leadsto \sqrt{\frac{0.1111111111111111}{\color{blue}{x}}} \]
      6. pow1/282.1%

        \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    10. Applied egg-rr82.1%

      \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    11. Step-by-step derivation
      1. unpow1/282.1%

        \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
    12. Simplified82.1%

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

    if 2.2e-54 < x < 5.09999999999999986e-29

    1. Initial program 99.6%

      \[\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.6%

        \[\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.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+99.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-in99.6%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-def99.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.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.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. Taylor expanded in y around inf 65.1%

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

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

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

    if 5.09999999999999986e-29 < x < 3.10000000000000005e-9

    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.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.4%

        \[\leadsto \sqrt{x} \cdot \color{blue}{\left(3 \cdot y + 3 \cdot \left(\frac{1}{x \cdot 9} - 1\right)\right)} \]
      5. fma-def99.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.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.10000000000000005e-9 < 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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.2 \cdot 10^{-54}:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-29}:\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot y\right)\\ \mathbf{elif}\;x \leq 3.1 \cdot 10^{-9}:\\ \;\;\;\;\sqrt{x} \cdot \left(-3 + \frac{0.3333333333333333}{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(y + -1\right)\right)\\ \end{array} \]

Alternative 8: 99.4% accurate, 1.0× speedup?

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

\\
3 \cdot \left(\sqrt{x} \cdot \left(y + \left(\frac{0.1111111111111111}{x} + -1\right)\right)\right)
\end{array}
Derivation
  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. associate-*l*99.5%

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

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

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

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

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

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

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

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

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

Alternative 9: 99.4% accurate, 1.0× speedup?

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

\\
\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)\right)
\end{array}
Derivation
  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. associate-*l*99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 61.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 0.68:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= x 0.68) (sqrt (/ 0.1111111111111111 x)) (* (sqrt x) -3.0)))
double code(double x, double y) {
	double tmp;
	if (x <= 0.68) {
		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 <= 0.68d0) 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 <= 0.68) {
		tmp = Math.sqrt((0.1111111111111111 / x));
	} else {
		tmp = Math.sqrt(x) * -3.0;
	}
	return tmp;
}
def code(x, y):
	tmp = 0
	if x <= 0.68:
		tmp = math.sqrt((0.1111111111111111 / x))
	else:
		tmp = math.sqrt(x) * -3.0
	return tmp
function code(x, y)
	tmp = 0.0
	if (x <= 0.68)
		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 <= 0.68)
		tmp = sqrt((0.1111111111111111 / x));
	else
		tmp = sqrt(x) * -3.0;
	end
	tmp_2 = tmp;
end
code[x_, y_] := If[LessEqual[x, 0.68], 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 0.68:\\
\;\;\;\;\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 < 0.680000000000000049

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)\right)} \]
      2. expm1-udef67.3%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)} - 1} \]
      3. associate-*r*67.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \frac{0.1111111111111111}{x}}\right)} - 1 \]
      4. *-commutative67.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      5. metadata-eval67.3%

        \[\leadsto e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      6. sqrt-prod67.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x \cdot 9}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      7. add-sqr-sqrt67.3%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot 9} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      8. metadata-eval67.3%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      9. swap-sqr67.3%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot -3\right) \cdot \left(\sqrt{x} \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      10. sqrt-unprod0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\sqrt{x} \cdot -3} \cdot \sqrt{\sqrt{x} \cdot -3}\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
      11. add-sqr-sqrt0.0%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot -3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    6. Applied egg-rr0.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def0.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)\right)} \]
      2. expm1-log1p1.7%

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

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

        \[\leadsto \color{blue}{\left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right) \cdot -3} \]
      5. associate-*l/1.7%

        \[\leadsto \color{blue}{\frac{0.1111111111111111 \cdot \sqrt{x}}{x}} \cdot -3 \]
      6. *-commutative1.7%

        \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot 0.1111111111111111}}{x} \cdot -3 \]
      7. rem-square-sqrt1.7%

        \[\leadsto \frac{\sqrt{x} \cdot 0.1111111111111111}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \cdot -3 \]
      8. times-frac1.7%

        \[\leadsto \color{blue}{\left(\frac{\sqrt{x}}{\sqrt{x}} \cdot \frac{0.1111111111111111}{\sqrt{x}}\right)} \cdot -3 \]
      9. *-inverses1.7%

        \[\leadsto \left(\color{blue}{1} \cdot \frac{0.1111111111111111}{\sqrt{x}}\right) \cdot -3 \]
      10. *-lft-identity1.7%

        \[\leadsto \color{blue}{\frac{0.1111111111111111}{\sqrt{x}}} \cdot -3 \]
      11. metadata-eval1.7%

        \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot 0.3333333333333333}}{\sqrt{x}} \cdot -3 \]
      12. metadata-eval1.7%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{1}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      13. *-inverses1.7%

        \[\leadsto \frac{\frac{0.3333333333333333}{\color{blue}{\frac{\sqrt{x}}{\sqrt{x}}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      14. associate-/l*1.7%

        \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot \sqrt{x}}{\sqrt{x}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      15. associate-*l/1.7%

        \[\leadsto \frac{\color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
      16. associate-*r/1.7%

        \[\leadsto \color{blue}{\left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \cdot -3 \]
      17. associate-*r*1.7%

        \[\leadsto \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)\right)} \cdot -3 \]
      18. *-commutative1.7%

        \[\leadsto \left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)}\right) \cdot -3 \]
      19. associate-*r*1.7%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot -3\right)} \]
      20. associate-*r*1.7%

        \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot -3\right)\right)} \]
      21. *-commutative1.7%

        \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \]
    8. Simplified1.7%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\sqrt{x}}} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}}} \cdot \sqrt{\frac{-0.3333333333333333}{\sqrt{x}}}} \]
      2. sqrt-unprod72.2%

        \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}} \cdot \frac{-0.3333333333333333}{\sqrt{x}}}} \]
      3. frac-times72.2%

        \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333 \cdot -0.3333333333333333}{\sqrt{x} \cdot \sqrt{x}}}} \]
      4. metadata-eval72.2%

        \[\leadsto \sqrt{\frac{\color{blue}{0.1111111111111111}}{\sqrt{x} \cdot \sqrt{x}}} \]
      5. add-sqr-sqrt72.3%

        \[\leadsto \sqrt{\frac{0.1111111111111111}{\color{blue}{x}}} \]
      6. pow1/272.3%

        \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    10. Applied egg-rr72.3%

      \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
    11. Step-by-step derivation
      1. unpow1/272.3%

        \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
    12. Simplified72.3%

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

    if 0.680000000000000049 < 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.7%

        \[\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.7%

        \[\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.7%

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

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

        \[\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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)} \]
    7. Taylor expanded in x around inf 47.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 0.68:\\ \;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot -3\\ \end{array} \]

Alternative 11: 37.9% 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.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. associate-*l*99.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)\right)} \]
    2. expm1-udef34.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(3 \cdot \left(\sqrt{x} \cdot \frac{0.1111111111111111}{x}\right)\right)} - 1} \]
    3. associate-*r*34.3%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(3 \cdot \sqrt{x}\right) \cdot \frac{0.1111111111111111}{x}}\right)} - 1 \]
    4. *-commutative34.3%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot 3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    5. metadata-eval34.3%

      \[\leadsto e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot \color{blue}{\sqrt{9}}\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    6. sqrt-prod34.3%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{x \cdot 9}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    7. add-sqr-sqrt34.3%

      \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)} \cdot 9} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    8. metadata-eval34.3%

      \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\left(\sqrt{x} \cdot \sqrt{x}\right) \cdot \color{blue}{\left(-3 \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    9. swap-sqr34.3%

      \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{\left(\sqrt{x} \cdot -3\right) \cdot \left(\sqrt{x} \cdot -3\right)}} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    10. sqrt-unprod0.0%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\sqrt{x} \cdot -3} \cdot \sqrt{\sqrt{x} \cdot -3}\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
    11. add-sqr-sqrt1.3%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{x} \cdot -3\right)} \cdot \frac{0.1111111111111111}{x}\right)} - 1 \]
  6. Applied egg-rr1.3%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)} - 1} \]
  7. Step-by-step derivation
    1. expm1-def1.9%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.1111111111111111}{x}\right)\right)} \]
    2. expm1-log1p2.7%

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

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

      \[\leadsto \color{blue}{\left(\frac{0.1111111111111111}{x} \cdot \sqrt{x}\right) \cdot -3} \]
    5. associate-*l/2.7%

      \[\leadsto \color{blue}{\frac{0.1111111111111111 \cdot \sqrt{x}}{x}} \cdot -3 \]
    6. *-commutative2.7%

      \[\leadsto \frac{\color{blue}{\sqrt{x} \cdot 0.1111111111111111}}{x} \cdot -3 \]
    7. rem-square-sqrt2.7%

      \[\leadsto \frac{\sqrt{x} \cdot 0.1111111111111111}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} \cdot -3 \]
    8. times-frac2.7%

      \[\leadsto \color{blue}{\left(\frac{\sqrt{x}}{\sqrt{x}} \cdot \frac{0.1111111111111111}{\sqrt{x}}\right)} \cdot -3 \]
    9. *-inverses2.7%

      \[\leadsto \left(\color{blue}{1} \cdot \frac{0.1111111111111111}{\sqrt{x}}\right) \cdot -3 \]
    10. *-lft-identity2.7%

      \[\leadsto \color{blue}{\frac{0.1111111111111111}{\sqrt{x}}} \cdot -3 \]
    11. metadata-eval2.7%

      \[\leadsto \frac{\color{blue}{0.3333333333333333 \cdot 0.3333333333333333}}{\sqrt{x}} \cdot -3 \]
    12. metadata-eval2.7%

      \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333}{1}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
    13. *-inverses2.7%

      \[\leadsto \frac{\frac{0.3333333333333333}{\color{blue}{\frac{\sqrt{x}}{\sqrt{x}}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
    14. associate-/l*2.7%

      \[\leadsto \frac{\color{blue}{\frac{0.3333333333333333 \cdot \sqrt{x}}{\sqrt{x}}} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
    15. associate-*l/2.7%

      \[\leadsto \frac{\color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)} \cdot 0.3333333333333333}{\sqrt{x}} \cdot -3 \]
    16. associate-*r/2.7%

      \[\leadsto \color{blue}{\left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \cdot -3 \]
    17. associate-*r*2.7%

      \[\leadsto \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)\right)} \cdot -3 \]
    18. *-commutative2.7%

      \[\leadsto \left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right)}\right) \cdot -3 \]
    19. associate-*r*2.7%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \sqrt{x}\right) \cdot -3\right)} \]
    20. associate-*r*2.7%

      \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\frac{0.3333333333333333}{\sqrt{x}} \cdot \left(\sqrt{x} \cdot -3\right)\right)} \]
    21. *-commutative2.7%

      \[\leadsto \frac{0.3333333333333333}{\sqrt{x}} \cdot \color{blue}{\left(\left(\sqrt{x} \cdot -3\right) \cdot \frac{0.3333333333333333}{\sqrt{x}}\right)} \]
  8. Simplified2.7%

    \[\leadsto \color{blue}{\frac{-0.3333333333333333}{\sqrt{x}}} \]
  9. Step-by-step derivation
    1. add-sqr-sqrt0.0%

      \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}}} \cdot \sqrt{\frac{-0.3333333333333333}{\sqrt{x}}}} \]
    2. sqrt-unprod36.5%

      \[\leadsto \color{blue}{\sqrt{\frac{-0.3333333333333333}{\sqrt{x}} \cdot \frac{-0.3333333333333333}{\sqrt{x}}}} \]
    3. frac-times36.5%

      \[\leadsto \sqrt{\color{blue}{\frac{-0.3333333333333333 \cdot -0.3333333333333333}{\sqrt{x} \cdot \sqrt{x}}}} \]
    4. metadata-eval36.5%

      \[\leadsto \sqrt{\frac{\color{blue}{0.1111111111111111}}{\sqrt{x} \cdot \sqrt{x}}} \]
    5. add-sqr-sqrt36.6%

      \[\leadsto \sqrt{\frac{0.1111111111111111}{\color{blue}{x}}} \]
    6. pow1/236.6%

      \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
  10. Applied egg-rr36.6%

    \[\leadsto \color{blue}{{\left(\frac{0.1111111111111111}{x}\right)}^{0.5}} \]
  11. Step-by-step derivation
    1. unpow1/236.6%

      \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
  12. Simplified36.6%

    \[\leadsto \color{blue}{\sqrt{\frac{0.1111111111111111}{x}}} \]
  13. Final simplification36.6%

    \[\leadsto \sqrt{\frac{0.1111111111111111}{x}} \]

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

  :herbie-target
  (* 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)))