
(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 15 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.8%
Final simplification99.8%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (* y (pow x -0.5)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y * pow(x, -0.5)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y * (x ** (-0.5d0))))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y * Math.pow(x, -0.5)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y * math.pow(x, -0.5)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y * (x ^ -0.5)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y * (x ^ -0.5))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \left(y \cdot {x}^{-0.5}\right)
\end{array}
Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
clear-num99.7%
associate-/r/99.7%
pow1/299.7%
pow-flip99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (or (<= y -2.15e+104) (not (<= y 1.8e+97))) (* -0.3333333333333333 (* y (sqrt (/ 1.0 x)))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -2.15e+104) || !(y <= 1.8e+97)) {
tmp = -0.3333333333333333 * (y * sqrt((1.0 / x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.15d+104)) .or. (.not. (y <= 1.8d+97))) then
tmp = (-0.3333333333333333d0) * (y * sqrt((1.0d0 / x)))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.15e+104) || !(y <= 1.8e+97)) {
tmp = -0.3333333333333333 * (y * Math.sqrt((1.0 / x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.15e+104) or not (y <= 1.8e+97): tmp = -0.3333333333333333 * (y * math.sqrt((1.0 / x))) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.15e+104) || !(y <= 1.8e+97)) tmp = Float64(-0.3333333333333333 * Float64(y * sqrt(Float64(1.0 / x)))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.15e+104) || ~((y <= 1.8e+97))) tmp = -0.3333333333333333 * (y * sqrt((1.0 / x))); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.15e+104], N[Not[LessEqual[y, 1.8e+97]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+104} \lor \neg \left(y \leq 1.8 \cdot 10^{+97}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -2.1500000000000001e104 or 1.79999999999999983e97 < y Initial program 99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 95.0%
if -2.1500000000000001e104 < y < 1.79999999999999983e97Initial program 99.9%
associate--l-99.9%
+-commutative99.9%
associate--r+99.9%
sub-neg99.9%
distribute-frac-neg99.9%
associate-+r-99.9%
neg-mul-199.9%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 95.7%
cancel-sign-sub-inv95.7%
metadata-eval95.7%
associate-*r/95.8%
metadata-eval95.8%
+-commutative95.8%
Simplified95.8%
Final simplification95.5%
(FPCore (x y) :precision binary64 (if (or (<= y -4.2e+104) (not (<= y 1.5e+39))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -4.2e+104) || !(y <= 1.5e+39)) {
tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-4.2d+104)) .or. (.not. (y <= 1.5d+39))) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -4.2e+104) || !(y <= 1.5e+39)) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -4.2e+104) or not (y <= 1.5e+39): tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -4.2e+104) || !(y <= 1.5e+39)) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -4.2e+104) || ~((y <= 1.5e+39))) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -4.2e+104], N[Not[LessEqual[y, 1.5e+39]], $MachinePrecision]], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+104} \lor \neg \left(y \leq 1.5 \cdot 10^{+39}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -4.1999999999999997e104 or 1.5e39 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 96.4%
inv-pow96.4%
sqrt-pow196.5%
metadata-eval96.5%
expm1-log1p-u95.3%
expm1-udef53.6%
Applied egg-rr53.6%
expm1-def95.3%
expm1-log1p96.5%
Simplified96.5%
expm1-log1p-u48.1%
expm1-udef48.1%
associate-*r*48.1%
metadata-eval48.1%
sqrt-pow148.1%
inv-pow48.1%
sqrt-div48.1%
metadata-eval48.1%
div-inv48.1%
Applied egg-rr48.1%
expm1-def48.1%
expm1-log1p96.4%
associate-*l/96.4%
associate-*r/96.4%
Simplified96.4%
if -4.1999999999999997e104 < y < 1.5e39Initial program 99.9%
associate--l-99.9%
+-commutative99.9%
associate--r+99.9%
sub-neg99.9%
distribute-frac-neg99.9%
associate-+r-99.9%
neg-mul-199.9%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified96.7%
Final simplification96.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 x))))
(if (<= y -1.75e+104)
(* -0.3333333333333333 (* y t_0))
(if (<= y 1.7e+97)
(+ 1.0 (/ -0.1111111111111111 x))
(* y (* -0.3333333333333333 t_0))))))
double code(double x, double y) {
double t_0 = sqrt((1.0 / x));
double tmp;
if (y <= -1.75e+104) {
tmp = -0.3333333333333333 * (y * t_0);
} else if (y <= 1.7e+97) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = y * (-0.3333333333333333 * t_0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((1.0d0 / x))
if (y <= (-1.75d+104)) then
tmp = (-0.3333333333333333d0) * (y * t_0)
else if (y <= 1.7d+97) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = y * ((-0.3333333333333333d0) * t_0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt((1.0 / x));
double tmp;
if (y <= -1.75e+104) {
tmp = -0.3333333333333333 * (y * t_0);
} else if (y <= 1.7e+97) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = y * (-0.3333333333333333 * t_0);
}
return tmp;
}
def code(x, y): t_0 = math.sqrt((1.0 / x)) tmp = 0 if y <= -1.75e+104: tmp = -0.3333333333333333 * (y * t_0) elif y <= 1.7e+97: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = y * (-0.3333333333333333 * t_0) return tmp
function code(x, y) t_0 = sqrt(Float64(1.0 / x)) tmp = 0.0 if (y <= -1.75e+104) tmp = Float64(-0.3333333333333333 * Float64(y * t_0)); elseif (y <= 1.7e+97) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(y * Float64(-0.3333333333333333 * t_0)); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt((1.0 / x)); tmp = 0.0; if (y <= -1.75e+104) tmp = -0.3333333333333333 * (y * t_0); elseif (y <= 1.7e+97) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = y * (-0.3333333333333333 * t_0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -1.75e+104], N[(-0.3333333333333333 * N[(y * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+97], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{x}}\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+104}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot t_0\right)\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+97}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot t_0\right)\\
\end{array}
\end{array}
if y < -1.7500000000000001e104Initial program 99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 94.2%
if -1.7500000000000001e104 < y < 1.70000000000000005e97Initial program 99.9%
associate--l-99.9%
+-commutative99.9%
associate--r+99.9%
sub-neg99.9%
distribute-frac-neg99.9%
associate-+r-99.9%
neg-mul-199.9%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 95.7%
cancel-sign-sub-inv95.7%
metadata-eval95.7%
associate-*r/95.8%
metadata-eval95.8%
+-commutative95.8%
Simplified95.8%
if 1.70000000000000005e97 < y Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 95.7%
associate-*r*95.8%
Simplified95.8%
Final simplification95.5%
(FPCore (x y)
:precision binary64
(if (<= y -1.7e+104)
(+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y)))
(if (<= y 1.12e+39)
(+ 1.0 (/ -0.1111111111111111 x))
(+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -1.7e+104) {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
} else if (y <= 1.12e+39) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / 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.7d+104)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
else if (y <= 1.12d+39) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.7e+104) {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
} else if (y <= 1.12e+39) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.7e+104: tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) elif y <= 1.12e+39: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.7e+104) tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); elseif (y <= 1.12e+39) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.7e+104) tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); elseif (y <= 1.12e+39) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.7e+104], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+39], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+104}:\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+39}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -1.6999999999999998e104Initial program 99.5%
associate--l-99.5%
+-commutative99.5%
associate--r+99.5%
sub-neg99.5%
distribute-frac-neg99.5%
associate-+r-99.5%
neg-mul-199.5%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.3%
metadata-eval99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 98.4%
inv-pow98.4%
sqrt-pow198.6%
metadata-eval98.6%
expm1-log1p-u97.3%
expm1-udef51.7%
Applied egg-rr51.7%
expm1-def97.3%
expm1-log1p98.6%
Simplified98.6%
associate-*r*98.4%
metadata-eval98.4%
sqrt-pow198.3%
inv-pow98.3%
sqrt-div98.3%
metadata-eval98.3%
div-inv98.3%
associate-/r/98.4%
Applied egg-rr98.4%
if -1.6999999999999998e104 < y < 1.12e39Initial program 99.9%
associate--l-99.9%
+-commutative99.9%
associate--r+99.9%
sub-neg99.9%
distribute-frac-neg99.9%
associate-+r-99.9%
neg-mul-199.9%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified96.7%
if 1.12e39 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.8%
inv-pow94.8%
sqrt-pow194.8%
metadata-eval94.8%
expm1-log1p-u93.7%
expm1-udef55.0%
Applied egg-rr55.0%
expm1-def93.7%
expm1-log1p94.8%
Simplified94.8%
expm1-log1p-u13.7%
expm1-udef13.7%
associate-*r*13.7%
metadata-eval13.7%
sqrt-pow113.7%
inv-pow13.7%
sqrt-div13.7%
metadata-eval13.7%
div-inv13.7%
Applied egg-rr13.7%
expm1-def13.7%
expm1-log1p94.9%
associate-*l/95.0%
associate-*r/94.9%
Simplified94.9%
Final simplification96.6%
(FPCore (x y)
:precision binary64
(if (<= y -1.7e+104)
(+ 1.0 (/ y (* (sqrt x) -3.0)))
(if (<= y 1.3e+39)
(+ 1.0 (/ -0.1111111111111111 x))
(+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -1.7e+104) {
tmp = 1.0 + (y / (sqrt(x) * -3.0));
} else if (y <= 1.3e+39) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / 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.7d+104)) then
tmp = 1.0d0 + (y / (sqrt(x) * (-3.0d0)))
else if (y <= 1.3d+39) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.7e+104) {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
} else if (y <= 1.3e+39) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.7e+104: tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) elif y <= 1.3e+39: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.7e+104) tmp = Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0))); elseif (y <= 1.3e+39) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.7e+104) tmp = 1.0 + (y / (sqrt(x) * -3.0)); elseif (y <= 1.3e+39) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.7e+104], N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+39], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+104}:\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+39}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -1.6999999999999998e104Initial program 99.5%
associate--l-99.5%
+-commutative99.5%
associate--r+99.5%
sub-neg99.5%
distribute-frac-neg99.5%
associate-+r-99.5%
neg-mul-199.5%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.3%
metadata-eval99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 98.4%
inv-pow98.4%
sqrt-pow198.6%
metadata-eval98.6%
expm1-log1p-u97.3%
expm1-udef51.7%
Applied egg-rr51.7%
expm1-def97.3%
expm1-log1p98.6%
Simplified98.6%
expm1-log1p-u91.9%
expm1-udef91.9%
associate-*r*91.9%
metadata-eval91.9%
sqrt-pow191.9%
inv-pow91.9%
sqrt-div91.9%
metadata-eval91.9%
div-inv91.9%
Applied egg-rr91.9%
expm1-def91.9%
expm1-log1p98.3%
associate-*l/98.3%
associate-*r/98.3%
Simplified98.3%
associate-*r/98.3%
associate-*l/98.3%
clear-num98.1%
div-inv98.4%
metadata-eval98.4%
metadata-eval98.4%
distribute-rgt-neg-in98.4%
*-commutative98.4%
associate-*l/98.4%
*-un-lft-identity98.4%
*-commutative98.4%
distribute-rgt-neg-in98.4%
metadata-eval98.4%
Applied egg-rr98.4%
if -1.6999999999999998e104 < y < 1.3e39Initial program 99.9%
associate--l-99.9%
+-commutative99.9%
associate--r+99.9%
sub-neg99.9%
distribute-frac-neg99.9%
associate-+r-99.9%
neg-mul-199.9%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified96.7%
if 1.3e39 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.8%
inv-pow94.8%
sqrt-pow194.8%
metadata-eval94.8%
expm1-log1p-u93.7%
expm1-udef55.0%
Applied egg-rr55.0%
expm1-def93.7%
expm1-log1p94.8%
Simplified94.8%
expm1-log1p-u13.7%
expm1-udef13.7%
associate-*r*13.7%
metadata-eval13.7%
sqrt-pow113.7%
inv-pow13.7%
sqrt-div13.7%
metadata-eval13.7%
div-inv13.7%
Applied egg-rr13.7%
expm1-def13.7%
expm1-log1p94.9%
associate-*l/95.0%
associate-*r/94.9%
Simplified94.9%
Final simplification96.6%
(FPCore (x y)
:precision binary64
(if (<= y -1.7e+104)
(+ 1.0 (* -0.3333333333333333 (* y (pow x -0.5))))
(if (<= y 1.45e+39)
(+ 1.0 (/ -0.1111111111111111 x))
(+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -1.7e+104) {
tmp = 1.0 + (-0.3333333333333333 * (y * pow(x, -0.5)));
} else if (y <= 1.45e+39) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / 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.7d+104)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y * (x ** (-0.5d0))))
else if (y <= 1.45d+39) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.7e+104) {
tmp = 1.0 + (-0.3333333333333333 * (y * Math.pow(x, -0.5)));
} else if (y <= 1.45e+39) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.7e+104: tmp = 1.0 + (-0.3333333333333333 * (y * math.pow(x, -0.5))) elif y <= 1.45e+39: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.7e+104) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y * (x ^ -0.5)))); elseif (y <= 1.45e+39) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.7e+104) tmp = 1.0 + (-0.3333333333333333 * (y * (x ^ -0.5))); elseif (y <= 1.45e+39) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.7e+104], N[(1.0 + N[(-0.3333333333333333 * N[(y * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+39], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+104}:\\
\;\;\;\;1 + -0.3333333333333333 \cdot \left(y \cdot {x}^{-0.5}\right)\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+39}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -1.6999999999999998e104Initial program 99.5%
associate--l-99.5%
+-commutative99.5%
associate--r+99.5%
sub-neg99.5%
distribute-frac-neg99.5%
associate-+r-99.5%
neg-mul-199.5%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.3%
metadata-eval99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 98.4%
inv-pow98.4%
sqrt-pow198.6%
metadata-eval98.6%
expm1-log1p-u97.3%
expm1-udef51.7%
Applied egg-rr51.7%
expm1-def97.3%
expm1-log1p98.6%
Simplified98.6%
if -1.6999999999999998e104 < y < 1.45000000000000015e39Initial program 99.9%
associate--l-99.9%
+-commutative99.9%
associate--r+99.9%
sub-neg99.9%
distribute-frac-neg99.9%
associate-+r-99.9%
neg-mul-199.9%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
+-commutative96.7%
Simplified96.7%
if 1.45000000000000015e39 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.8%
inv-pow94.8%
sqrt-pow194.8%
metadata-eval94.8%
expm1-log1p-u93.7%
expm1-udef55.0%
Applied egg-rr55.0%
expm1-def93.7%
expm1-log1p94.8%
Simplified94.8%
expm1-log1p-u13.7%
expm1-udef13.7%
associate-*r*13.7%
metadata-eval13.7%
sqrt-pow113.7%
inv-pow13.7%
sqrt-div13.7%
metadata-eval13.7%
div-inv13.7%
Applied egg-rr13.7%
expm1-def13.7%
expm1-log1p94.9%
associate-*l/95.0%
associate-*r/94.9%
Simplified94.9%
Final simplification96.7%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (/ -0.3333333333333333 (/ (sqrt x) y))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 / (sqrt(x) / y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) / (sqrt(x) / y))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 / (Math.sqrt(x) / y));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 / (math.sqrt(x) / y))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 / (sqrt(x) / y)); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}
\end{array}
Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(if (<= y 4.6e+168)
(+ 1.0 (/ -0.1111111111111111 x))
(/
(- 1.0 (/ -0.012345679012345678 (* x (- x))))
(- 1.0 (/ -0.1111111111111111 x)))))
double code(double x, double y) {
double tmp;
if (y <= 4.6e+168) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - (-0.012345679012345678 / (x * -x))) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 4.6d+168) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 - ((-0.012345679012345678d0) / (x * -x))) / (1.0d0 - ((-0.1111111111111111d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.6e+168) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - (-0.012345679012345678 / (x * -x))) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.6e+168: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 - (-0.012345679012345678 / (x * -x))) / (1.0 - (-0.1111111111111111 / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.6e+168) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 - Float64(-0.012345679012345678 / Float64(x * Float64(-x)))) / Float64(1.0 - Float64(-0.1111111111111111 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.6e+168) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 - (-0.012345679012345678 / (x * -x))) / (1.0 - (-0.1111111111111111 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.6e+168], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(-0.012345679012345678 / N[(x * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.6 \cdot 10^{+168}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{-0.012345679012345678}{x \cdot \left(-x\right)}}{1 - \frac{-0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < 4.5999999999999999e168Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 75.2%
cancel-sign-sub-inv75.2%
metadata-eval75.2%
associate-*r/75.3%
metadata-eval75.3%
+-commutative75.3%
Simplified75.3%
if 4.5999999999999999e168 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.4%
fma-neg99.4%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 4.2%
cancel-sign-sub-inv4.2%
metadata-eval4.2%
associate-*r/4.2%
metadata-eval4.2%
+-commutative4.2%
Simplified4.2%
div-inv4.2%
fma-def4.2%
Applied egg-rr4.2%
fma-udef4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
div-inv4.2%
+-commutative4.2%
flip-+39.1%
metadata-eval39.1%
div-inv39.1%
distribute-lft-neg-in39.1%
metadata-eval39.1%
div-inv39.1%
distribute-lft-neg-in39.1%
metadata-eval39.1%
un-div-inv39.1%
un-div-inv39.1%
distribute-neg-frac39.1%
metadata-eval39.1%
Applied egg-rr39.1%
frac-2neg39.1%
frac-times39.1%
metadata-eval39.1%
metadata-eval39.1%
Applied egg-rr39.1%
Final simplification71.2%
(FPCore (x y)
:precision binary64
(if (<= y 7e+124)
(+ 1.0 (/ -0.1111111111111111 x))
(/
(- 1.0 (/ (/ 0.012345679012345678 x) x))
(- 1.0 (/ -0.1111111111111111 x)))))
double code(double x, double y) {
double tmp;
if (y <= 7e+124) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 7d+124) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 - ((0.012345679012345678d0 / x) / x)) / (1.0d0 - ((-0.1111111111111111d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 7e+124) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 7e+124: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 - (-0.1111111111111111 / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 7e+124) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 - Float64(Float64(0.012345679012345678 / x) / x)) / Float64(1.0 - Float64(-0.1111111111111111 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 7e+124) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 - (-0.1111111111111111 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 7e+124], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[(0.012345679012345678 / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7 \cdot 10^{+124}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{\frac{0.012345679012345678}{x}}{x}}{1 - \frac{-0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < 7.0000000000000002e124Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 77.5%
cancel-sign-sub-inv77.5%
metadata-eval77.5%
associate-*r/77.6%
metadata-eval77.6%
+-commutative77.6%
Simplified77.6%
if 7.0000000000000002e124 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 4.1%
cancel-sign-sub-inv4.1%
metadata-eval4.1%
associate-*r/4.1%
metadata-eval4.1%
+-commutative4.1%
Simplified4.1%
div-inv4.1%
fma-def4.1%
Applied egg-rr4.1%
fma-udef4.1%
metadata-eval4.1%
distribute-lft-neg-in4.1%
div-inv4.1%
+-commutative4.1%
flip-+32.2%
metadata-eval32.2%
div-inv32.2%
distribute-lft-neg-in32.2%
metadata-eval32.2%
div-inv32.2%
distribute-lft-neg-in32.2%
metadata-eval32.2%
un-div-inv32.2%
un-div-inv32.2%
distribute-neg-frac32.2%
metadata-eval32.2%
Applied egg-rr32.2%
frac-times32.2%
associate-/r*32.2%
metadata-eval32.2%
Applied egg-rr32.2%
Final simplification71.2%
(FPCore (x y) :precision binary64 (if (<= x 2300.0) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 2300.0) {
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 <= 2300.0d0) 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 <= 2300.0) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2300.0: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 2300.0) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2300.0) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2300.0], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2300:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 2300Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
clear-num99.6%
associate-/r/99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 65.4%
if 2300 < x Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 68.1%
Final simplification66.8%
(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.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 67.1%
cancel-sign-sub-inv67.1%
metadata-eval67.1%
associate-*r/67.2%
metadata-eval67.2%
+-commutative67.2%
Simplified67.2%
Final simplification67.2%
(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.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 36.8%
Final simplification36.8%
(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 2023318
(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)))))