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

Percentage Accurate: 99.7% → 99.7%
Time: 9.4s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 99.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.7% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 91.9% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.50000000000000007e85 or 7.50000000000000014e87 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000007e85 < y < 7.50000000000000014e87

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 92.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+85} \lor \neg \left(y \leq 1.25 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.00000000000000013e85 or 1.2499999999999999e86 < y

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{-3}} \cdot \frac{y}{\sqrt{x}} \]
      7. times-frac95.6%

        \[\leadsto \color{blue}{\frac{1 \cdot y}{-3 \cdot \sqrt{x}}} \]
      8. *-un-lft-identity95.6%

        \[\leadsto \frac{\color{blue}{y}}{-3 \cdot \sqrt{x}} \]
      9. *-commutative95.6%

        \[\leadsto \frac{y}{\color{blue}{\sqrt{x} \cdot -3}} \]
    8. Applied egg-rr95.6%

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

    if -9.00000000000000013e85 < y < 1.2499999999999999e86

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 92.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{-3}} \cdot \frac{y}{\sqrt{x}} \]
      7. times-frac94.4%

        \[\leadsto \color{blue}{\frac{1 \cdot y}{-3 \cdot \sqrt{x}}} \]
      8. *-un-lft-identity94.4%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{\sqrt{x}}} \]
    8. Applied egg-rr94.5%

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

    if -4.2000000000000002e85 < y < 8.9999999999999994e84

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999994e84 < y

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{y}{\sqrt{x}}} \]
      6. metadata-eval96.7%

        \[\leadsto \color{blue}{\frac{1}{-3}} \cdot \frac{y}{\sqrt{x}} \]
      7. times-frac96.7%

        \[\leadsto \color{blue}{\frac{1 \cdot y}{-3 \cdot \sqrt{x}}} \]
      8. *-un-lft-identity96.7%

        \[\leadsto \frac{\color{blue}{y}}{-3 \cdot \sqrt{x}} \]
      9. *-commutative96.7%

        \[\leadsto \frac{y}{\color{blue}{\sqrt{x} \cdot -3}} \]
    8. Applied egg-rr96.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+85}:\\ \;\;\;\;\frac{\frac{y}{-3}}{\sqrt{x}}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+84}:\\ \;\;\;\;1 - 0.1111111111111111 \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 92.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+85}:\\
\;\;\;\;\frac{\frac{y}{-3}}{\sqrt{x}}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{\sqrt{x}}}{-3}\\


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{1}{-3}} \cdot \frac{y}{\sqrt{x}} \]
      7. times-frac94.4%

        \[\leadsto \color{blue}{\frac{1 \cdot y}{-3 \cdot \sqrt{x}}} \]
      8. *-un-lft-identity94.4%

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

        \[\leadsto \color{blue}{\frac{\frac{y}{-3}}{\sqrt{x}}} \]
    8. Applied egg-rr94.5%

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

    if -4.50000000000000007e85 < y < 5.99999999999999992e84

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

    if 5.99999999999999992e84 < y

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -0.3333333333333333 \cdot \color{blue}{\frac{y}{\sqrt{x}}} \]
      6. metadata-eval96.7%

        \[\leadsto \color{blue}{\frac{1}{-3}} \cdot \frac{y}{\sqrt{x}} \]
      7. associate-/r/96.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{-3}{\frac{y}{\sqrt{x}}}}} \]
      8. clear-num96.8%

        \[\leadsto \color{blue}{\frac{\frac{y}{\sqrt{x}}}{-3}} \]
    8. Applied egg-rr96.8%

      \[\leadsto \color{blue}{\frac{\frac{y}{\sqrt{x}}}{-3}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification95.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+85}:\\ \;\;\;\;\frac{\frac{y}{-3}}{\sqrt{x}}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{+84}:\\ \;\;\;\;1 - 0.1111111111111111 \cdot \frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{\sqrt{x}}}{-3}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 62.9% accurate, 16.1× speedup?

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

\\
1 - 0.1111111111111111 \cdot \frac{1}{x}
\end{array}
Derivation
  1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{1 - 0.1111111111111111 \cdot \frac{1}{x}} \]
  6. Final simplification59.7%

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

Alternative 10: 61.9% accurate, 22.3× speedup?

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

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

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


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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if 0.110000000000000001 < x

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.9% accurate, 22.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 31.7% accurate, 113.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 1 \]
  7. Add Preprocessing

Developer target: 99.7% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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