
(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 17 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 (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((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))) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 + (-1.0 / (x * 9.0))) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-1}{x \cdot 9}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* -0.3333333333333333 (/ y (sqrt x)))))
(if (<= y -7.5e+109)
t_0
(if (<= y -1.55e+80)
(+ 1.0 (/ (* y -0.1111111111111111) (* x y)))
(if (or (<= y -5.6e+75) (not (<= y 4.1e+41)))
t_0
(+ 1.0 (/ -1.0 (* x 9.0))))))))
double code(double x, double y) {
double t_0 = -0.3333333333333333 * (y / sqrt(x));
double tmp;
if (y <= -7.5e+109) {
tmp = t_0;
} else if (y <= -1.55e+80) {
tmp = 1.0 + ((y * -0.1111111111111111) / (x * y));
} else if ((y <= -5.6e+75) || !(y <= 4.1e+41)) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = (-0.3333333333333333d0) * (y / sqrt(x))
if (y <= (-7.5d+109)) then
tmp = t_0
else if (y <= (-1.55d+80)) then
tmp = 1.0d0 + ((y * (-0.1111111111111111d0)) / (x * y))
else if ((y <= (-5.6d+75)) .or. (.not. (y <= 4.1d+41))) then
tmp = t_0
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = -0.3333333333333333 * (y / Math.sqrt(x));
double tmp;
if (y <= -7.5e+109) {
tmp = t_0;
} else if (y <= -1.55e+80) {
tmp = 1.0 + ((y * -0.1111111111111111) / (x * y));
} else if ((y <= -5.6e+75) || !(y <= 4.1e+41)) {
tmp = t_0;
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): t_0 = -0.3333333333333333 * (y / math.sqrt(x)) tmp = 0 if y <= -7.5e+109: tmp = t_0 elif y <= -1.55e+80: tmp = 1.0 + ((y * -0.1111111111111111) / (x * y)) elif (y <= -5.6e+75) or not (y <= 4.1e+41): tmp = t_0 else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) t_0 = Float64(-0.3333333333333333 * Float64(y / sqrt(x))) tmp = 0.0 if (y <= -7.5e+109) tmp = t_0; elseif (y <= -1.55e+80) tmp = Float64(1.0 + Float64(Float64(y * -0.1111111111111111) / Float64(x * y))); elseif ((y <= -5.6e+75) || !(y <= 4.1e+41)) tmp = t_0; else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = -0.3333333333333333 * (y / sqrt(x)); tmp = 0.0; if (y <= -7.5e+109) tmp = t_0; elseif (y <= -1.55e+80) tmp = 1.0 + ((y * -0.1111111111111111) / (x * y)); elseif ((y <= -5.6e+75) || ~((y <= 4.1e+41))) tmp = t_0; else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+109], t$95$0, If[LessEqual[y, -1.55e+80], N[(1.0 + N[(N[(y * -0.1111111111111111), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5.6e+75], N[Not[LessEqual[y, 4.1e+41]], $MachinePrecision]], t$95$0, N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+109}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{+80}:\\
\;\;\;\;1 + \frac{y \cdot -0.1111111111111111}{x \cdot y}\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{+75} \lor \neg \left(y \leq 4.1 \cdot 10^{+41}\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -7.50000000000000018e109 or -1.54999999999999994e80 < y < -5.60000000000000023e75 or 4.1000000000000004e41 < y Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in y around inf 92.9%
associate-*r*92.9%
*-commutative92.9%
Simplified92.9%
*-commutative92.9%
*-commutative92.9%
sqrt-div92.8%
metadata-eval92.8%
div-inv92.9%
associate-*r/92.8%
Applied egg-rr92.8%
*-commutative92.8%
associate-/l*92.9%
Simplified92.9%
if -7.50000000000000018e109 < y < -1.54999999999999994e80Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod100.0%
pow1/2100.0%
Applied egg-rr100.0%
unpow1/2100.0%
Simplified100.0%
Taylor expanded in y around inf 99.6%
Simplified99.8%
Taylor expanded in y around 0 75.1%
associate-*r/75.1%
Applied egg-rr75.1%
if -5.60000000000000023e75 < y < 4.1000000000000004e41Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 96.7%
expm1-log1p-u45.1%
log1p-define45.1%
expm1-undefine45.1%
add-exp-log96.7%
Applied egg-rr96.7%
associate--l+96.7%
Simplified96.7%
associate-+r-96.7%
add-exp-log45.1%
log1p-undefine45.1%
expm1-undefine45.1%
expm1-log1p-u96.7%
metadata-eval96.7%
distribute-neg-frac96.7%
clear-num96.6%
distribute-neg-frac96.6%
metadata-eval96.6%
div-inv96.7%
metadata-eval96.7%
Applied egg-rr96.7%
Final simplification94.3%
(FPCore (x y)
:precision binary64
(if (<= y -7.5e+109)
(* (pow x -0.5) (* y -0.3333333333333333))
(if (<= y -2.7e+81)
(+ 1.0 (/ (* y -0.1111111111111111) (* x y)))
(if (<= y -8.5e+73)
(* -0.3333333333333333 (/ y (sqrt x)))
(if (<= y 3.8e+41)
(+ 1.0 (/ -1.0 (* x 9.0)))
(/ y (* (sqrt x) -3.0)))))))
double code(double x, double y) {
double tmp;
if (y <= -7.5e+109) {
tmp = pow(x, -0.5) * (y * -0.3333333333333333);
} else if (y <= -2.7e+81) {
tmp = 1.0 + ((y * -0.1111111111111111) / (x * y));
} else if (y <= -8.5e+73) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else if (y <= 3.8e+41) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} 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 <= (-7.5d+109)) then
tmp = (x ** (-0.5d0)) * (y * (-0.3333333333333333d0))
else if (y <= (-2.7d+81)) then
tmp = 1.0d0 + ((y * (-0.1111111111111111d0)) / (x * y))
else if (y <= (-8.5d+73)) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else if (y <= 3.8d+41) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
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 <= -7.5e+109) {
tmp = Math.pow(x, -0.5) * (y * -0.3333333333333333);
} else if (y <= -2.7e+81) {
tmp = 1.0 + ((y * -0.1111111111111111) / (x * y));
} else if (y <= -8.5e+73) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else if (y <= 3.8e+41) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = y / (Math.sqrt(x) * -3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -7.5e+109: tmp = math.pow(x, -0.5) * (y * -0.3333333333333333) elif y <= -2.7e+81: tmp = 1.0 + ((y * -0.1111111111111111) / (x * y)) elif y <= -8.5e+73: tmp = -0.3333333333333333 * (y / math.sqrt(x)) elif y <= 3.8e+41: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = y / (math.sqrt(x) * -3.0) return tmp
function code(x, y) tmp = 0.0 if (y <= -7.5e+109) tmp = Float64((x ^ -0.5) * Float64(y * -0.3333333333333333)); elseif (y <= -2.7e+81) tmp = Float64(1.0 + Float64(Float64(y * -0.1111111111111111) / Float64(x * y))); elseif (y <= -8.5e+73) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); elseif (y <= 3.8e+41) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(y / Float64(sqrt(x) * -3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -7.5e+109) tmp = (x ^ -0.5) * (y * -0.3333333333333333); elseif (y <= -2.7e+81) tmp = 1.0 + ((y * -0.1111111111111111) / (x * y)); elseif (y <= -8.5e+73) tmp = -0.3333333333333333 * (y / sqrt(x)); elseif (y <= 3.8e+41) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = y / (sqrt(x) * -3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -7.5e+109], N[(N[Power[x, -0.5], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.7e+81], N[(1.0 + N[(N[(y * -0.1111111111111111), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.5e+73], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+41], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+109}:\\
\;\;\;\;{x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{+81}:\\
\;\;\;\;1 + \frac{y \cdot -0.1111111111111111}{x \cdot y}\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{+73}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+41}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\end{array}
\end{array}
if y < -7.50000000000000018e109Initial program 99.4%
Taylor expanded in x around inf 99.5%
metadata-eval99.5%
*-commutative99.5%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.6%
times-frac99.4%
*-un-lft-identity99.4%
Applied egg-rr99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 99.5%
associate-*r*99.5%
*-commutative99.5%
associate-*l*99.5%
Simplified99.5%
*-un-lft-identity99.5%
inv-pow99.5%
sqrt-pow199.6%
metadata-eval99.6%
Applied egg-rr99.6%
*-lft-identity99.6%
Simplified99.6%
if -7.50000000000000018e109 < y < -2.6999999999999999e81Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod100.0%
pow1/2100.0%
Applied egg-rr100.0%
unpow1/2100.0%
Simplified100.0%
Taylor expanded in y around inf 99.6%
Simplified99.8%
Taylor expanded in y around 0 75.1%
associate-*r/75.1%
Applied egg-rr75.1%
if -2.6999999999999999e81 < y < -8.4999999999999998e73Initial program 98.4%
*-commutative98.4%
metadata-eval98.4%
sqrt-prod98.4%
pow1/298.4%
Applied egg-rr98.4%
unpow1/298.4%
Simplified98.4%
Taylor expanded in x around 0 98.4%
Taylor expanded in y around inf 100.0%
associate-*r*98.4%
*-commutative98.4%
Simplified98.4%
*-commutative98.4%
*-commutative98.4%
sqrt-div98.4%
metadata-eval98.4%
div-inv100.0%
associate-*r/100.0%
Applied egg-rr100.0%
*-commutative100.0%
associate-/l*100.0%
Simplified100.0%
if -8.4999999999999998e73 < y < 3.8000000000000001e41Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 96.7%
expm1-log1p-u45.1%
log1p-define45.1%
expm1-undefine45.1%
add-exp-log96.7%
Applied egg-rr96.7%
associate--l+96.7%
Simplified96.7%
associate-+r-96.7%
add-exp-log45.1%
log1p-undefine45.1%
expm1-undefine45.1%
expm1-log1p-u96.7%
metadata-eval96.7%
distribute-neg-frac96.7%
clear-num96.6%
distribute-neg-frac96.6%
metadata-eval96.6%
div-inv96.7%
metadata-eval96.7%
Applied egg-rr96.7%
if 3.8000000000000001e41 < y Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.8%
Taylor expanded in y around inf 85.8%
associate-*r*85.8%
*-commutative85.8%
Simplified85.8%
*-commutative85.8%
*-commutative85.8%
sqrt-div85.6%
metadata-eval85.6%
div-inv85.7%
clear-num85.8%
un-div-inv85.9%
div-inv86.0%
metadata-eval86.0%
Applied egg-rr86.0%
Final simplification94.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* -0.3333333333333333 (/ y (sqrt x)))))
(if (<= y -7.5e+109)
t_0
(if (<= y -4.2e+80)
(+ 1.0 (/ (* y -0.1111111111111111) (* x y)))
(if (<= y -1.55e+75)
t_0
(if (<= y 8.6e+40)
(+ 1.0 (/ -1.0 (* x 9.0)))
(/ y (* (sqrt x) -3.0))))))))
double code(double x, double y) {
double t_0 = -0.3333333333333333 * (y / sqrt(x));
double tmp;
if (y <= -7.5e+109) {
tmp = t_0;
} else if (y <= -4.2e+80) {
tmp = 1.0 + ((y * -0.1111111111111111) / (x * y));
} else if (y <= -1.55e+75) {
tmp = t_0;
} else if (y <= 8.6e+40) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} 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) :: t_0
real(8) :: tmp
t_0 = (-0.3333333333333333d0) * (y / sqrt(x))
if (y <= (-7.5d+109)) then
tmp = t_0
else if (y <= (-4.2d+80)) then
tmp = 1.0d0 + ((y * (-0.1111111111111111d0)) / (x * y))
else if (y <= (-1.55d+75)) then
tmp = t_0
else if (y <= 8.6d+40) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = y / (sqrt(x) * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = -0.3333333333333333 * (y / Math.sqrt(x));
double tmp;
if (y <= -7.5e+109) {
tmp = t_0;
} else if (y <= -4.2e+80) {
tmp = 1.0 + ((y * -0.1111111111111111) / (x * y));
} else if (y <= -1.55e+75) {
tmp = t_0;
} else if (y <= 8.6e+40) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = y / (Math.sqrt(x) * -3.0);
}
return tmp;
}
def code(x, y): t_0 = -0.3333333333333333 * (y / math.sqrt(x)) tmp = 0 if y <= -7.5e+109: tmp = t_0 elif y <= -4.2e+80: tmp = 1.0 + ((y * -0.1111111111111111) / (x * y)) elif y <= -1.55e+75: tmp = t_0 elif y <= 8.6e+40: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = y / (math.sqrt(x) * -3.0) return tmp
function code(x, y) t_0 = Float64(-0.3333333333333333 * Float64(y / sqrt(x))) tmp = 0.0 if (y <= -7.5e+109) tmp = t_0; elseif (y <= -4.2e+80) tmp = Float64(1.0 + Float64(Float64(y * -0.1111111111111111) / Float64(x * y))); elseif (y <= -1.55e+75) tmp = t_0; elseif (y <= 8.6e+40) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(y / Float64(sqrt(x) * -3.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = -0.3333333333333333 * (y / sqrt(x)); tmp = 0.0; if (y <= -7.5e+109) tmp = t_0; elseif (y <= -4.2e+80) tmp = 1.0 + ((y * -0.1111111111111111) / (x * y)); elseif (y <= -1.55e+75) tmp = t_0; elseif (y <= 8.6e+40) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = y / (sqrt(x) * -3.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+109], t$95$0, If[LessEqual[y, -4.2e+80], N[(1.0 + N[(N[(y * -0.1111111111111111), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.55e+75], t$95$0, If[LessEqual[y, 8.6e+40], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+109}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{+80}:\\
\;\;\;\;1 + \frac{y \cdot -0.1111111111111111}{x \cdot y}\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{+75}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{+40}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\end{array}
\end{array}
if y < -7.50000000000000018e109 or -4.20000000000000003e80 < y < -1.5500000000000001e75Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 99.5%
associate-*r*99.5%
*-commutative99.5%
Simplified99.5%
*-commutative99.5%
*-commutative99.5%
sqrt-div99.5%
metadata-eval99.5%
div-inv99.6%
associate-*r/99.5%
Applied egg-rr99.5%
*-commutative99.5%
associate-/l*99.6%
Simplified99.6%
if -7.50000000000000018e109 < y < -4.20000000000000003e80Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod100.0%
pow1/2100.0%
Applied egg-rr100.0%
unpow1/2100.0%
Simplified100.0%
Taylor expanded in y around inf 99.6%
Simplified99.8%
Taylor expanded in y around 0 75.1%
associate-*r/75.1%
Applied egg-rr75.1%
if -1.5500000000000001e75 < y < 8.6000000000000005e40Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 96.7%
expm1-log1p-u45.1%
log1p-define45.1%
expm1-undefine45.1%
add-exp-log96.7%
Applied egg-rr96.7%
associate--l+96.7%
Simplified96.7%
associate-+r-96.7%
add-exp-log45.1%
log1p-undefine45.1%
expm1-undefine45.1%
expm1-log1p-u96.7%
metadata-eval96.7%
distribute-neg-frac96.7%
clear-num96.6%
distribute-neg-frac96.6%
metadata-eval96.6%
div-inv96.7%
metadata-eval96.7%
Applied egg-rr96.7%
if 8.6000000000000005e40 < y Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.8%
Taylor expanded in y around inf 85.8%
associate-*r*85.8%
*-commutative85.8%
Simplified85.8%
*-commutative85.8%
*-commutative85.8%
sqrt-div85.6%
metadata-eval85.6%
div-inv85.7%
clear-num85.8%
un-div-inv85.9%
div-inv86.0%
metadata-eval86.0%
Applied egg-rr86.0%
(FPCore (x y) :precision binary64 (if (or (<= y -5e+66) (not (<= y 2250.0))) (- 1.0 (/ y (sqrt (* x 9.0)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -5e+66) || !(y <= 2250.0)) {
tmp = 1.0 - (y / sqrt((x * 9.0)));
} 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 <= (-5d+66)) .or. (.not. (y <= 2250.0d0))) then
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
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 <= -5e+66) || !(y <= 2250.0)) {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -5e+66) or not (y <= 2250.0): tmp = 1.0 - (y / math.sqrt((x * 9.0))) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -5e+66) || !(y <= 2250.0)) tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); 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 <= -5e+66) || ~((y <= 2250.0))) tmp = 1.0 - (y / sqrt((x * 9.0))); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -5e+66], N[Not[LessEqual[y, 2250.0]], $MachinePrecision]], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $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 -5 \cdot 10^{+66} \lor \neg \left(y \leq 2250\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -4.99999999999999991e66 or 2250 < y Initial program 99.6%
Taylor expanded in x around inf 92.1%
metadata-eval92.1%
*-commutative92.1%
sqrt-div92.0%
metadata-eval92.0%
un-div-inv92.1%
times-frac92.1%
*-un-lft-identity92.1%
Applied egg-rr92.1%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr92.2%
unpow1/299.7%
Simplified92.2%
if -4.99999999999999991e66 < y < 2250Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.1%
expm1-log1p-u45.6%
log1p-define45.6%
expm1-undefine45.6%
add-exp-log98.1%
Applied egg-rr98.1%
associate--l+98.1%
Simplified98.1%
associate-+r-98.1%
add-exp-log45.6%
log1p-undefine45.6%
expm1-undefine45.6%
expm1-log1p-u98.1%
metadata-eval98.1%
distribute-neg-frac98.1%
clear-num98.0%
distribute-neg-frac98.0%
metadata-eval98.0%
div-inv98.1%
metadata-eval98.1%
Applied egg-rr98.1%
Final simplification95.1%
(FPCore (x y) :precision binary64 (if (or (<= y -4.8e+66) (not (<= y 2.6e-15))) (- 1.0 (* (/ y (sqrt x)) 0.3333333333333333)) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -4.8e+66) || !(y <= 2.6e-15)) {
tmp = 1.0 - ((y / sqrt(x)) * 0.3333333333333333);
} 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 <= (-4.8d+66)) .or. (.not. (y <= 2.6d-15))) then
tmp = 1.0d0 - ((y / sqrt(x)) * 0.3333333333333333d0)
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 <= -4.8e+66) || !(y <= 2.6e-15)) {
tmp = 1.0 - ((y / Math.sqrt(x)) * 0.3333333333333333);
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -4.8e+66) or not (y <= 2.6e-15): tmp = 1.0 - ((y / math.sqrt(x)) * 0.3333333333333333) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -4.8e+66) || !(y <= 2.6e-15)) tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) * 0.3333333333333333)); 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 <= -4.8e+66) || ~((y <= 2.6e-15))) tmp = 1.0 - ((y / sqrt(x)) * 0.3333333333333333); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -4.8e+66], N[Not[LessEqual[y, 2.6e-15]], $MachinePrecision]], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $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 -4.8 \cdot 10^{+66} \lor \neg \left(y \leq 2.6 \cdot 10^{-15}\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x}} \cdot 0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -4.8000000000000003e66 or 2.60000000000000004e-15 < y Initial program 99.6%
Taylor expanded in x around inf 91.5%
*-commutative91.5%
sqrt-div91.5%
metadata-eval91.5%
un-div-inv91.6%
Applied egg-rr91.6%
if -4.8000000000000003e66 < y < 2.60000000000000004e-15Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.0%
expm1-log1p-u45.1%
log1p-define45.1%
expm1-undefine45.1%
add-exp-log98.0%
Applied egg-rr98.0%
associate--l+98.0%
Simplified98.0%
associate-+r-98.0%
add-exp-log45.1%
log1p-undefine45.1%
expm1-undefine45.1%
expm1-log1p-u98.0%
metadata-eval98.0%
distribute-neg-frac98.0%
clear-num98.0%
distribute-neg-frac98.0%
metadata-eval98.0%
div-inv98.1%
metadata-eval98.1%
Applied egg-rr98.1%
Final simplification94.6%
(FPCore (x y)
:precision binary64
(if (<= y -1.25e+67)
(- 1.0 (* 0.3333333333333333 (* y (pow x -0.5))))
(if (<= y 2250.0)
(+ 1.0 (/ -1.0 (* x 9.0)))
(- 1.0 (/ y (sqrt (* x 9.0)))))))
double code(double x, double y) {
double tmp;
if (y <= -1.25e+67) {
tmp = 1.0 - (0.3333333333333333 * (y * pow(x, -0.5)));
} else if (y <= 2250.0) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - (y / sqrt((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.25d+67)) then
tmp = 1.0d0 - (0.3333333333333333d0 * (y * (x ** (-0.5d0))))
else if (y <= 2250.0d0) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.25e+67) {
tmp = 1.0 - (0.3333333333333333 * (y * Math.pow(x, -0.5)));
} else if (y <= 2250.0) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.25e+67: tmp = 1.0 - (0.3333333333333333 * (y * math.pow(x, -0.5))) elif y <= 2250.0: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.25e+67) tmp = Float64(1.0 - Float64(0.3333333333333333 * Float64(y * (x ^ -0.5)))); elseif (y <= 2250.0) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.25e+67) tmp = 1.0 - (0.3333333333333333 * (y * (x ^ -0.5))); elseif (y <= 2250.0) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.25e+67], N[(1.0 - N[(0.3333333333333333 * N[(y * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2250.0], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+67}:\\
\;\;\;\;1 - 0.3333333333333333 \cdot \left(y \cdot {x}^{-0.5}\right)\\
\mathbf{elif}\;y \leq 2250:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if y < -1.24999999999999994e67Initial program 99.5%
Taylor expanded in x around inf 95.2%
*-un-lft-identity95.2%
inv-pow95.2%
sqrt-pow195.3%
metadata-eval95.3%
Applied egg-rr95.3%
*-lft-identity95.3%
Simplified95.3%
if -1.24999999999999994e67 < y < 2250Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.1%
expm1-log1p-u45.6%
log1p-define45.6%
expm1-undefine45.6%
add-exp-log98.1%
Applied egg-rr98.1%
associate--l+98.1%
Simplified98.1%
associate-+r-98.1%
add-exp-log45.6%
log1p-undefine45.6%
expm1-undefine45.6%
expm1-log1p-u98.1%
metadata-eval98.1%
distribute-neg-frac98.1%
clear-num98.0%
distribute-neg-frac98.0%
metadata-eval98.0%
div-inv98.1%
metadata-eval98.1%
Applied egg-rr98.1%
if 2250 < y Initial program 99.7%
Taylor expanded in x around inf 88.7%
metadata-eval88.7%
*-commutative88.7%
sqrt-div88.6%
metadata-eval88.6%
un-div-inv88.7%
times-frac88.9%
*-un-lft-identity88.9%
Applied egg-rr88.9%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr88.9%
unpow1/299.8%
Simplified88.9%
Final simplification95.1%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ (+ 0.1111111111111111 (* 0.3333333333333333 (* y (sqrt x)))) (- x)) (- 1.0 (/ y (sqrt (* x 9.0))))))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (0.1111111111111111 + (0.3333333333333333 * (y * sqrt(x)))) / -x;
} else {
tmp = 1.0 - (y / sqrt((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 (x <= 0.11d0) then
tmp = (0.1111111111111111d0 + (0.3333333333333333d0 * (y * sqrt(x)))) / -x
else
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (0.1111111111111111 + (0.3333333333333333 * (y * Math.sqrt(x)))) / -x;
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = (0.1111111111111111 + (0.3333333333333333 * (y * math.sqrt(x)))) / -x else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(Float64(0.1111111111111111 + Float64(0.3333333333333333 * Float64(y * sqrt(x)))) / Float64(-x)); else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = (0.1111111111111111 + (0.3333333333333333 * (y * sqrt(x)))) / -x; else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(N[(0.1111111111111111 + N[(0.3333333333333333 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-x)), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{0.1111111111111111 + 0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right)}{-x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.6%
Taylor expanded in x around 0 98.3%
mul-1-neg98.3%
*-commutative98.3%
Simplified98.3%
if 0.110000000000000001 < x Initial program 99.8%
Taylor expanded in x around inf 99.4%
metadata-eval99.4%
*-commutative99.4%
sqrt-div99.3%
metadata-eval99.3%
un-div-inv99.4%
times-frac99.5%
*-un-lft-identity99.5%
Applied egg-rr99.5%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.5%
unpow1/299.8%
Simplified99.5%
Final simplification98.9%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.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 * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.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.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
(FPCore (x y) :precision binary64 (if (<= y -1e+206) (+ 1.0 (/ (/ 1.0 y) (* x (/ 9.0 y)))) (+ 1.0 (/ (/ 1.0 y) (/ x (* y -0.1111111111111111))))))
double code(double x, double y) {
double tmp;
if (y <= -1e+206) {
tmp = 1.0 + ((1.0 / y) / (x * (9.0 / y)));
} else {
tmp = 1.0 + ((1.0 / y) / (x / (y * -0.1111111111111111)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1d+206)) then
tmp = 1.0d0 + ((1.0d0 / y) / (x * (9.0d0 / y)))
else
tmp = 1.0d0 + ((1.0d0 / y) / (x / (y * (-0.1111111111111111d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1e+206) {
tmp = 1.0 + ((1.0 / y) / (x * (9.0 / y)));
} else {
tmp = 1.0 + ((1.0 / y) / (x / (y * -0.1111111111111111)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1e+206: tmp = 1.0 + ((1.0 / y) / (x * (9.0 / y))) else: tmp = 1.0 + ((1.0 / y) / (x / (y * -0.1111111111111111))) return tmp
function code(x, y) tmp = 0.0 if (y <= -1e+206) tmp = Float64(1.0 + Float64(Float64(1.0 / y) / Float64(x * Float64(9.0 / y)))); else tmp = Float64(1.0 + Float64(Float64(1.0 / y) / Float64(x / Float64(y * -0.1111111111111111)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1e+206) tmp = 1.0 + ((1.0 / y) / (x * (9.0 / y))); else tmp = 1.0 + ((1.0 / y) / (x / (y * -0.1111111111111111))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1e+206], N[(1.0 + N[(N[(1.0 / y), $MachinePrecision] / N[(x * N[(9.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(1.0 / y), $MachinePrecision] / N[(x / N[(y * -0.1111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+206}:\\
\;\;\;\;1 + \frac{\frac{1}{y}}{x \cdot \frac{9}{y}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{1}{y}}{\frac{x}{y \cdot -0.1111111111111111}}\\
\end{array}
\end{array}
if y < -1e206Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in y around inf 99.6%
Simplified99.7%
Taylor expanded in y around 0 2.3%
associate-/r*2.3%
div-inv2.3%
Applied egg-rr2.3%
associate-*r*2.2%
associate-/l*2.2%
clear-num2.2%
associate-*l/2.2%
*-un-lft-identity2.2%
Applied egg-rr2.2%
clear-num2.2%
associate-/l*2.2%
add-sqr-sqrt0.0%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod49.3%
add-sqr-sqrt49.3%
distribute-neg-frac49.3%
distribute-neg-frac49.3%
*-un-lft-identity49.3%
*-inverses49.3%
times-frac49.3%
*-commutative49.3%
clear-num49.3%
distribute-rgt-neg-out49.3%
*-commutative49.3%
times-frac49.3%
*-inverses49.3%
*-un-lft-identity49.3%
clear-num49.3%
associate-/l*49.3%
Applied egg-rr2.3%
neg-sub049.3%
distribute-rgt-neg-in49.3%
distribute-neg-frac49.3%
metadata-eval49.3%
Simplified49.3%
if -1e206 < y Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 86.7%
Simplified86.8%
Taylor expanded in y around 0 50.2%
associate-/r*50.3%
div-inv50.2%
Applied egg-rr50.2%
associate-*r*65.9%
associate-/l*65.9%
clear-num65.8%
associate-*l/66.3%
*-un-lft-identity66.3%
Applied egg-rr66.3%
(FPCore (x y) :precision binary64 (if (<= y -1e+206) (+ 1.0 (/ (/ 1.0 y) (* x (/ 9.0 y)))) (+ 1.0 (/ (* -0.1111111111111111 (/ y x)) y))))
double code(double x, double y) {
double tmp;
if (y <= -1e+206) {
tmp = 1.0 + ((1.0 / y) / (x * (9.0 / y)));
} else {
tmp = 1.0 + ((-0.1111111111111111 * (y / x)) / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1d+206)) then
tmp = 1.0d0 + ((1.0d0 / y) / (x * (9.0d0 / y)))
else
tmp = 1.0d0 + (((-0.1111111111111111d0) * (y / x)) / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1e+206) {
tmp = 1.0 + ((1.0 / y) / (x * (9.0 / y)));
} else {
tmp = 1.0 + ((-0.1111111111111111 * (y / x)) / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1e+206: tmp = 1.0 + ((1.0 / y) / (x * (9.0 / y))) else: tmp = 1.0 + ((-0.1111111111111111 * (y / x)) / y) return tmp
function code(x, y) tmp = 0.0 if (y <= -1e+206) tmp = Float64(1.0 + Float64(Float64(1.0 / y) / Float64(x * Float64(9.0 / y)))); else tmp = Float64(1.0 + Float64(Float64(-0.1111111111111111 * Float64(y / x)) / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1e+206) tmp = 1.0 + ((1.0 / y) / (x * (9.0 / y))); else tmp = 1.0 + ((-0.1111111111111111 * (y / x)) / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1e+206], N[(1.0 + N[(N[(1.0 / y), $MachinePrecision] / N[(x * N[(9.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-0.1111111111111111 * N[(y / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+206}:\\
\;\;\;\;1 + \frac{\frac{1}{y}}{x \cdot \frac{9}{y}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111 \cdot \frac{y}{x}}{y}\\
\end{array}
\end{array}
if y < -1e206Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in y around inf 99.6%
Simplified99.7%
Taylor expanded in y around 0 2.3%
associate-/r*2.3%
div-inv2.3%
Applied egg-rr2.3%
associate-*r*2.2%
associate-/l*2.2%
clear-num2.2%
associate-*l/2.2%
*-un-lft-identity2.2%
Applied egg-rr2.2%
clear-num2.2%
associate-/l*2.2%
add-sqr-sqrt0.0%
sqrt-unprod49.3%
sqr-neg49.3%
sqrt-unprod49.3%
add-sqr-sqrt49.3%
distribute-neg-frac49.3%
distribute-neg-frac49.3%
*-un-lft-identity49.3%
*-inverses49.3%
times-frac49.3%
*-commutative49.3%
clear-num49.3%
distribute-rgt-neg-out49.3%
*-commutative49.3%
times-frac49.3%
*-inverses49.3%
*-un-lft-identity49.3%
clear-num49.3%
associate-/l*49.3%
Applied egg-rr2.3%
neg-sub049.3%
distribute-rgt-neg-in49.3%
distribute-neg-frac49.3%
metadata-eval49.3%
Simplified49.3%
if -1e206 < y Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 86.7%
Simplified86.8%
Taylor expanded in y around 0 50.2%
associate-*r/50.8%
associate-/r*65.9%
Applied egg-rr65.9%
Taylor expanded in y around 0 65.9%
(FPCore (x y) :precision binary64 (if (<= x 4.7e-14) (/ 0.1111111111111111 (- x)) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 4.7e-14) {
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 <= 4.7d-14) 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 <= 4.7e-14) {
tmp = 0.1111111111111111 / -x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 4.7e-14: tmp = 0.1111111111111111 / -x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 4.7e-14) tmp = Float64(0.1111111111111111 / Float64(-x)); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 4.7e-14) tmp = 0.1111111111111111 / -x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 4.7e-14], N[(0.1111111111111111 / (-x)), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.7 \cdot 10^{-14}:\\
\;\;\;\;\frac{0.1111111111111111}{-x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 4.7000000000000002e-14Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
mul-1-neg99.6%
Simplified99.6%
Taylor expanded in y around 0 58.7%
if 4.7000000000000002e-14 < x Initial program 99.8%
Taylor expanded in x around inf 97.2%
Taylor expanded in y around 0 51.0%
Final simplification54.7%
(FPCore (x y) :precision binary64 (+ 1.0 (/ (* -0.1111111111111111 (/ y x)) y)))
double code(double x, double y) {
return 1.0 + ((-0.1111111111111111 * (y / x)) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (((-0.1111111111111111d0) * (y / x)) / y)
end function
public static double code(double x, double y) {
return 1.0 + ((-0.1111111111111111 * (y / x)) / y);
}
def code(x, y): return 1.0 + ((-0.1111111111111111 * (y / x)) / y)
function code(x, y) return Float64(1.0 + Float64(Float64(-0.1111111111111111 * Float64(y / x)) / y)) end
function tmp = code(x, y) tmp = 1.0 + ((-0.1111111111111111 * (y / x)) / y); end
code[x_, y_] := N[(1.0 + N[(N[(-0.1111111111111111 * N[(y / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-0.1111111111111111 \cdot \frac{y}{x}}{y}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 88.2%
Simplified88.3%
Taylor expanded in y around 0 44.6%
associate-*r/45.2%
associate-/r*58.4%
Applied egg-rr58.4%
Taylor expanded in y around 0 58.5%
(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%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 55.9%
expm1-log1p-u26.8%
log1p-define26.8%
expm1-undefine26.8%
add-exp-log55.9%
Applied egg-rr55.9%
associate--l+55.9%
Simplified55.9%
associate-+r-55.9%
add-exp-log26.8%
log1p-undefine26.8%
expm1-undefine26.8%
expm1-log1p-u55.9%
metadata-eval55.9%
distribute-neg-frac55.9%
clear-num55.9%
distribute-neg-frac55.9%
metadata-eval55.9%
div-inv55.9%
metadata-eval55.9%
Applied egg-rr55.9%
(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%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 55.9%
(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%
Taylor expanded in x around inf 70.7%
Taylor expanded in y around 0 27.5%
(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 2024107
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))