
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
(t_3 (+ (* y b) (* t (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ y t_3) (/ (* x t) (* z t_3))))
(if (<= t_2 1e+282)
(/ t_1 (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_2 INFINITY)
(* (/ z t) (/ y (+ 1.0 (fma y (/ b t) a))))
(+
(/ z b)
(-
(* (/ t b) (/ x y))
(* t (* z (/ (+ a 1.0) (* y (pow b 2.0))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_3 = (y * b) + (t * (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((y / t_3) + ((x * t) / (z * t_3)));
} else if (t_2 <= 1e+282) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = (z / t) * (y / (1.0 + fma(y, (b / t), a)));
} else {
tmp = (z / b) + (((t / b) * (x / y)) - (t * (z * ((a + 1.0) / (y * pow(b, 2.0))))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_3 = Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(y / t_3) + Float64(Float64(x * t) / Float64(z * t_3)))); elseif (t_2 <= 1e+282) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_2 <= Inf) tmp = Float64(Float64(z / t) * Float64(y / Float64(1.0 + fma(y, Float64(b / t), a)))); else tmp = Float64(Float64(z / b) + Float64(Float64(Float64(t / b) * Float64(x / y)) - Float64(t * Float64(z * Float64(Float64(a + 1.0) / Float64(y * (b ^ 2.0))))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(y / t$95$3), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+282], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(z / t), $MachinePrecision] * N[(y / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(t * N[(z * N[(N[(a + 1.0), $MachinePrecision] / N[(y * N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_3 := y \cdot b + t \cdot \left(a + 1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{y}{t\_3} + \frac{x \cdot t}{z \cdot t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+282}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \left(\frac{t}{b} \cdot \frac{x}{y} - t \cdot \left(z \cdot \frac{a + 1}{y \cdot {b}^{2}}\right)\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 28.1%
associate-/l*44.9%
associate-/l*44.5%
Simplified44.5%
clear-num44.5%
un-div-inv44.5%
Applied egg-rr44.5%
Taylor expanded in t around 0 44.9%
*-commutative44.9%
fma-define44.9%
Simplified44.9%
Taylor expanded in z around inf 93.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000003e282Initial program 90.5%
*-commutative90.5%
associate-/l*91.5%
Applied egg-rr91.5%
if 1.00000000000000003e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 31.9%
associate-/l*63.5%
associate-/l*63.5%
Simplified63.5%
Taylor expanded in x around 0 46.9%
*-commutative46.9%
times-frac94.8%
+-commutative94.8%
associate-*l/94.9%
*-commutative94.9%
fma-define94.9%
Simplified94.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.9%
associate-/l*25.2%
Simplified25.2%
clear-num25.0%
un-div-inv25.1%
Applied egg-rr25.1%
Taylor expanded in y around inf 50.2%
associate--l+50.2%
times-frac53.8%
associate-/l*64.5%
associate-/l*90.0%
*-commutative90.0%
Simplified90.0%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
(t_3 (+ (* y b) (* t (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ y t_3) (/ (* x t) (* z t_3))))
(if (<= t_2 1e+282)
(/ t_1 (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_2 INFINITY)
(* (/ z t) (/ y (+ 1.0 (fma y (/ b t) a))))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_3 = (y * b) + (t * (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((y / t_3) + ((x * t) / (z * t_3)));
} else if (t_2 <= 1e+282) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = (z / t) * (y / (1.0 + fma(y, (b / t), a)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_3 = Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(y / t_3) + Float64(Float64(x * t) / Float64(z * t_3)))); elseif (t_2 <= 1e+282) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_2 <= Inf) tmp = Float64(Float64(z / t) * Float64(y / Float64(1.0 + fma(y, Float64(b / t), a)))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(y / t$95$3), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+282], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(z / t), $MachinePrecision] * N[(y / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_3 := y \cdot b + t \cdot \left(a + 1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{y}{t\_3} + \frac{x \cdot t}{z \cdot t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+282}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 28.1%
associate-/l*44.9%
associate-/l*44.5%
Simplified44.5%
clear-num44.5%
un-div-inv44.5%
Applied egg-rr44.5%
Taylor expanded in t around 0 44.9%
*-commutative44.9%
fma-define44.9%
Simplified44.9%
Taylor expanded in z around inf 93.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000003e282Initial program 90.5%
*-commutative90.5%
associate-/l*91.5%
Applied egg-rr91.5%
if 1.00000000000000003e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 31.9%
associate-/l*63.5%
associate-/l*63.5%
Simplified63.5%
Taylor expanded in x around 0 46.9%
*-commutative46.9%
times-frac94.8%
+-commutative94.8%
associate-*l/94.9%
*-commutative94.9%
fma-define94.9%
Simplified94.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.9%
associate-/l*25.2%
Simplified25.2%
Taylor expanded in y around inf 89.8%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t)))))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+282)))
(/ z b)
(/ t_1 (+ (+ a 1.0) (* b (/ y t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+282)) {
tmp = z / b;
} else {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+282)) {
tmp = z / b;
} else {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / ((a + 1.0) + ((y * b) / t)) tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 1e+282): tmp = z / b else: tmp = t_1 / ((a + 1.0) + (b * (y / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+282)) tmp = Float64(z / b); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 1e+282))) tmp = z / b; else tmp = t_1 / ((a + 1.0) + (b * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+282]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+282}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 1.00000000000000003e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 16.7%
associate-/l*30.7%
associate-/l*41.3%
Simplified41.3%
Taylor expanded in y around inf 74.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000003e282Initial program 90.5%
*-commutative90.5%
associate-/l*91.5%
Applied egg-rr91.5%
Final simplification87.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ y (+ (* y b) (* t (+ a 1.0)))) (/ x (* z a))))
(if (<= t_2 1e+282) (/ t_1 (+ (+ a 1.0) (* b (/ y t)))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((y / ((y * b) + (t * (a + 1.0)))) + (x / (z * a)));
} else if (t_2 <= 1e+282) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((y / ((y * b) + (t * (a + 1.0)))) + (x / (z * a)));
} else if (t_2 <= 1e+282) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_2 <= -math.inf: tmp = z * ((y / ((y * b) + (t * (a + 1.0)))) + (x / (z * a))) elif t_2 <= 1e+282: tmp = t_1 / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(y / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))) + Float64(x / Float64(z * a)))); elseif (t_2 <= 1e+282) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_2 <= -Inf) tmp = z * ((y / ((y * b) + (t * (a + 1.0)))) + (x / (z * a))); elseif (t_2 <= 1e+282) tmp = t_1 / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(y / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+282], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{y}{y \cdot b + t \cdot \left(a + 1\right)} + \frac{x}{z \cdot a}\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+282}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 28.1%
associate-/l*44.9%
associate-/l*44.5%
Simplified44.5%
clear-num44.5%
un-div-inv44.5%
Applied egg-rr44.5%
Taylor expanded in t around 0 44.9%
*-commutative44.9%
fma-define44.9%
Simplified44.9%
Taylor expanded in z around inf 93.8%
Taylor expanded in a around inf 76.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000003e282Initial program 90.5%
*-commutative90.5%
associate-/l*91.5%
Applied egg-rr91.5%
if 1.00000000000000003e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 12.5%
associate-/l*25.4%
associate-/l*40.1%
Simplified40.1%
Taylor expanded in y around inf 74.6%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* y (/ b t)))) (t_2 (+ (* y b) (* t (+ a 1.0)))))
(if (<= t -1.7e+33)
(/ (+ x (* y (/ z t))) t_1)
(if (<= t 4.9e+30)
(* z (+ (/ y t_2) (/ (* x t) (* z t_2))))
(/ (+ x (/ y (/ t z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (y * (b / t));
double t_2 = (y * b) + (t * (a + 1.0));
double tmp;
if (t <= -1.7e+33) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= 4.9e+30) {
tmp = z * ((y / t_2) + ((x * t) / (z * t_2)));
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a + 1.0d0) + (y * (b / t))
t_2 = (y * b) + (t * (a + 1.0d0))
if (t <= (-1.7d+33)) then
tmp = (x + (y * (z / t))) / t_1
else if (t <= 4.9d+30) then
tmp = z * ((y / t_2) + ((x * t) / (z * t_2)))
else
tmp = (x + (y / (t / z))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (y * (b / t));
double t_2 = (y * b) + (t * (a + 1.0));
double tmp;
if (t <= -1.7e+33) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= 4.9e+30) {
tmp = z * ((y / t_2) + ((x * t) / (z * t_2)));
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (y * (b / t)) t_2 = (y * b) + (t * (a + 1.0)) tmp = 0 if t <= -1.7e+33: tmp = (x + (y * (z / t))) / t_1 elif t <= 4.9e+30: tmp = z * ((y / t_2) + ((x * t) / (z * t_2))) else: tmp = (x + (y / (t / z))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))) t_2 = Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))) tmp = 0.0 if (t <= -1.7e+33) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / t_1); elseif (t <= 4.9e+30) tmp = Float64(z * Float64(Float64(y / t_2) + Float64(Float64(x * t) / Float64(z * t_2)))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (y * (b / t)); t_2 = (y * b) + (t * (a + 1.0)); tmp = 0.0; if (t <= -1.7e+33) tmp = (x + (y * (z / t))) / t_1; elseif (t <= 4.9e+30) tmp = z * ((y / t_2) + ((x * t) / (z * t_2))); else tmp = (x + (y / (t / z))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+33], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 4.9e+30], N[(z * N[(N[(y / t$95$2), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + y \cdot \frac{b}{t}\\
t_2 := y \cdot b + t \cdot \left(a + 1\right)\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+33}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t\_1}\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+30}:\\
\;\;\;\;z \cdot \left(\frac{y}{t\_2} + \frac{x \cdot t}{z \cdot t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t\_1}\\
\end{array}
\end{array}
if t < -1.7e33Initial program 79.4%
associate-/l*88.2%
associate-/l*97.0%
Simplified97.0%
if -1.7e33 < t < 4.89999999999999984e30Initial program 65.6%
associate-/l*63.5%
associate-/l*58.5%
Simplified58.5%
clear-num58.5%
un-div-inv59.2%
Applied egg-rr59.2%
Taylor expanded in t around 0 64.1%
*-commutative64.1%
fma-define64.1%
Simplified64.1%
Taylor expanded in z around inf 84.3%
if 4.89999999999999984e30 < t Initial program 81.2%
associate-/l*87.0%
associate-/l*96.2%
Simplified96.2%
clear-num96.1%
un-div-inv96.2%
Applied egg-rr96.2%
Final simplification90.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* z (+ 1.0 (/ (* x t) (* y z)))) b)))
(if (<= y -2.95e+115)
t_1
(if (<= y -1.06e-257)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 1.18e+119) (/ (+ x (* (* y z) (/ 1.0 t))) (+ a 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (1.0 + ((x * t) / (y * z)))) / b;
double tmp;
if (y <= -2.95e+115) {
tmp = t_1;
} else if (y <= -1.06e-257) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1.18e+119) {
tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z * (1.0d0 + ((x * t) / (y * z)))) / b
if (y <= (-2.95d+115)) then
tmp = t_1
else if (y <= (-1.06d-257)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 1.18d+119) then
tmp = (x + ((y * z) * (1.0d0 / t))) / (a + 1.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (1.0 + ((x * t) / (y * z)))) / b;
double tmp;
if (y <= -2.95e+115) {
tmp = t_1;
} else if (y <= -1.06e-257) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1.18e+119) {
tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (1.0 + ((x * t) / (y * z)))) / b tmp = 0 if y <= -2.95e+115: tmp = t_1 elif y <= -1.06e-257: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 1.18e+119: tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(1.0 + Float64(Float64(x * t) / Float64(y * z)))) / b) tmp = 0.0 if (y <= -2.95e+115) tmp = t_1; elseif (y <= -1.06e-257) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 1.18e+119) tmp = Float64(Float64(x + Float64(Float64(y * z) * Float64(1.0 / t))) / Float64(a + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (1.0 + ((x * t) / (y * z)))) / b; tmp = 0.0; if (y <= -2.95e+115) tmp = t_1; elseif (y <= -1.06e-257) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 1.18e+119) tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -2.95e+115], t$95$1, If[LessEqual[y, -1.06e-257], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.18e+119], N[(N[(x + N[(N[(y * z), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(1 + \frac{x \cdot t}{y \cdot z}\right)}{b}\\
\mathbf{if}\;y \leq -2.95 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.06 \cdot 10^{-257}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{+119}:\\
\;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.9499999999999998e115 or 1.1799999999999999e119 < y Initial program 34.0%
associate-/l*43.1%
associate-/l*57.2%
Simplified57.2%
clear-num57.2%
un-div-inv57.2%
Applied egg-rr57.2%
Taylor expanded in t around 0 37.9%
*-commutative37.9%
fma-define38.0%
Simplified38.0%
Taylor expanded in z around inf 61.0%
Taylor expanded in b around inf 72.0%
if -2.9499999999999998e115 < y < -1.06000000000000003e-257Initial program 90.3%
associate-/l*90.3%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in x around inf 73.8%
if -1.06000000000000003e-257 < y < 1.1799999999999999e119Initial program 86.5%
associate-/l*85.5%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in b around 0 74.4%
clear-num74.5%
associate-/r/74.5%
Applied egg-rr74.5%
Final simplification73.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* z (+ 1.0 (/ (* x t) (* y z)))) b)))
(if (<= y -2.05e+102)
t_1
(if (<= y -6.8e-252)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 1.18e+119) (/ (+ x (/ (* y z) t)) (+ a 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (1.0 + ((x * t) / (y * z)))) / b;
double tmp;
if (y <= -2.05e+102) {
tmp = t_1;
} else if (y <= -6.8e-252) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1.18e+119) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z * (1.0d0 + ((x * t) / (y * z)))) / b
if (y <= (-2.05d+102)) then
tmp = t_1
else if (y <= (-6.8d-252)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 1.18d+119) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (1.0 + ((x * t) / (y * z)))) / b;
double tmp;
if (y <= -2.05e+102) {
tmp = t_1;
} else if (y <= -6.8e-252) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1.18e+119) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (1.0 + ((x * t) / (y * z)))) / b tmp = 0 if y <= -2.05e+102: tmp = t_1 elif y <= -6.8e-252: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 1.18e+119: tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(1.0 + Float64(Float64(x * t) / Float64(y * z)))) / b) tmp = 0.0 if (y <= -2.05e+102) tmp = t_1; elseif (y <= -6.8e-252) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 1.18e+119) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (1.0 + ((x * t) / (y * z)))) / b; tmp = 0.0; if (y <= -2.05e+102) tmp = t_1; elseif (y <= -6.8e-252) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 1.18e+119) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -2.05e+102], t$95$1, If[LessEqual[y, -6.8e-252], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.18e+119], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(1 + \frac{x \cdot t}{y \cdot z}\right)}{b}\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{-252}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 1.18 \cdot 10^{+119}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.05e102 or 1.1799999999999999e119 < y Initial program 34.0%
associate-/l*43.1%
associate-/l*57.2%
Simplified57.2%
clear-num57.2%
un-div-inv57.2%
Applied egg-rr57.2%
Taylor expanded in t around 0 37.9%
*-commutative37.9%
fma-define38.0%
Simplified38.0%
Taylor expanded in z around inf 61.0%
Taylor expanded in b around inf 72.0%
if -2.05e102 < y < -6.7999999999999999e-252Initial program 90.3%
associate-/l*90.3%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in x around inf 73.8%
if -6.7999999999999999e-252 < y < 1.1799999999999999e119Initial program 86.5%
associate-/l*85.5%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in b around 0 74.4%
Final simplification73.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.5e-225) (not (<= t 1.2e-106))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (/ (* z (+ 1.0 (/ (* x t) (* y z)))) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.5e-225) || !(t <= 1.2e-106)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z * (1.0 + ((x * t) / (y * z)))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-6.5d-225)) .or. (.not. (t <= 1.2d-106))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z * (1.0d0 + ((x * t) / (y * z)))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.5e-225) || !(t <= 1.2e-106)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z * (1.0 + ((x * t) / (y * z)))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.5e-225) or not (t <= 1.2e-106): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z * (1.0 + ((x * t) / (y * z)))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.5e-225) || !(t <= 1.2e-106)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z * Float64(1.0 + Float64(Float64(x * t) / Float64(y * z)))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6.5e-225) || ~((t <= 1.2e-106))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z * (1.0 + ((x * t) / (y * z)))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.5e-225], N[Not[LessEqual[t, 1.2e-106]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-225} \lor \neg \left(t \leq 1.2 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(1 + \frac{x \cdot t}{y \cdot z}\right)}{b}\\
\end{array}
\end{array}
if t < -6.5000000000000005e-225 or 1.1999999999999999e-106 < t Initial program 77.8%
associate-/l*81.7%
associate-/l*86.4%
Simplified86.4%
if -6.5000000000000005e-225 < t < 1.1999999999999999e-106Initial program 50.1%
associate-/l*46.2%
associate-/l*34.8%
Simplified34.8%
clear-num34.7%
un-div-inv36.7%
Applied egg-rr36.7%
Taylor expanded in t around 0 48.1%
*-commutative48.1%
fma-define48.1%
Simplified48.1%
Taylor expanded in z around inf 86.1%
Taylor expanded in b around inf 70.1%
Final simplification83.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -6.5e-225)
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 4.7e-104)
(/ (* z (+ 1.0 (/ (* x t) (* y z)))) b)
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -6.5e-225) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 4.7e-104) {
tmp = (z * (1.0 + ((x * t) / (y * z)))) / b;
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-6.5d-225)) then
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 4.7d-104) then
tmp = (z * (1.0d0 + ((x * t) / (y * z)))) / b
else
tmp = t_1 / ((a + 1.0d0) + (y * (b / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -6.5e-225) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 4.7e-104) {
tmp = (z * (1.0 + ((x * t) / (y * z)))) / b;
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -6.5e-225: tmp = t_1 / ((a + 1.0) + (y / (t / b))) elif t <= 4.7e-104: tmp = (z * (1.0 + ((x * t) / (y * z)))) / b else: tmp = t_1 / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -6.5e-225) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 4.7e-104) tmp = Float64(Float64(z * Float64(1.0 + Float64(Float64(x * t) / Float64(y * z)))) / b); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -6.5e-225) tmp = t_1 / ((a + 1.0) + (y / (t / b))); elseif (t <= 4.7e-104) tmp = (z * (1.0 + ((x * t) / (y * z)))) / b; else tmp = t_1 / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e-225], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e-104], N[(N[(z * N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{-225}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-104}:\\
\;\;\;\;\frac{z \cdot \left(1 + \frac{x \cdot t}{y \cdot z}\right)}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -6.5000000000000005e-225Initial program 76.5%
associate-/l*80.4%
associate-/l*84.3%
Simplified84.3%
Taylor expanded in y around 0 80.4%
associate-*r/82.7%
*-commutative82.7%
associate-/r/84.4%
Simplified84.4%
if -6.5000000000000005e-225 < t < 4.7e-104Initial program 50.1%
associate-/l*46.2%
associate-/l*34.8%
Simplified34.8%
clear-num34.7%
un-div-inv36.7%
Applied egg-rr36.7%
Taylor expanded in t around 0 48.1%
*-commutative48.1%
fma-define48.1%
Simplified48.1%
Taylor expanded in z around inf 86.1%
Taylor expanded in b around inf 70.1%
if 4.7e-104 < t Initial program 79.9%
associate-/l*83.6%
associate-/l*89.5%
Simplified89.5%
Final simplification83.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.5e+103)
(/ z b)
(if (<= y -2.6e-251)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 5.2e+124)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(/ (* x (+ (/ t y) (/ z x))) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.5e+103) {
tmp = z / b;
} else if (y <= -2.6e-251) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 5.2e+124) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (x * ((t / y) + (z / x))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.5d+103)) then
tmp = z / b
else if (y <= (-2.6d-251)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 5.2d+124) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else
tmp = (x * ((t / y) + (z / x))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.5e+103) {
tmp = z / b;
} else if (y <= -2.6e-251) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 5.2e+124) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (x * ((t / y) + (z / x))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.5e+103: tmp = z / b elif y <= -2.6e-251: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 5.2e+124: tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = (x * ((t / y) + (z / x))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.5e+103) tmp = Float64(z / b); elseif (y <= -2.6e-251) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 5.2e+124) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.5e+103) tmp = z / b; elseif (y <= -2.6e-251) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 5.2e+124) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = (x * ((t / y) + (z / x))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.5e+103], N[(z / b), $MachinePrecision], If[LessEqual[y, -2.6e-251], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+124], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+103}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-251}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+124}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\end{array}
\end{array}
if y < -2.5e103Initial program 29.8%
associate-/l*36.7%
associate-/l*63.3%
Simplified63.3%
Taylor expanded in y around inf 68.9%
if -2.5e103 < y < -2.5999999999999999e-251Initial program 90.3%
associate-/l*90.3%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in x around inf 73.8%
if -2.5999999999999999e-251 < y < 5.2000000000000001e124Initial program 86.5%
associate-/l*85.5%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in b around 0 74.4%
if 5.2000000000000001e124 < y Initial program 36.7%
associate-/l*47.2%
associate-/l*53.4%
Simplified53.4%
Taylor expanded in x around inf 34.3%
Taylor expanded in b around inf 64.9%
Final simplification71.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.6e+120)
(/ z b)
(if (<= y -1.48e-251)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 7e+118)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(/ (* x (+ (/ t y) (/ z x))) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.6e+120) {
tmp = z / b;
} else if (y <= -1.48e-251) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 7e+118) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (x * ((t / y) + (z / x))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-5.6d+120)) then
tmp = z / b
else if (y <= (-1.48d-251)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 7d+118) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = (x * ((t / y) + (z / x))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.6e+120) {
tmp = z / b;
} else if (y <= -1.48e-251) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 7e+118) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (x * ((t / y) + (z / x))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.6e+120: tmp = z / b elif y <= -1.48e-251: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 7e+118: tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = (x * ((t / y) + (z / x))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.6e+120) tmp = Float64(z / b); elseif (y <= -1.48e-251) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 7e+118) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.6e+120) tmp = z / b; elseif (y <= -1.48e-251) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 7e+118) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = (x * ((t / y) + (z / x))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.6e+120], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.48e-251], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+118], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+120}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.48 \cdot 10^{-251}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+118}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\end{array}
\end{array}
if y < -5.6000000000000001e120Initial program 29.8%
associate-/l*36.7%
associate-/l*63.3%
Simplified63.3%
Taylor expanded in y around inf 68.9%
if -5.6000000000000001e120 < y < -1.48e-251Initial program 90.3%
associate-/l*90.3%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in x around inf 73.8%
if -1.48e-251 < y < 7.00000000000000033e118Initial program 86.5%
associate-/l*85.5%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in b around 0 74.4%
*-commutative74.4%
associate-/l*72.6%
Applied egg-rr72.6%
if 7.00000000000000033e118 < y Initial program 36.7%
associate-/l*47.2%
associate-/l*53.4%
Simplified53.4%
Taylor expanded in x around inf 34.3%
Taylor expanded in b around inf 64.9%
Final simplification71.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (or (<= a -4400000000000.0) (not (<= a 1.05)))
(/ t_1 (+ a (* y (/ b t))))
(/ t_1 (+ 1.0 (/ y (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if ((a <= -4400000000000.0) || !(a <= 1.05)) {
tmp = t_1 / (a + (y * (b / t)));
} else {
tmp = t_1 / (1.0 + (y / (t / b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if ((a <= (-4400000000000.0d0)) .or. (.not. (a <= 1.05d0))) then
tmp = t_1 / (a + (y * (b / t)))
else
tmp = t_1 / (1.0d0 + (y / (t / b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if ((a <= -4400000000000.0) || !(a <= 1.05)) {
tmp = t_1 / (a + (y * (b / t)));
} else {
tmp = t_1 / (1.0 + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if (a <= -4400000000000.0) or not (a <= 1.05): tmp = t_1 / (a + (y * (b / t))) else: tmp = t_1 / (1.0 + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if ((a <= -4400000000000.0) || !(a <= 1.05)) tmp = Float64(t_1 / Float64(a + Float64(y * Float64(b / t)))); else tmp = Float64(t_1 / Float64(1.0 + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if ((a <= -4400000000000.0) || ~((a <= 1.05))) tmp = t_1 / (a + (y * (b / t))); else tmp = t_1 / (1.0 + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -4400000000000.0], N[Not[LessEqual[a, 1.05]], $MachinePrecision]], N[(t$95$1 / N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;a \leq -4400000000000 \lor \neg \left(a \leq 1.05\right):\\
\;\;\;\;\frac{t\_1}{a + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{1 + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if a < -4.4e12 or 1.05000000000000004 < a Initial program 65.8%
associate-/l*65.9%
associate-/l*68.9%
Simplified68.9%
Taylor expanded in a around inf 67.5%
if -4.4e12 < a < 1.05000000000000004Initial program 78.5%
associate-/l*83.0%
associate-/l*83.0%
Simplified83.0%
Taylor expanded in y around 0 83.0%
associate-*r/82.9%
*-commutative82.9%
associate-/r/83.5%
Simplified83.5%
Taylor expanded in a around 0 82.9%
Final simplification75.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -5200000000000.0) (not (<= a 4.6e-16))) (/ (+ x (* z (/ y t))) (+ a 1.0)) (/ (+ x (* y (/ z t))) (+ 1.0 (/ y (/ t b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5200000000000.0) || !(a <= 4.6e-16)) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (x + (y * (z / t))) / (1.0 + (y / (t / b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-5200000000000.0d0)) .or. (.not. (a <= 4.6d-16))) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = (x + (y * (z / t))) / (1.0d0 + (y / (t / b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -5200000000000.0) || !(a <= 4.6e-16)) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (x + (y * (z / t))) / (1.0 + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -5200000000000.0) or not (a <= 4.6e-16): tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = (x + (y * (z / t))) / (1.0 + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -5200000000000.0) || !(a <= 4.6e-16)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(1.0 + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -5200000000000.0) || ~((a <= 4.6e-16))) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = (x + (y * (z / t))) / (1.0 + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -5200000000000.0], N[Not[LessEqual[a, 4.6e-16]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5200000000000 \lor \neg \left(a \leq 4.6 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{1 + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if a < -5.2e12 or 4.5999999999999998e-16 < a Initial program 66.6%
associate-/l*66.7%
associate-/l*69.6%
Simplified69.6%
Taylor expanded in b around 0 62.0%
*-commutative62.0%
associate-/l*65.1%
Applied egg-rr65.1%
if -5.2e12 < a < 4.5999999999999998e-16Initial program 78.0%
associate-/l*82.6%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in y around 0 82.6%
associate-*r/82.5%
*-commutative82.5%
associate-/r/83.2%
Simplified83.2%
Taylor expanded in a around 0 83.0%
Final simplification74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) a)))
(if (<= a -0.19)
t_1
(if (<= a -9.5e-261)
(+ x (* y (/ z t)))
(if (<= a 65.0) (/ x (+ 1.0 (/ (* y b) t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -0.19) {
tmp = t_1;
} else if (a <= -9.5e-261) {
tmp = x + (y * (z / t));
} else if (a <= 65.0) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / a
if (a <= (-0.19d0)) then
tmp = t_1
else if (a <= (-9.5d-261)) then
tmp = x + (y * (z / t))
else if (a <= 65.0d0) then
tmp = x / (1.0d0 + ((y * b) / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -0.19) {
tmp = t_1;
} else if (a <= -9.5e-261) {
tmp = x + (y * (z / t));
} else if (a <= 65.0) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / a tmp = 0 if a <= -0.19: tmp = t_1 elif a <= -9.5e-261: tmp = x + (y * (z / t)) elif a <= 65.0: tmp = x / (1.0 + ((y * b) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / a) tmp = 0.0 if (a <= -0.19) tmp = t_1; elseif (a <= -9.5e-261) tmp = Float64(x + Float64(y * Float64(z / t))); elseif (a <= 65.0) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / a; tmp = 0.0; if (a <= -0.19) tmp = t_1; elseif (a <= -9.5e-261) tmp = x + (y * (z / t)); elseif (a <= 65.0) tmp = x / (1.0 + ((y * b) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -0.19], t$95$1, If[LessEqual[a, -9.5e-261], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 65.0], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{if}\;a \leq -0.19:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-261}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 65:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -0.19 or 65 < a Initial program 66.4%
associate-/l*66.4%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in a around inf 59.6%
if -0.19 < a < -9.5000000000000008e-261Initial program 75.1%
associate-/l*80.4%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in b around 0 52.2%
associate-*r/55.8%
*-commutative55.8%
Applied egg-rr55.8%
Taylor expanded in a around 0 55.5%
if -9.5000000000000008e-261 < a < 65Initial program 80.4%
associate-/l*84.3%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in x around inf 62.0%
associate-*l/60.9%
*-commutative60.9%
Simplified60.9%
Taylor expanded in a around 0 61.2%
Final simplification59.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.9e-81) (not (<= t 1.6e+33))) (/ (+ x (* y (/ z t))) (+ a 1.0)) (/ (* x (+ (/ t y) (/ z x))) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.9e-81) || !(t <= 1.6e+33)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (x * ((t / y) + (z / x))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.9d-81)) .or. (.not. (t <= 1.6d+33))) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else
tmp = (x * ((t / y) + (z / x))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.9e-81) || !(t <= 1.6e+33)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (x * ((t / y) + (z / x))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.9e-81) or not (t <= 1.6e+33): tmp = (x + (y * (z / t))) / (a + 1.0) else: tmp = (x * ((t / y) + (z / x))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.9e-81) || !(t <= 1.6e+33)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.9e-81) || ~((t <= 1.6e+33))) tmp = (x + (y * (z / t))) / (a + 1.0); else tmp = (x * ((t / y) + (z / x))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.9e-81], N[Not[LessEqual[t, 1.6e+33]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-81} \lor \neg \left(t \leq 1.6 \cdot 10^{+33}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\end{array}
\end{array}
if t < -1.8999999999999999e-81 or 1.60000000000000009e33 < t Initial program 80.9%
associate-/l*86.4%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in b around 0 73.4%
associate-*r/78.3%
*-commutative78.3%
Applied egg-rr78.3%
if -1.8999999999999999e-81 < t < 1.60000000000000009e33Initial program 61.7%
associate-/l*59.9%
associate-/l*54.8%
Simplified54.8%
Taylor expanded in x around inf 58.3%
Taylor expanded in b around inf 60.3%
Final simplification70.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.2e+104) (not (<= y 1.02e+125))) (/ z b) (/ x (+ 1.0 (+ a (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.2e+104) || !(y <= 1.02e+125)) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.2d+104)) .or. (.not. (y <= 1.02d+125))) then
tmp = z / b
else
tmp = x / (1.0d0 + (a + ((y * b) / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.2e+104) || !(y <= 1.02e+125)) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.2e+104) or not (y <= 1.02e+125): tmp = z / b else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.2e+104) || !(y <= 1.02e+125)) tmp = Float64(z / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.2e+104) || ~((y <= 1.02e+125))) tmp = z / b; else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.2e+104], N[Not[LessEqual[y, 1.02e+125]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+104} \lor \neg \left(y \leq 1.02 \cdot 10^{+125}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -1.2e104 or 1.02e125 < y Initial program 34.0%
associate-/l*43.1%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around inf 65.6%
if -1.2e104 < y < 1.02e125Initial program 88.2%
associate-/l*87.7%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in x around inf 66.5%
Final simplification66.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1e+112) (not (<= y 1.7e+121))) (/ z b) (/ x (+ 1.0 (+ a (* y (/ b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1e+112) || !(y <= 1.7e+121)) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + (y * (b / t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1d+112)) .or. (.not. (y <= 1.7d+121))) then
tmp = z / b
else
tmp = x / (1.0d0 + (a + (y * (b / t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1e+112) || !(y <= 1.7e+121)) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + (y * (b / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1e+112) or not (y <= 1.7e+121): tmp = z / b else: tmp = x / (1.0 + (a + (y * (b / t)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1e+112) || !(y <= 1.7e+121)) tmp = Float64(z / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1e+112) || ~((y <= 1.7e+121))) tmp = z / b; else tmp = x / (1.0 + (a + (y * (b / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1e+112], N[Not[LessEqual[y, 1.7e+121]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+112} \lor \neg \left(y \leq 1.7 \cdot 10^{+121}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\end{array}
\end{array}
if y < -9.9999999999999993e111 or 1.70000000000000005e121 < y Initial program 34.0%
associate-/l*43.1%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around inf 65.6%
if -9.9999999999999993e111 < y < 1.70000000000000005e121Initial program 88.2%
associate-/l*87.7%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in x around inf 66.5%
associate-*l/63.3%
*-commutative63.3%
Simplified63.3%
Final simplification64.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.25e+114)
(/ z b)
(if (<= y 2.4e+118)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(/ (* x (+ (/ t y) (/ z x))) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.25e+114) {
tmp = z / b;
} else if (y <= 2.4e+118) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (x * ((t / y) + (z / x))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.25d+114)) then
tmp = z / b
else if (y <= 2.4d+118) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = (x * ((t / y) + (z / x))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.25e+114) {
tmp = z / b;
} else if (y <= 2.4e+118) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (x * ((t / y) + (z / x))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.25e+114: tmp = z / b elif y <= 2.4e+118: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = (x * ((t / y) + (z / x))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.25e+114) tmp = Float64(z / b); elseif (y <= 2.4e+118) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.25e+114) tmp = z / b; elseif (y <= 2.4e+118) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = (x * ((t / y) + (z / x))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.25e+114], N[(z / b), $MachinePrecision], If[LessEqual[y, 2.4e+118], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+114}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+118}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\end{array}
\end{array}
if y < -2.25e114Initial program 29.8%
associate-/l*36.7%
associate-/l*63.3%
Simplified63.3%
Taylor expanded in y around inf 68.9%
if -2.25e114 < y < 2.4e118Initial program 88.2%
associate-/l*87.7%
associate-/l*83.9%
Simplified83.9%
Taylor expanded in x around inf 66.5%
if 2.4e118 < y Initial program 36.7%
associate-/l*47.2%
associate-/l*53.4%
Simplified53.4%
Taylor expanded in x around inf 34.3%
Taylor expanded in b around inf 64.9%
Final simplification66.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.2e+100)
(/ z b)
(if (<= y -1.7e-74)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= y 8.4e+117) (/ x (+ a 1.0)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.2e+100) {
tmp = z / b;
} else if (y <= -1.7e-74) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= 8.4e+117) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.2d+100)) then
tmp = z / b
else if (y <= (-1.7d-74)) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (y <= 8.4d+117) then
tmp = x / (a + 1.0d0)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.2e+100) {
tmp = z / b;
} else if (y <= -1.7e-74) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= 8.4e+117) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.2e+100: tmp = z / b elif y <= -1.7e-74: tmp = x / (1.0 + ((y * b) / t)) elif y <= 8.4e+117: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.2e+100) tmp = Float64(z / b); elseif (y <= -1.7e-74) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (y <= 8.4e+117) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.2e+100) tmp = z / b; elseif (y <= -1.7e-74) tmp = x / (1.0 + ((y * b) / t)); elseif (y <= 8.4e+117) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.2e+100], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.7e-74], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.4e+117], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+100}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-74}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;y \leq 8.4 \cdot 10^{+117}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -4.1999999999999997e100 or 8.4000000000000005e117 < y Initial program 34.0%
associate-/l*43.1%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around inf 65.6%
if -4.1999999999999997e100 < y < -1.7e-74Initial program 83.3%
associate-/l*83.5%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in x around inf 60.1%
associate-*l/60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in a around 0 48.3%
if -1.7e-74 < y < 8.4000000000000005e117Initial program 89.6%
associate-/l*88.9%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in y around 0 57.9%
Final simplification58.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.2e-51) (/ z b) (if (<= y -3.8e-291) x (if (<= y 1.4e-106) (/ x a) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.2e-51) {
tmp = z / b;
} else if (y <= -3.8e-291) {
tmp = x;
} else if (y <= 1.4e-106) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.2d-51)) then
tmp = z / b
else if (y <= (-3.8d-291)) then
tmp = x
else if (y <= 1.4d-106) then
tmp = x / a
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.2e-51) {
tmp = z / b;
} else if (y <= -3.8e-291) {
tmp = x;
} else if (y <= 1.4e-106) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.2e-51: tmp = z / b elif y <= -3.8e-291: tmp = x elif y <= 1.4e-106: tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.2e-51) tmp = Float64(z / b); elseif (y <= -3.8e-291) tmp = x; elseif (y <= 1.4e-106) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.2e-51) tmp = z / b; elseif (y <= -3.8e-291) tmp = x; elseif (y <= 1.4e-106) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.2e-51], N[(z / b), $MachinePrecision], If[LessEqual[y, -3.8e-291], x, If[LessEqual[y, 1.4e-106], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-291}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-106}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.2e-51 or 1.39999999999999994e-106 < y Initial program 55.7%
associate-/l*60.1%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in y around inf 46.9%
if -1.2e-51 < y < -3.7999999999999998e-291Initial program 98.2%
associate-/l*98.1%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in y around 0 98.1%
associate-*r/98.1%
*-commutative98.1%
associate-/r/89.9%
Simplified89.9%
Taylor expanded in a around 0 56.5%
Taylor expanded in y around 0 40.2%
if -3.7999999999999998e-291 < y < 1.39999999999999994e-106Initial program 97.5%
associate-/l*95.3%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in a around inf 58.7%
Taylor expanded in x around inf 44.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.4e-52) (not (<= y 8.8e+123))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.4e-52) || !(y <= 8.8e+123)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.4d-52)) .or. (.not. (y <= 8.8d+123))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.4e-52) || !(y <= 8.8e+123)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.4e-52) or not (y <= 8.8e+123): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.4e-52) || !(y <= 8.8e+123)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.4e-52) || ~((y <= 8.8e+123))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.4e-52], N[Not[LessEqual[y, 8.8e+123]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{-52} \lor \neg \left(y \leq 8.8 \cdot 10^{+123}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -4.40000000000000018e-52 or 8.79999999999999969e123 < y Initial program 47.4%
associate-/l*53.8%
associate-/l*63.7%
Simplified63.7%
Taylor expanded in y around inf 56.5%
if -4.40000000000000018e-52 < y < 8.79999999999999969e123Initial program 90.2%
associate-/l*89.5%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in y around 0 57.3%
Final simplification56.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.0) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.0d0)) .or. (.not. (a <= 1.0d0))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.0) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.0) || !(a <= 1.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.0) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1 or 1 < a Initial program 66.4%
associate-/l*66.4%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in a around inf 59.6%
Taylor expanded in x around inf 42.1%
if -1 < a < 1Initial program 78.2%
associate-/l*82.7%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in y around 0 82.7%
associate-*r/83.4%
*-commutative83.4%
associate-/r/83.3%
Simplified83.3%
Taylor expanded in a around 0 82.6%
Taylor expanded in y around 0 37.6%
Final simplification39.8%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 72.3%
associate-/l*74.6%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in y around 0 74.6%
associate-*r/76.4%
*-commutative76.4%
associate-/r/76.4%
Simplified76.4%
Taylor expanded in a around 0 48.5%
Taylor expanded in y around 0 21.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024123
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))