
(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:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(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}
Initial program 99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(if (<= y -1.12e+78)
(- 1.0 (/ y (* 3.0 (sqrt x))))
(if (<= y 8.2e+81)
(+ 1.0 (/ -1.0 (* x 9.0)))
(- 1.0 (/ (/ y 3.0) (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -1.12e+78) {
tmp = 1.0 - (y / (3.0 * sqrt(x)));
} else if (y <= 8.2e+81) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - ((y / 3.0) / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.12d+78)) then
tmp = 1.0d0 - (y / (3.0d0 * sqrt(x)))
else if (y <= 8.2d+81) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = 1.0d0 - ((y / 3.0d0) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.12e+78) {
tmp = 1.0 - (y / (3.0 * Math.sqrt(x)));
} else if (y <= 8.2e+81) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - ((y / 3.0) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.12e+78: tmp = 1.0 - (y / (3.0 * math.sqrt(x))) elif y <= 8.2e+81: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 - ((y / 3.0) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.12e+78) tmp = Float64(1.0 - Float64(y / Float64(3.0 * sqrt(x)))); elseif (y <= 8.2e+81) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(1.0 - Float64(Float64(y / 3.0) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.12e+78) tmp = 1.0 - (y / (3.0 * sqrt(x))); elseif (y <= 8.2e+81) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 - ((y / 3.0) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.12e+78], N[(1.0 - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+81], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(y / 3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{+78}:\\
\;\;\;\;1 - \frac{y}{3 \cdot \sqrt{x}}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+81}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y}{3}}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -1.12e78Initial program 99.7%
Taylor expanded in x around inf
Simplified93.7%
if -1.12e78 < y < 8.20000000000000024e81Initial program 99.8%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6496.7%
Simplified96.7%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
div-invN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6496.9%
Applied egg-rr96.9%
if 8.20000000000000024e81 < y Initial program 99.6%
Taylor expanded in x around inf
Simplified94.7%
--lowering--.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6494.8%
Applied egg-rr94.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (/ y (* 3.0 (sqrt x))))))
(if (<= y -4.6e+77)
t_0
(if (<= y 8.2e+81) (+ 1.0 (/ -1.0 (* x 9.0))) t_0))))
double code(double x, double y) {
double t_0 = 1.0 - (y / (3.0 * sqrt(x)));
double tmp;
if (y <= -4.6e+77) {
tmp = t_0;
} else if (y <= 8.2e+81) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 - (y / (3.0d0 * sqrt(x)))
if (y <= (-4.6d+77)) then
tmp = t_0
else if (y <= 8.2d+81) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 - (y / (3.0 * Math.sqrt(x)));
double tmp;
if (y <= -4.6e+77) {
tmp = t_0;
} else if (y <= 8.2e+81) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 - (y / (3.0 * math.sqrt(x))) tmp = 0 if y <= -4.6e+77: tmp = t_0 elif y <= 8.2e+81: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(y / Float64(3.0 * sqrt(x)))) tmp = 0.0 if (y <= -4.6e+77) tmp = t_0; elseif (y <= 8.2e+81) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - (y / (3.0 * sqrt(x))); tmp = 0.0; if (y <= -4.6e+77) tmp = t_0; elseif (y <= 8.2e+81) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+77], t$95$0, If[LessEqual[y, 8.2e+81], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{y}{3 \cdot \sqrt{x}}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+77}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+81}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -4.5999999999999999e77 or 8.20000000000000024e81 < y Initial program 99.6%
Taylor expanded in x around inf
Simplified94.1%
if -4.5999999999999999e77 < y < 8.20000000000000024e81Initial program 99.8%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6496.7%
Simplified96.7%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
div-invN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6496.9%
Applied egg-rr96.9%
(FPCore (x y)
:precision binary64
(if (<= y -3.8e+81)
(* (* y (pow x -0.5)) -0.3333333333333333)
(if (<= y 6.9e+93)
(+ 1.0 (/ -1.0 (* x 9.0)))
(/ (* y -0.3333333333333333) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -3.8e+81) {
tmp = (y * pow(x, -0.5)) * -0.3333333333333333;
} else if (y <= 6.9e+93) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (y * -0.3333333333333333) / sqrt(x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-3.8d+81)) then
tmp = (y * (x ** (-0.5d0))) * (-0.3333333333333333d0)
else if (y <= 6.9d+93) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3.8e+81) {
tmp = (y * Math.pow(x, -0.5)) * -0.3333333333333333;
} else if (y <= 6.9e+93) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.8e+81: tmp = (y * math.pow(x, -0.5)) * -0.3333333333333333 elif y <= 6.9e+93: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = (y * -0.3333333333333333) / math.sqrt(x) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.8e+81) tmp = Float64(Float64(y * (x ^ -0.5)) * -0.3333333333333333); elseif (y <= 6.9e+93) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.8e+81) tmp = (y * (x ^ -0.5)) * -0.3333333333333333; elseif (y <= 6.9e+93) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = (y * -0.3333333333333333) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.8e+81], N[(N[(y * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], If[LessEqual[y, 6.9e+93], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+81}:\\
\;\;\;\;\left(y \cdot {x}^{-0.5}\right) \cdot -0.3333333333333333\\
\mathbf{elif}\;y \leq 6.9 \cdot 10^{+93}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -3.8e81Initial program 99.7%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6490.8%
Simplified90.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow1/2N/A
inv-powN/A
pow-powN/A
pow-lowering-pow.f64N/A
metadata-eval90.9%
Applied egg-rr90.9%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
pow-lowering-pow.f6490.9%
Applied egg-rr90.9%
if -3.8e81 < y < 6.8999999999999995e93Initial program 99.8%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6495.7%
Simplified95.7%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
div-invN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6495.8%
Applied egg-rr95.8%
if 6.8999999999999995e93 < y Initial program 99.6%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6499.6%
Applied egg-rr99.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6493.3%
Simplified93.3%
*-commutativeN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6493.4%
Applied egg-rr93.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* y -0.3333333333333333) (sqrt x))))
(if (<= y -5.5e+82)
t_0
(if (<= y 2.3e+92) (+ 1.0 (/ -1.0 (* x 9.0))) t_0))))
double code(double x, double y) {
double t_0 = (y * -0.3333333333333333) / sqrt(x);
double tmp;
if (y <= -5.5e+82) {
tmp = t_0;
} else if (y <= 2.3e+92) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (y * (-0.3333333333333333d0)) / sqrt(x)
if (y <= (-5.5d+82)) then
tmp = t_0
else if (y <= 2.3d+92) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y * -0.3333333333333333) / Math.sqrt(x);
double tmp;
if (y <= -5.5e+82) {
tmp = t_0;
} else if (y <= 2.3e+92) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (y * -0.3333333333333333) / math.sqrt(x) tmp = 0 if y <= -5.5e+82: tmp = t_0 elif y <= 2.3e+92: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(y * -0.3333333333333333) / sqrt(x)) tmp = 0.0 if (y <= -5.5e+82) tmp = t_0; elseif (y <= 2.3e+92) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (y * -0.3333333333333333) / sqrt(x); tmp = 0.0; if (y <= -5.5e+82) tmp = t_0; elseif (y <= 2.3e+92) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+82], t$95$0, If[LessEqual[y, 2.3e+92], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+82}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+92}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -5.49999999999999997e82 or 2.29999999999999998e92 < y Initial program 99.6%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6499.6%
Applied egg-rr99.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6491.8%
Simplified91.8%
*-commutativeN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6491.9%
Applied egg-rr91.9%
if -5.49999999999999997e82 < y < 2.29999999999999998e92Initial program 99.8%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6495.7%
Simplified95.7%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
div-invN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6495.8%
Applied egg-rr95.8%
(FPCore (x y)
:precision binary64
(if (<= y -7.6e+83)
(* -0.3333333333333333 (/ y (sqrt x)))
(if (<= y 4.5e+97)
(+ 1.0 (/ -1.0 (* x 9.0)))
(* y (/ -0.3333333333333333 (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -7.6e+83) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else if (y <= 4.5e+97) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = y * (-0.3333333333333333 / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-7.6d+83)) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else if (y <= 4.5d+97) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -7.6e+83) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else if (y <= 4.5e+97) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -7.6e+83: tmp = -0.3333333333333333 * (y / math.sqrt(x)) elif y <= 4.5e+97: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = y * (-0.3333333333333333 / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -7.6e+83) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); elseif (y <= 4.5e+97) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -7.6e+83) tmp = -0.3333333333333333 * (y / sqrt(x)); elseif (y <= 4.5e+97) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = y * (-0.3333333333333333 / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -7.6e+83], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+97], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+83}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+97}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -7.6000000000000004e83Initial program 99.7%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6490.8%
Simplified90.8%
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6490.8%
Applied egg-rr90.8%
if -7.6000000000000004e83 < y < 4.49999999999999976e97Initial program 99.8%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6495.7%
Simplified95.7%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
div-invN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6495.8%
Applied egg-rr95.8%
if 4.49999999999999976e97 < y Initial program 99.6%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6499.6%
Applied egg-rr99.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6493.3%
Simplified93.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6493.3%
Applied egg-rr93.3%
Final simplification94.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (/ -0.3333333333333333 (sqrt x)))))
(if (<= y -2.4e+78)
t_0
(if (<= y 2.8e+92) (+ 1.0 (/ -1.0 (* x 9.0))) t_0))))
double code(double x, double y) {
double t_0 = y * (-0.3333333333333333 / sqrt(x));
double tmp;
if (y <= -2.4e+78) {
tmp = t_0;
} else if (y <= 2.8e+92) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y * ((-0.3333333333333333d0) / sqrt(x))
if (y <= (-2.4d+78)) then
tmp = t_0
else if (y <= 2.8d+92) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (-0.3333333333333333 / Math.sqrt(x));
double tmp;
if (y <= -2.4e+78) {
tmp = t_0;
} else if (y <= 2.8e+92) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = y * (-0.3333333333333333 / math.sqrt(x)) tmp = 0 if y <= -2.4e+78: tmp = t_0 elif y <= 2.8e+92: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(y * Float64(-0.3333333333333333 / sqrt(x))) tmp = 0.0 if (y <= -2.4e+78) tmp = t_0; elseif (y <= 2.8e+92) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = y * (-0.3333333333333333 / sqrt(x)); tmp = 0.0; if (y <= -2.4e+78) tmp = t_0; elseif (y <= 2.8e+92) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+78], t$95$0, If[LessEqual[y, 2.8e+92], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+92}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -2.3999999999999999e78 or 2.80000000000000001e92 < y Initial program 99.6%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6499.6%
Applied egg-rr99.6%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6491.8%
Simplified91.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6491.8%
Applied egg-rr91.8%
if -2.3999999999999999e78 < y < 2.80000000000000001e92Initial program 99.8%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6495.7%
Simplified95.7%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
div-invN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6495.8%
Applied egg-rr95.8%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (- (/ -0.1111111111111111 x) (/ y (* 3.0 (sqrt x)))) (- 1.0 (/ (/ y 3.0) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (-0.1111111111111111 / x) - (y / (3.0 * sqrt(x)));
} else {
tmp = 1.0 - ((y / 3.0) / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.11d0) then
tmp = ((-0.1111111111111111d0) / x) - (y / (3.0d0 * sqrt(x)))
else
tmp = 1.0d0 - ((y / 3.0d0) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (-0.1111111111111111 / x) - (y / (3.0 * Math.sqrt(x)));
} else {
tmp = 1.0 - ((y / 3.0) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = (-0.1111111111111111 / x) - (y / (3.0 * math.sqrt(x))) else: tmp = 1.0 - ((y / 3.0) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(Float64(-0.1111111111111111 / x) - Float64(y / Float64(3.0 * sqrt(x)))); else tmp = Float64(1.0 - Float64(Float64(y / 3.0) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = (-0.1111111111111111 / x) - (y / (3.0 * sqrt(x))); else tmp = 1.0 - ((y / 3.0) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(N[(-0.1111111111111111 / x), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(y / 3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.1111111111111111}{x} - \frac{y}{3 \cdot \sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y}{3}}{\sqrt{x}}\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.6%
Taylor expanded in x around 0
/-lowering-/.f6498.4%
Simplified98.4%
if 0.110000000000000001 < x Initial program 99.9%
Taylor expanded in x around inf
Simplified98.3%
--lowering--.f64N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f6498.4%
Applied egg-rr98.4%
(FPCore (x y) :precision binary64 (+ (/ (/ y -3.0) (sqrt x)) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
return ((y / -3.0) / sqrt(x)) + (1.0 + (-0.1111111111111111 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y / (-3.0d0)) / sqrt(x)) + (1.0d0 + ((-0.1111111111111111d0) / x))
end function
public static double code(double x, double y) {
return ((y / -3.0) / Math.sqrt(x)) + (1.0 + (-0.1111111111111111 / x));
}
def code(x, y): return ((y / -3.0) / math.sqrt(x)) + (1.0 + (-0.1111111111111111 / x))
function code(x, y) return Float64(Float64(Float64(y / -3.0) / sqrt(x)) + Float64(1.0 + Float64(-0.1111111111111111 / x))) end
function tmp = code(x, y) tmp = ((y / -3.0) / sqrt(x)) + (1.0 + (-0.1111111111111111 / x)); end
code[x_, y_] := N[(N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{y}{-3}}{\sqrt{x}} + \left(1 + \frac{-0.1111111111111111}{x}\right)
\end{array}
Initial program 99.7%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
+-commutativeN/A
frac-2negN/A
distribute-frac-neg2N/A
metadata-evalN/A
metadata-evalN/A
associate-/r*N/A
*-commutativeN/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
sub-negN/A
*-commutativeN/A
associate-/r*N/A
metadata-evalN/A
metadata-evalN/A
distribute-frac-neg2N/A
frac-2negN/A
+-lowering-+.f64N/A
/-lowering-/.f6499.7%
Applied egg-rr99.7%
(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(y / Float64(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[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-0.1111111111111111}{x}\right) + \frac{y}{\sqrt{x} \cdot -3}
\end{array}
Initial program 99.7%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
(FPCore (x y)
:precision binary64
(if (<= y -1.3e+124)
(+
(/ 1.0 (+ 1.0 (/ (- (/ 0.012345679012345678 x) -0.1111111111111111) x)))
(/
(-
(/ (- (/ 1.8816764231589208e-6 (* x x)) 0.00015241579027587258) x)
-0.0013717421124828531)
(* x (* x x))))
(+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if (y <= -1.3e+124) {
tmp = (1.0 / (1.0 + (((0.012345679012345678 / x) - -0.1111111111111111) / x))) + (((((1.8816764231589208e-6 / (x * x)) - 0.00015241579027587258) / x) - -0.0013717421124828531) / (x * (x * x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.3d+124)) then
tmp = (1.0d0 / (1.0d0 + (((0.012345679012345678d0 / x) - (-0.1111111111111111d0)) / x))) + (((((1.8816764231589208d-6 / (x * x)) - 0.00015241579027587258d0) / x) - (-0.0013717421124828531d0)) / (x * (x * x)))
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.3e+124) {
tmp = (1.0 / (1.0 + (((0.012345679012345678 / x) - -0.1111111111111111) / x))) + (((((1.8816764231589208e-6 / (x * x)) - 0.00015241579027587258) / x) - -0.0013717421124828531) / (x * (x * x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.3e+124: tmp = (1.0 / (1.0 + (((0.012345679012345678 / x) - -0.1111111111111111) / x))) + (((((1.8816764231589208e-6 / (x * x)) - 0.00015241579027587258) / x) - -0.0013717421124828531) / (x * (x * x))) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.3e+124) tmp = Float64(Float64(1.0 / Float64(1.0 + Float64(Float64(Float64(0.012345679012345678 / x) - -0.1111111111111111) / x))) + Float64(Float64(Float64(Float64(Float64(1.8816764231589208e-6 / Float64(x * x)) - 0.00015241579027587258) / x) - -0.0013717421124828531) / Float64(x * Float64(x * x)))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.3e+124) tmp = (1.0 / (1.0 + (((0.012345679012345678 / x) - -0.1111111111111111) / x))) + (((((1.8816764231589208e-6 / (x * x)) - 0.00015241579027587258) / x) - -0.0013717421124828531) / (x * (x * x))); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.3e+124], N[(N[(1.0 / N[(1.0 + N[(N[(N[(0.012345679012345678 / x), $MachinePrecision] - -0.1111111111111111), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(1.8816764231589208e-6 / N[(x * x), $MachinePrecision]), $MachinePrecision] - 0.00015241579027587258), $MachinePrecision] / x), $MachinePrecision] - -0.0013717421124828531), $MachinePrecision] / N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+124}:\\
\;\;\;\;\frac{1}{1 + \frac{\frac{0.012345679012345678}{x} - -0.1111111111111111}{x}} + \frac{\frac{\frac{1.8816764231589208 \cdot 10^{-6}}{x \cdot x} - 0.00015241579027587258}{x} - -0.0013717421124828531}{x \cdot \left(x \cdot x\right)}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -1.3e124Initial program 99.6%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f642.5%
Simplified2.5%
Applied egg-rr3.7%
Taylor expanded in x around inf
/-lowering-/.f64N/A
Simplified27.8%
if -1.3e124 < y Initial program 99.8%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6479.2%
Simplified79.2%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
div-invN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6479.3%
Applied egg-rr79.3%
Final simplification71.5%
(FPCore (x y) :precision binary64 (if (<= y -1.3e+124) (- 1.0 (/ (+ 0.1111111111111111 (/ -0.0027434842249657062 (* x x))) x)) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if (y <= -1.3e+124) {
tmp = 1.0 - ((0.1111111111111111 + (-0.0027434842249657062 / (x * x))) / x);
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.3d+124)) then
tmp = 1.0d0 - ((0.1111111111111111d0 + ((-0.0027434842249657062d0) / (x * x))) / x)
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.3e+124) {
tmp = 1.0 - ((0.1111111111111111 + (-0.0027434842249657062 / (x * x))) / x);
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.3e+124: tmp = 1.0 - ((0.1111111111111111 + (-0.0027434842249657062 / (x * x))) / x) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.3e+124) tmp = Float64(1.0 - Float64(Float64(0.1111111111111111 + Float64(-0.0027434842249657062 / Float64(x * x))) / x)); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.3e+124) tmp = 1.0 - ((0.1111111111111111 + (-0.0027434842249657062 / (x * x))) / x); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.3e+124], N[(1.0 - N[(N[(0.1111111111111111 + N[(-0.0027434842249657062 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+124}:\\
\;\;\;\;1 - \frac{0.1111111111111111 + \frac{-0.0027434842249657062}{x \cdot x}}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -1.3e124Initial program 99.6%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f642.5%
Simplified2.5%
Applied egg-rr3.7%
Taylor expanded in x around inf
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate--r-N/A
associate-*r/N/A
metadata-evalN/A
unpow3N/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
Simplified25.7%
if -1.3e124 < y Initial program 99.8%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6479.2%
Simplified79.2%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
div-invN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6479.3%
Applied egg-rr79.3%
(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}
if x < 0.110000000000000001Initial program 99.6%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6469.1%
Simplified69.1%
Taylor expanded in x around 0
/-lowering-/.f6468.0%
Simplified68.0%
if 0.110000000000000001 < x Initial program 99.9%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6465.8%
Simplified65.8%
Taylor expanded in x around inf
Simplified64.3%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -1.0 (* x 9.0))))
double code(double x, double y) {
return 1.0 + (-1.0 / (x * 9.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end function
public static double code(double x, double y) {
return 1.0 + (-1.0 / (x * 9.0));
}
def code(x, y): return 1.0 + (-1.0 / (x * 9.0))
function code(x, y) return Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) end
function tmp = code(x, y) tmp = 1.0 + (-1.0 / (x * 9.0)); end
code[x_, y_] := N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-1}{x \cdot 9}
\end{array}
Initial program 99.7%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6467.5%
Simplified67.5%
clear-numN/A
associate-/r/N/A
metadata-evalN/A
metadata-evalN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
metadata-evalN/A
div-invN/A
clear-numN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
associate-/r/N/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6467.6%
Applied egg-rr67.6%
(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}
Initial program 99.7%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6467.5%
Simplified67.5%
(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}
Initial program 99.7%
sub-negN/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-/r*N/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
metadata-evalN/A
metadata-evalN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0
sub-negN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f6467.5%
Simplified67.5%
Taylor expanded in x around inf
Simplified31.4%
(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}
herbie shell --seed 2024161
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(! :herbie-platform default (- (- 1 (/ (/ 1 x) 9)) (/ y (* 3 (sqrt x)))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))