
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
(FPCore (x y) :precision binary64 (- (+ 1.0 (/ (/ -1.0 x) 9.0)) (/ y (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(Float64(-1.0 / 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[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{\frac{-1}{x}}{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%
Taylor expanded in x around 0 99.7%
div-inv99.7%
add-sqr-sqrt99.6%
associate-*r*99.6%
inv-pow99.6%
sqrt-pow199.6%
metadata-eval99.6%
inv-pow99.6%
sqrt-pow199.6%
metadata-eval99.6%
Applied egg-rr99.6%
associate-*l*99.6%
metadata-eval99.6%
pow-prod-up99.7%
metadata-eval99.7%
unpow-prod-down99.7%
*-commutative99.7%
unpow-199.7%
associate-/r*99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(if (or (<= y -6.2e+91)
(and (not (<= y -6e+45)) (or (<= y -1.15e+16) (not (<= y 8.5e+25)))))
(+ 1.0 (* -0.3333333333333333 (/ y (sqrt x))))
(+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -6.2e+91) || (!(y <= -6e+45) && ((y <= -1.15e+16) || !(y <= 8.5e+25)))) {
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 <= (-6.2d+91)) .or. (.not. (y <= (-6d+45))) .and. (y <= (-1.15d+16)) .or. (.not. (y <= 8.5d+25))) 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 <= -6.2e+91) || (!(y <= -6e+45) && ((y <= -1.15e+16) || !(y <= 8.5e+25)))) {
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 <= -6.2e+91) or (not (y <= -6e+45) and ((y <= -1.15e+16) or not (y <= 8.5e+25))): 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 <= -6.2e+91) || (!(y <= -6e+45) && ((y <= -1.15e+16) || !(y <= 8.5e+25)))) 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 <= -6.2e+91) || (~((y <= -6e+45)) && ((y <= -1.15e+16) || ~((y <= 8.5e+25))))) 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, -6.2e+91], And[N[Not[LessEqual[y, -6e+45]], $MachinePrecision], Or[LessEqual[y, -1.15e+16], N[Not[LessEqual[y, 8.5e+25]], $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 -6.2 \cdot 10^{+91} \lor \neg \left(y \leq -6 \cdot 10^{+45}\right) \land \left(y \leq -1.15 \cdot 10^{+16} \lor \neg \left(y \leq 8.5 \cdot 10^{+25}\right)\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -6.19999999999999995e91 or -6.00000000000000021e45 < y < -1.15e16 or 8.5000000000000007e25 < 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.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.5%
expm1-log1p-u51.7%
expm1-udef51.7%
*-commutative51.7%
sqrt-div51.7%
metadata-eval51.7%
div-inv51.7%
Applied egg-rr51.7%
expm1-def51.7%
expm1-log1p94.7%
Simplified94.7%
if -6.19999999999999995e91 < y < -6.00000000000000021e45 or -1.15e16 < y < 8.5000000000000007e25Initial 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%
Taylor expanded in y around 0 98.9%
cancel-sign-sub-inv98.9%
metadata-eval98.9%
associate-*r/98.9%
metadata-eval98.9%
+-commutative98.9%
Simplified98.9%
Final simplification97.0%
(FPCore (x y)
:precision binary64
(if (or (<= y -6.2e+91)
(not (or (<= y -2.7e+51) (and (not (<= y -1.08e+16)) (<= y 1e+28)))))
(+ 1.0 (/ y (* (sqrt x) -3.0)))
(+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -6.2e+91) || !((y <= -2.7e+51) || (!(y <= -1.08e+16) && (y <= 1e+28)))) {
tmp = 1.0 + (y / (sqrt(x) * -3.0));
} 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 <= (-6.2d+91)) .or. (.not. (y <= (-2.7d+51)) .or. (.not. (y <= (-1.08d+16))) .and. (y <= 1d+28))) then
tmp = 1.0d0 + (y / (sqrt(x) * (-3.0d0)))
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 <= -6.2e+91) || !((y <= -2.7e+51) || (!(y <= -1.08e+16) && (y <= 1e+28)))) {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -6.2e+91) or not ((y <= -2.7e+51) or (not (y <= -1.08e+16) and (y <= 1e+28))): tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -6.2e+91) || !((y <= -2.7e+51) || (!(y <= -1.08e+16) && (y <= 1e+28)))) tmp = Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -6.2e+91) || ~(((y <= -2.7e+51) || (~((y <= -1.08e+16)) && (y <= 1e+28))))) tmp = 1.0 + (y / (sqrt(x) * -3.0)); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -6.2e+91], N[Not[Or[LessEqual[y, -2.7e+51], And[N[Not[LessEqual[y, -1.08e+16]], $MachinePrecision], LessEqual[y, 1e+28]]]], $MachinePrecision]], N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+91} \lor \neg \left(y \leq -2.7 \cdot 10^{+51} \lor \neg \left(y \leq -1.08 \cdot 10^{+16}\right) \land y \leq 10^{+28}\right):\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -6.19999999999999995e91 or -2.69999999999999992e51 < y < -1.08e16 or 9.99999999999999958e27 < 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.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.5%
expm1-log1p-u51.7%
expm1-udef51.7%
*-commutative51.7%
sqrt-div51.7%
metadata-eval51.7%
div-inv51.7%
Applied egg-rr51.7%
expm1-def51.7%
expm1-log1p94.7%
Simplified94.7%
associate-*r/94.7%
associate-*l/94.7%
clear-num94.7%
div-inv94.7%
metadata-eval94.7%
metadata-eval94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*l/94.9%
*-un-lft-identity94.9%
*-commutative94.9%
distribute-rgt-neg-in94.9%
metadata-eval94.9%
Applied egg-rr94.9%
if -6.19999999999999995e91 < y < -2.69999999999999992e51 or -1.08e16 < y < 9.99999999999999958e27Initial 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%
Taylor expanded in y around 0 98.9%
cancel-sign-sub-inv98.9%
metadata-eval98.9%
associate-*r/98.9%
metadata-eval98.9%
+-commutative98.9%
Simplified98.9%
Final simplification97.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (/ -0.1111111111111111 x)))
(t_1 (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x))))))
(if (<= y -6.2e+91)
t_1
(if (<= y -1.65e+47)
t_0
(if (<= y -1.15e+16)
t_1
(if (<= y 2.5e+27)
t_0
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x))))))))))
double code(double x, double y) {
double t_0 = 1.0 + (-0.1111111111111111 / x);
double t_1 = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
double tmp;
if (y <= -6.2e+91) {
tmp = t_1;
} else if (y <= -1.65e+47) {
tmp = t_0;
} else if (y <= -1.15e+16) {
tmp = t_1;
} else if (y <= 2.5e+27) {
tmp = t_0;
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 + ((-0.1111111111111111d0) / x)
t_1 = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
if (y <= (-6.2d+91)) then
tmp = t_1
else if (y <= (-1.65d+47)) then
tmp = t_0
else if (y <= (-1.15d+16)) then
tmp = t_1
else if (y <= 2.5d+27) then
tmp = t_0
else
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (-0.1111111111111111 / x);
double t_1 = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
double tmp;
if (y <= -6.2e+91) {
tmp = t_1;
} else if (y <= -1.65e+47) {
tmp = t_0;
} else if (y <= -1.15e+16) {
tmp = t_1;
} else if (y <= 2.5e+27) {
tmp = t_0;
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (-0.1111111111111111 / x) t_1 = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) tmp = 0 if y <= -6.2e+91: tmp = t_1 elif y <= -1.65e+47: tmp = t_0 elif y <= -1.15e+16: tmp = t_1 elif y <= 2.5e+27: tmp = t_0 else: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(-0.1111111111111111 / x)) t_1 = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) tmp = 0.0 if (y <= -6.2e+91) tmp = t_1; elseif (y <= -1.65e+47) tmp = t_0; elseif (y <= -1.15e+16) tmp = t_1; elseif (y <= 2.5e+27) tmp = t_0; else tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (-0.1111111111111111 / x); t_1 = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); tmp = 0.0; if (y <= -6.2e+91) tmp = t_1; elseif (y <= -1.65e+47) tmp = t_0; elseif (y <= -1.15e+16) tmp = t_1; elseif (y <= 2.5e+27) tmp = t_0; else tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+91], t$95$1, If[LessEqual[y, -1.65e+47], t$95$0, If[LessEqual[y, -1.15e+16], t$95$1, If[LessEqual[y, 2.5e+27], t$95$0, N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{-0.1111111111111111}{x}\\
t_1 := 1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{+47}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+27}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -6.19999999999999995e91 or -1.65e47 < y < -1.15e16Initial 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.3%
fma-neg99.3%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 95.6%
expm1-log1p-u6.0%
expm1-udef6.0%
*-commutative6.0%
sqrt-div6.0%
metadata-eval6.0%
div-inv6.0%
Applied egg-rr6.0%
expm1-def6.0%
expm1-log1p95.9%
Simplified95.9%
if -6.19999999999999995e91 < y < -1.65e47 or -1.15e16 < y < 2.4999999999999999e27Initial 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%
Taylor expanded in y around 0 98.9%
cancel-sign-sub-inv98.9%
metadata-eval98.9%
associate-*r/98.9%
metadata-eval98.9%
+-commutative98.9%
Simplified98.9%
if 2.4999999999999999e27 < 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 93.7%
*-commutative93.7%
associate-*r*93.7%
sqrt-div93.7%
metadata-eval93.7%
div-inv93.7%
pow1/293.7%
metadata-eval93.7%
pow-prod-up93.6%
expm1-log1p-u11.1%
associate-/l/11.1%
expm1-udef11.1%
Applied egg-rr11.1%
expm1-def11.1%
expm1-log1p93.8%
Simplified93.8%
Final simplification97.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (/ -0.1111111111111111 x))))
(if (<= y -6.2e+91)
(+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y)))
(if (<= y -2.15e+50)
t_0
(if (<= y -1.1e+16)
(+ 1.0 (* -0.3333333333333333 (/ y (sqrt x))))
(if (<= y 8.6e+27)
t_0
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x))))))))))
double code(double x, double y) {
double t_0 = 1.0 + (-0.1111111111111111 / x);
double tmp;
if (y <= -6.2e+91) {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
} else if (y <= -2.15e+50) {
tmp = t_0;
} else if (y <= -1.1e+16) {
tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
} else if (y <= 8.6e+27) {
tmp = t_0;
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + ((-0.1111111111111111d0) / x)
if (y <= (-6.2d+91)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
else if (y <= (-2.15d+50)) then
tmp = t_0
else if (y <= (-1.1d+16)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
else if (y <= 8.6d+27) then
tmp = t_0
else
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (-0.1111111111111111 / x);
double tmp;
if (y <= -6.2e+91) {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
} else if (y <= -2.15e+50) {
tmp = t_0;
} else if (y <= -1.1e+16) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else if (y <= 8.6e+27) {
tmp = t_0;
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (-0.1111111111111111 / x) tmp = 0 if y <= -6.2e+91: tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) elif y <= -2.15e+50: tmp = t_0 elif y <= -1.1e+16: tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) elif y <= 8.6e+27: tmp = t_0 else: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(-0.1111111111111111 / x)) tmp = 0.0 if (y <= -6.2e+91) tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); elseif (y <= -2.15e+50) tmp = t_0; elseif (y <= -1.1e+16) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); elseif (y <= 8.6e+27) tmp = t_0; else tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (-0.1111111111111111 / x); tmp = 0.0; if (y <= -6.2e+91) tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); elseif (y <= -2.15e+50) tmp = t_0; elseif (y <= -1.1e+16) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); elseif (y <= 8.6e+27) tmp = t_0; else tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+91], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.15e+50], t$95$0, If[LessEqual[y, -1.1e+16], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6e+27], t$95$0, N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{-0.1111111111111111}{x}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+91}:\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{+50}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{+16}:\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{+27}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -6.19999999999999995e91Initial 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.2%
fma-neg99.2%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 99.2%
associate-*r*99.4%
sqrt-div99.3%
metadata-eval99.3%
div-inv99.4%
associate-/r/99.5%
Applied egg-rr99.5%
if -6.19999999999999995e91 < y < -2.1499999999999999e50 or -1.1e16 < y < 8.60000000000000017e27Initial 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%
Taylor expanded in y around 0 98.9%
cancel-sign-sub-inv98.9%
metadata-eval98.9%
associate-*r/98.9%
metadata-eval98.9%
+-commutative98.9%
Simplified98.9%
if -2.1499999999999999e50 < y < -1.1e16Initial 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.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 79.5%
expm1-log1p-u22.2%
expm1-udef22.2%
*-commutative22.2%
sqrt-div22.2%
metadata-eval22.2%
div-inv22.2%
Applied egg-rr22.2%
expm1-def22.2%
expm1-log1p80.0%
Simplified80.0%
if 8.60000000000000017e27 < 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 93.7%
*-commutative93.7%
associate-*r*93.7%
sqrt-div93.7%
metadata-eval93.7%
div-inv93.7%
pow1/293.7%
metadata-eval93.7%
pow-prod-up93.6%
expm1-log1p-u11.1%
associate-/l/11.1%
expm1-udef11.1%
Applied egg-rr11.1%
expm1-def11.1%
expm1-log1p93.8%
Simplified93.8%
Final simplification97.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (/ -0.1111111111111111 x)))
(t_1 (+ 1.0 (/ y (* (sqrt x) -3.0)))))
(if (<= y -6.2e+91)
t_1
(if (<= y -1.4e+50)
t_0
(if (<= y -1.02e+16)
t_1
(if (<= y 3.8e+26) t_0 (- 1.0 (/ y (sqrt (* x 9.0))))))))))
double code(double x, double y) {
double t_0 = 1.0 + (-0.1111111111111111 / x);
double t_1 = 1.0 + (y / (sqrt(x) * -3.0));
double tmp;
if (y <= -6.2e+91) {
tmp = t_1;
} else if (y <= -1.4e+50) {
tmp = t_0;
} else if (y <= -1.02e+16) {
tmp = t_1;
} else if (y <= 3.8e+26) {
tmp = t_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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 + ((-0.1111111111111111d0) / x)
t_1 = 1.0d0 + (y / (sqrt(x) * (-3.0d0)))
if (y <= (-6.2d+91)) then
tmp = t_1
else if (y <= (-1.4d+50)) then
tmp = t_0
else if (y <= (-1.02d+16)) then
tmp = t_1
else if (y <= 3.8d+26) then
tmp = t_0
else
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (-0.1111111111111111 / x);
double t_1 = 1.0 + (y / (Math.sqrt(x) * -3.0));
double tmp;
if (y <= -6.2e+91) {
tmp = t_1;
} else if (y <= -1.4e+50) {
tmp = t_0;
} else if (y <= -1.02e+16) {
tmp = t_1;
} else if (y <= 3.8e+26) {
tmp = t_0;
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (-0.1111111111111111 / x) t_1 = 1.0 + (y / (math.sqrt(x) * -3.0)) tmp = 0 if y <= -6.2e+91: tmp = t_1 elif y <= -1.4e+50: tmp = t_0 elif y <= -1.02e+16: tmp = t_1 elif y <= 3.8e+26: tmp = t_0 else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(-0.1111111111111111 / x)) t_1 = Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0))) tmp = 0.0 if (y <= -6.2e+91) tmp = t_1; elseif (y <= -1.4e+50) tmp = t_0; elseif (y <= -1.02e+16) tmp = t_1; elseif (y <= 3.8e+26) tmp = t_0; else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (-0.1111111111111111 / x); t_1 = 1.0 + (y / (sqrt(x) * -3.0)); tmp = 0.0; if (y <= -6.2e+91) tmp = t_1; elseif (y <= -1.4e+50) tmp = t_0; elseif (y <= -1.02e+16) tmp = t_1; elseif (y <= 3.8e+26) tmp = t_0; else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+91], t$95$1, If[LessEqual[y, -1.4e+50], t$95$0, If[LessEqual[y, -1.02e+16], t$95$1, If[LessEqual[y, 3.8e+26], t$95$0, N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{-0.1111111111111111}{x}\\
t_1 := 1 + \frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{+50}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+26}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if y < -6.19999999999999995e91 or -1.3999999999999999e50 < y < -1.02e16Initial 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.3%
fma-neg99.3%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 95.6%
expm1-log1p-u6.0%
expm1-udef6.0%
*-commutative6.0%
sqrt-div6.0%
metadata-eval6.0%
div-inv6.0%
Applied egg-rr6.0%
expm1-def6.0%
expm1-log1p95.9%
Simplified95.9%
associate-*r/95.8%
associate-*l/95.8%
clear-num95.7%
div-inv95.8%
metadata-eval95.8%
metadata-eval95.8%
distribute-rgt-neg-in95.8%
*-commutative95.8%
associate-*l/96.1%
*-un-lft-identity96.1%
*-commutative96.1%
distribute-rgt-neg-in96.1%
metadata-eval96.1%
Applied egg-rr96.1%
if -6.19999999999999995e91 < y < -1.3999999999999999e50 or -1.02e16 < y < 3.8000000000000002e26Initial 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%
Taylor expanded in y around 0 98.9%
cancel-sign-sub-inv98.9%
metadata-eval98.9%
associate-*r/98.9%
metadata-eval98.9%
+-commutative98.9%
Simplified98.9%
if 3.8000000000000002e26 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around inf 94.1%
Final simplification97.2%
(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 (/ y (sqrt (* x 9.0))))) (if (<= x 0.112) (- (/ -0.1111111111111111 x) t_0) (- 1.0 t_0))))
double code(double x, double y) {
double t_0 = y / sqrt((x * 9.0));
double tmp;
if (x <= 0.112) {
tmp = (-0.1111111111111111 / x) - t_0;
} else {
tmp = 1.0 - t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / sqrt((x * 9.0d0))
if (x <= 0.112d0) then
tmp = ((-0.1111111111111111d0) / x) - t_0
else
tmp = 1.0d0 - t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / Math.sqrt((x * 9.0));
double tmp;
if (x <= 0.112) {
tmp = (-0.1111111111111111 / x) - t_0;
} else {
tmp = 1.0 - t_0;
}
return tmp;
}
def code(x, y): t_0 = y / math.sqrt((x * 9.0)) tmp = 0 if x <= 0.112: tmp = (-0.1111111111111111 / x) - t_0 else: tmp = 1.0 - t_0 return tmp
function code(x, y) t_0 = Float64(y / sqrt(Float64(x * 9.0))) tmp = 0.0 if (x <= 0.112) tmp = Float64(Float64(-0.1111111111111111 / x) - t_0); else tmp = Float64(1.0 - t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = y / sqrt((x * 9.0)); tmp = 0.0; if (x <= 0.112) tmp = (-0.1111111111111111 / x) - t_0; else tmp = 1.0 - t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.112], N[(N[(-0.1111111111111111 / x), $MachinePrecision] - t$95$0), $MachinePrecision], N[(1.0 - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{if}\;x \leq 0.112:\\
\;\;\;\;\frac{-0.1111111111111111}{x} - t_0\\
\mathbf{else}:\\
\;\;\;\;1 - t_0\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial 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.6%
Taylor expanded in x around 0 98.9%
if 0.112000000000000002 < x Initial 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 x around 0 99.8%
Taylor expanded in x around inf 99.2%
Final simplification99.0%
(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%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(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.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Final simplification99.6%
(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%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (<= y 4e+147) (+ 1.0 (/ -0.1111111111111111 x)) (pow (- 1.0 (/ 0.037037037037037035 x)) 3.0)))
double code(double x, double y) {
double tmp;
if (y <= 4e+147) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = pow((1.0 - (0.037037037037037035 / 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 <= 4d+147) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 - (0.037037037037037035d0 / x)) ** 3.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4e+147) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = Math.pow((1.0 - (0.037037037037037035 / x)), 3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4e+147: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = math.pow((1.0 - (0.037037037037037035 / x)), 3.0) return tmp
function code(x, y) tmp = 0.0 if (y <= 4e+147) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 - Float64(0.037037037037037035 / x)) ^ 3.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4e+147) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 - (0.037037037037037035 / x)) ^ 3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4e+147], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[Power[N[(1.0 - N[(0.037037037037037035 / x), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4 \cdot 10^{+147}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;{\left(1 - \frac{0.037037037037037035}{x}\right)}^{3}\\
\end{array}
\end{array}
if y < 3.9999999999999999e147Initial 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.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 71.9%
cancel-sign-sub-inv71.9%
metadata-eval71.9%
associate-*r/71.9%
metadata-eval71.9%
+-commutative71.9%
Simplified71.9%
if 3.9999999999999999e147 < y Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
neg-mul-199.5%
times-frac99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around 0 3.4%
cancel-sign-sub-inv3.4%
metadata-eval3.4%
associate-*r/3.4%
metadata-eval3.4%
+-commutative3.4%
Simplified3.4%
add-cube-cbrt3.4%
pow33.4%
Applied egg-rr3.4%
Taylor expanded in x around inf 24.4%
associate-*r/24.4%
metadata-eval24.4%
Simplified24.4%
Final simplification65.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (/ 0.1111111111111111 x))))
(if (<= y 1.35e+154)
(+ 1.0 (/ -0.1111111111111111 x))
(-
(/ 1.0 t_0)
(/ (* (/ 0.1111111111111111 x) (/ 0.1111111111111111 x)) t_0)))))
double code(double x, double y) {
double t_0 = 1.0 + (0.1111111111111111 / x);
double tmp;
if (y <= 1.35e+154) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 / t_0) - (((0.1111111111111111 / x) * (0.1111111111111111 / x)) / t_0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + (0.1111111111111111d0 / x)
if (y <= 1.35d+154) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 / t_0) - (((0.1111111111111111d0 / x) * (0.1111111111111111d0 / x)) / t_0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (0.1111111111111111 / x);
double tmp;
if (y <= 1.35e+154) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 / t_0) - (((0.1111111111111111 / x) * (0.1111111111111111 / x)) / t_0);
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (0.1111111111111111 / x) tmp = 0 if y <= 1.35e+154: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 / t_0) - (((0.1111111111111111 / x) * (0.1111111111111111 / x)) / t_0) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(0.1111111111111111 / x)) tmp = 0.0 if (y <= 1.35e+154) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 / t_0) - Float64(Float64(Float64(0.1111111111111111 / x) * Float64(0.1111111111111111 / x)) / t_0)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (0.1111111111111111 / x); tmp = 0.0; if (y <= 1.35e+154) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 / t_0) - (((0.1111111111111111 / x) * (0.1111111111111111 / x)) / t_0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.35e+154], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / t$95$0), $MachinePrecision] - N[(N[(N[(0.1111111111111111 / x), $MachinePrecision] * N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{0.1111111111111111}{x}\\
\mathbf{if}\;y \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t_0} - \frac{\frac{0.1111111111111111}{x} \cdot \frac{0.1111111111111111}{x}}{t_0}\\
\end{array}
\end{array}
if y < 1.35000000000000003e154Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 71.0%
cancel-sign-sub-inv71.0%
metadata-eval71.0%
associate-*r/71.0%
metadata-eval71.0%
+-commutative71.0%
Simplified71.0%
if 1.35000000000000003e154 < y Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around 0 3.3%
cancel-sign-sub-inv3.3%
metadata-eval3.3%
associate-*r/3.3%
metadata-eval3.3%
+-commutative3.3%
Simplified3.3%
add-cube-cbrt3.3%
pow33.3%
Applied egg-rr3.3%
rem-cube-cbrt3.3%
+-commutative3.3%
div-inv3.3%
metadata-eval3.3%
cancel-sign-sub-inv3.3%
div-inv3.3%
flip--19.7%
metadata-eval19.7%
frac-times19.7%
metadata-eval19.7%
metadata-eval19.7%
frac-times19.7%
div-sub19.7%
frac-times19.7%
metadata-eval19.7%
pow219.7%
Applied egg-rr19.7%
metadata-eval19.7%
unpow219.7%
frac-times19.7%
Applied egg-rr19.7%
Final simplification64.2%
(FPCore (x y) :precision binary64 (if (<= x 0.112) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.112d0) then
tmp = (-0.1111111111111111d0) / x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.112: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.112) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.112) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.112], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.112:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial 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.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 62.7%
cancel-sign-sub-inv62.7%
metadata-eval62.7%
associate-*r/62.8%
metadata-eval62.8%
+-commutative62.8%
Simplified62.8%
Taylor expanded in x around 0 62.1%
if 0.112000000000000002 < x Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 60.7%
Final simplification61.3%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-0.1111111111111111d0) / x)
end function
public static double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
def code(x, y): return 1.0 + (-0.1111111111111111 / x)
function code(x, y) return Float64(1.0 + Float64(-0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 + (-0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-0.1111111111111111}{x}
\end{array}
Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 62.0%
cancel-sign-sub-inv62.0%
metadata-eval62.0%
associate-*r/62.0%
metadata-eval62.0%
+-commutative62.0%
Simplified62.0%
Final simplification62.0%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 34.2%
Final simplification34.2%
(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 2023308
(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)))))