
(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 18 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 (+ (/ (* y b) t) (+ a 1.0)))
(t_2 (/ (+ x (/ (* y z) t)) t_1))
(t_3 (/ y (* t (/ (fma y (/ b t) (+ a 1.0)) z)))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -4e-253)
(+ (/ (* y z) (* t t_1)) (/ x t_1))
(if (<= t_2 5e-279)
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t_2 2e+296)
t_2
(if (<= t_2 INFINITY)
t_3
(+
(/ z b)
(*
t
(+ (/ (/ x y) b) (/ (- -1.0 a) (/ (* y (* b b)) z))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double t_3 = y / (t * (fma(y, (b / t), (a + 1.0)) / z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -4e-253) {
tmp = ((y * z) / (t * t_1)) + (x / t_1);
} else if (t_2 <= 5e-279) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= 2e+296) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = (z / b) + (t * (((x / y) / b) + ((-1.0 - a) / ((y * (b * b)) / z))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) t_3 = Float64(y / Float64(t * Float64(fma(y, Float64(b / t), Float64(a + 1.0)) / z))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -4e-253) tmp = Float64(Float64(Float64(y * z) / Float64(t * t_1)) + Float64(x / t_1)); elseif (t_2 <= 5e-279) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t_2 <= 2e+296) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(Float64(x / y) / b) + Float64(Float64(-1.0 - a) / Float64(Float64(y * Float64(b * b)) / z))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y / N[(t * N[(N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -4e-253], N[(N[(N[(y * z), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e-279], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+296], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$3, N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(N[(x / y), $MachinePrecision] / b), $MachinePrecision] + N[(N[(-1.0 - a), $MachinePrecision] / N[(N[(y * N[(b * b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1}\\
t_3 := \frac{y}{t \cdot \frac{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}{z}}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-253}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot t_1} + \frac{x}{t_1}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-279}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+296}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \left(\frac{\frac{x}{y}}{b} + \frac{-1 - a}{\frac{y \cdot \left(b \cdot b\right)}{z}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 1.99999999999999996e296 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 31.0%
*-commutative31.0%
associate-*l/51.4%
*-commutative51.4%
associate-*l/51.3%
Simplified51.3%
Taylor expanded in x around 0 55.0%
times-frac75.6%
associate-+r+75.6%
associate-*r/72.0%
+-commutative72.0%
fma-udef72.0%
Simplified72.0%
*-commutative72.0%
clear-num72.1%
frac-times89.2%
*-un-lft-identity89.2%
fma-udef89.2%
*-commutative89.2%
associate-*l/92.8%
*-commutative92.8%
associate-+r+92.8%
*-commutative92.8%
associate-*l/89.2%
*-commutative89.2%
fma-def89.2%
Applied egg-rr89.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.0000000000000003e-253Initial program 99.6%
*-commutative99.6%
associate-/l*98.4%
associate-*l/98.4%
*-commutative98.4%
cancel-sign-sub98.4%
*-commutative98.4%
associate-*l/98.4%
associate-+r-98.4%
associate-*l/98.4%
*-commutative98.4%
cancel-sign-sub98.4%
*-commutative98.4%
associate-/r/93.5%
Simplified93.5%
Taylor expanded in x around 0 99.7%
if -4.0000000000000003e-253 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.99999999999999969e-279Initial program 63.3%
*-commutative63.3%
associate-*l/65.2%
*-commutative65.2%
associate-*l/82.6%
Simplified82.6%
Taylor expanded in z around 0 80.7%
associate-/l*82.6%
Simplified82.6%
if 4.99999999999999969e-279 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.99999999999999996e296Initial program 99.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
*-commutative0.0%
associate-*l/0.6%
*-commutative0.6%
associate-*l/14.8%
Simplified14.8%
Taylor expanded in t around 0 59.7%
*-commutative59.7%
associate-/r*63.1%
associate-/l*89.5%
unpow289.5%
Simplified89.5%
Final simplification94.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0))) (t_2 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_2 (- INFINITY))
(* (/ y t) (/ z t_1))
(if (<= t_2 -4e-253)
t_2
(if (<= t_2 5e-279)
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t_2 INFINITY)
t_2
(+
(/ z b)
(* t (+ (/ (/ x y) b) (/ (- -1.0 a) (/ (* y (* b b)) z)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y / t) * (z / t_1);
} else if (t_2 <= -4e-253) {
tmp = t_2;
} else if (t_2 <= 5e-279) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (z / b) + (t * (((x / y) / b) + ((-1.0 - a) / ((y * (b * b)) / z))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / t_1);
} else if (t_2 <= -4e-253) {
tmp = t_2;
} else if (t_2 <= 5e-279) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = (z / b) + (t * (((x / y) / b) + ((-1.0 - a) / ((y * (b * b)) / z))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = (x + ((y * z) / t)) / t_1 tmp = 0 if t_2 <= -math.inf: tmp = (y / t) * (z / t_1) elif t_2 <= -4e-253: tmp = t_2 elif t_2 <= 5e-279: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) elif t_2 <= math.inf: tmp = t_2 else: tmp = (z / b) + (t * (((x / y) / b) + ((-1.0 - a) / ((y * (b * b)) / z)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / t_1)); elseif (t_2 <= -4e-253) tmp = t_2; elseif (t_2 <= 5e-279) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t_2 <= Inf) tmp = t_2; else tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(Float64(x / y) / b) + Float64(Float64(-1.0 - a) / Float64(Float64(y * Float64(b * b)) / z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = (x + ((y * z) / t)) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = (y / t) * (z / t_1); elseif (t_2 <= -4e-253) tmp = t_2; elseif (t_2 <= 5e-279) tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); elseif (t_2 <= Inf) tmp = t_2; else tmp = (z / b) + (t * (((x / y) / b) + ((-1.0 - a) / ((y * (b * b)) / z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e-253], t$95$2, If[LessEqual[t$95$2, 5e-279], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(N[(x / y), $MachinePrecision] / b), $MachinePrecision] + N[(N[(-1.0 - a), $MachinePrecision] / N[(N[(y * N[(b * b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t_1}\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-253}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-279}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \left(\frac{\frac{x}{y}}{b} + \frac{-1 - a}{\frac{y \cdot \left(b \cdot b\right)}{z}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 24.1%
*-commutative24.1%
associate-*l/47.4%
*-commutative47.4%
associate-*l/47.2%
Simplified47.2%
Taylor expanded in x around 0 58.9%
times-frac76.6%
associate-+r+76.6%
associate-*r/70.6%
+-commutative70.6%
fma-udef70.6%
Simplified70.6%
Taylor expanded in z around inf 76.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.0000000000000003e-253 or 4.99999999999999969e-279 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 95.8%
if -4.0000000000000003e-253 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.99999999999999969e-279Initial program 63.3%
*-commutative63.3%
associate-*l/65.2%
*-commutative65.2%
associate-*l/82.6%
Simplified82.6%
Taylor expanded in z around 0 80.7%
associate-/l*82.6%
Simplified82.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
*-commutative0.0%
associate-*l/0.6%
*-commutative0.6%
associate-*l/14.8%
Simplified14.8%
Taylor expanded in t around 0 59.7%
*-commutative59.7%
associate-/r*63.1%
associate-/l*89.5%
unpow289.5%
Simplified89.5%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0))) (t_2 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_2 (- INFINITY))
(* (/ y t) (/ z t_1))
(if (<= t_2 -4e-253)
t_2
(if (<= t_2 5e-279)
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t_2 INFINITY) t_2 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y / t) * (z / t_1);
} else if (t_2 <= -4e-253) {
tmp = t_2;
} else if (t_2 <= 5e-279) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} 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 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / t_1);
} else if (t_2 <= -4e-253) {
tmp = t_2;
} else if (t_2 <= 5e-279) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = (x + ((y * z) / t)) / t_1 tmp = 0 if t_2 <= -math.inf: tmp = (y / t) * (z / t_1) elif t_2 <= -4e-253: tmp = t_2 elif t_2 <= 5e-279: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) elif t_2 <= math.inf: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / t_1)); elseif (t_2 <= -4e-253) tmp = t_2; elseif (t_2 <= 5e-279) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t_2 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = (x + ((y * z) / t)) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = (y / t) * (z / t_1); elseif (t_2 <= -4e-253) tmp = t_2; elseif (t_2 <= 5e-279) tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); elseif (t_2 <= Inf) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e-253], t$95$2, If[LessEqual[t$95$2, 5e-279], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$2, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t_1}\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-253}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-279}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 24.1%
*-commutative24.1%
associate-*l/47.4%
*-commutative47.4%
associate-*l/47.2%
Simplified47.2%
Taylor expanded in x around 0 58.9%
times-frac76.6%
associate-+r+76.6%
associate-*r/70.6%
+-commutative70.6%
fma-udef70.6%
Simplified70.6%
Taylor expanded in z around inf 76.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.0000000000000003e-253 or 4.99999999999999969e-279 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 95.8%
if -4.0000000000000003e-253 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.99999999999999969e-279Initial program 63.3%
*-commutative63.3%
associate-*l/65.2%
*-commutative65.2%
associate-*l/82.6%
Simplified82.6%
Taylor expanded in z around 0 80.7%
associate-/l*82.6%
Simplified82.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
*-commutative0.0%
associate-*l/0.6%
*-commutative0.6%
associate-*l/14.8%
Simplified14.8%
Taylor expanded in t around 0 89.5%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0))) (t_2 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_2 -4e-253)
(+ (/ (* y z) (* t t_1)) (/ x t_1))
(if (<= t_2 5e-279)
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t_2 INFINITY)
t_2
(+
(/ z b)
(* t (+ (/ (/ x y) b) (/ (- -1.0 a) (/ (* y (* b b)) z))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -4e-253) {
tmp = ((y * z) / (t * t_1)) + (x / t_1);
} else if (t_2 <= 5e-279) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (z / b) + (t * (((x / y) / b) + ((-1.0 - a) / ((y * (b * b)) / z))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -4e-253) {
tmp = ((y * z) / (t * t_1)) + (x / t_1);
} else if (t_2 <= 5e-279) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = (z / b) + (t * (((x / y) / b) + ((-1.0 - a) / ((y * (b * b)) / z))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = (x + ((y * z) / t)) / t_1 tmp = 0 if t_2 <= -4e-253: tmp = ((y * z) / (t * t_1)) + (x / t_1) elif t_2 <= 5e-279: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) elif t_2 <= math.inf: tmp = t_2 else: tmp = (z / b) + (t * (((x / y) / b) + ((-1.0 - a) / ((y * (b * b)) / z)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= -4e-253) tmp = Float64(Float64(Float64(y * z) / Float64(t * t_1)) + Float64(x / t_1)); elseif (t_2 <= 5e-279) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t_2 <= Inf) tmp = t_2; else tmp = Float64(Float64(z / b) + Float64(t * Float64(Float64(Float64(x / y) / b) + Float64(Float64(-1.0 - a) / Float64(Float64(y * Float64(b * b)) / z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = (x + ((y * z) / t)) / t_1; tmp = 0.0; if (t_2 <= -4e-253) tmp = ((y * z) / (t * t_1)) + (x / t_1); elseif (t_2 <= 5e-279) tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); elseif (t_2 <= Inf) tmp = t_2; else tmp = (z / b) + (t * (((x / y) / b) + ((-1.0 - a) / ((y * (b * b)) / z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -4e-253], N[(N[(N[(y * z), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e-279], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(N[(x / y), $MachinePrecision] / b), $MachinePrecision] + N[(N[(-1.0 - a), $MachinePrecision] / N[(N[(y * N[(b * b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1}\\
\mathbf{if}\;t_2 \leq -4 \cdot 10^{-253}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot t_1} + \frac{x}{t_1}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-279}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \left(\frac{\frac{x}{y}}{b} + \frac{-1 - a}{\frac{y \cdot \left(b \cdot b\right)}{z}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.0000000000000003e-253Initial program 86.6%
*-commutative86.6%
associate-/l*89.6%
associate-*l/86.2%
*-commutative86.2%
cancel-sign-sub86.2%
*-commutative86.2%
associate-*l/89.6%
associate-+r-89.6%
associate-*l/86.2%
*-commutative86.2%
cancel-sign-sub86.2%
*-commutative86.2%
associate-/r/85.5%
Simplified85.5%
Taylor expanded in x around 0 92.7%
if -4.0000000000000003e-253 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.99999999999999969e-279Initial program 63.3%
*-commutative63.3%
associate-*l/65.2%
*-commutative65.2%
associate-*l/82.6%
Simplified82.6%
Taylor expanded in z around 0 80.7%
associate-/l*82.6%
Simplified82.6%
if 4.99999999999999969e-279 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 92.4%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
*-commutative0.0%
associate-*l/0.6%
*-commutative0.6%
associate-*l/14.8%
Simplified14.8%
Taylor expanded in t around 0 59.7%
*-commutative59.7%
associate-/r*63.1%
associate-/l*89.5%
unpow289.5%
Simplified89.5%
Final simplification90.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a (+ 1.0 (/ y (/ t b)))))))
(if (<= t -1.55e+103)
t_1
(if (<= t -90000.0)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= t -1.7e-34)
t_1
(if (<= t -4.7e-139)
(/ z b)
(if (<= t -1.05e-187)
(/ x (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 5.8e-103) (/ z b) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + (1.0 + (y / (t / b))));
double tmp;
if (t <= -1.55e+103) {
tmp = t_1;
} else if (t <= -90000.0) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= -1.7e-34) {
tmp = t_1;
} else if (t <= -4.7e-139) {
tmp = z / b;
} else if (t <= -1.05e-187) {
tmp = x / (((y * b) / t) + (a + 1.0));
} else if (t <= 5.8e-103) {
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 = x / (a + (1.0d0 + (y / (t / b))))
if (t <= (-1.55d+103)) then
tmp = t_1
else if (t <= (-90000.0d0)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (t <= (-1.7d-34)) then
tmp = t_1
else if (t <= (-4.7d-139)) then
tmp = z / b
else if (t <= (-1.05d-187)) then
tmp = x / (((y * b) / t) + (a + 1.0d0))
else if (t <= 5.8d-103) 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 = x / (a + (1.0 + (y / (t / b))));
double tmp;
if (t <= -1.55e+103) {
tmp = t_1;
} else if (t <= -90000.0) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= -1.7e-34) {
tmp = t_1;
} else if (t <= -4.7e-139) {
tmp = z / b;
} else if (t <= -1.05e-187) {
tmp = x / (((y * b) / t) + (a + 1.0));
} else if (t <= 5.8e-103) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + (1.0 + (y / (t / b)))) tmp = 0 if t <= -1.55e+103: tmp = t_1 elif t <= -90000.0: tmp = (y / t) * (z / (a + 1.0)) elif t <= -1.7e-34: tmp = t_1 elif t <= -4.7e-139: tmp = z / b elif t <= -1.05e-187: tmp = x / (((y * b) / t) + (a + 1.0)) elif t <= 5.8e-103: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))) tmp = 0.0 if (t <= -1.55e+103) tmp = t_1; elseif (t <= -90000.0) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (t <= -1.7e-34) tmp = t_1; elseif (t <= -4.7e-139) tmp = Float64(z / b); elseif (t <= -1.05e-187) tmp = Float64(x / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 5.8e-103) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + (1.0 + (y / (t / b)))); tmp = 0.0; if (t <= -1.55e+103) tmp = t_1; elseif (t <= -90000.0) tmp = (y / t) * (z / (a + 1.0)); elseif (t <= -1.7e-34) tmp = t_1; elseif (t <= -4.7e-139) tmp = z / b; elseif (t <= -1.05e-187) tmp = x / (((y * b) / t) + (a + 1.0)); elseif (t <= 5.8e-103) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+103], t$95$1, If[LessEqual[t, -90000.0], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e-34], t$95$1, If[LessEqual[t, -4.7e-139], N[(z / b), $MachinePrecision], If[LessEqual[t, -1.05e-187], N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e-103], N[(z / b), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -90000:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.7 \cdot 10^{-139}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-187}:\\
\;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-103}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.5500000000000001e103 or -9e4 < t < -1.7e-34 or 5.7999999999999997e-103 < t Initial program 83.1%
*-commutative83.1%
associate-/l*85.2%
associate-*l/93.8%
*-commutative93.8%
cancel-sign-sub93.8%
*-commutative93.8%
associate-*l/85.2%
associate-+r-85.2%
associate-*l/93.8%
*-commutative93.8%
cancel-sign-sub93.8%
*-commutative93.8%
associate-/r/93.1%
Simplified93.1%
Taylor expanded in x around inf 73.8%
if -1.5500000000000001e103 < t < -9e4Initial program 72.8%
*-commutative72.8%
associate-*l/83.1%
*-commutative83.1%
associate-*l/83.1%
Simplified83.1%
Taylor expanded in x around 0 55.5%
times-frac76.8%
associate-+r+76.8%
associate-*r/76.8%
+-commutative76.8%
fma-udef76.8%
Simplified76.8%
Taylor expanded in y around 0 71.0%
if -1.7e-34 < t < -4.70000000000000027e-139 or -1.04999999999999996e-187 < t < 5.7999999999999997e-103Initial program 60.0%
*-commutative60.0%
associate-*l/49.6%
*-commutative49.6%
associate-*l/44.8%
Simplified44.8%
Taylor expanded in t around 0 62.4%
if -4.70000000000000027e-139 < t < -1.04999999999999996e-187Initial program 84.0%
*-commutative84.0%
associate-/l*76.2%
associate-*l/75.9%
*-commutative75.9%
cancel-sign-sub75.9%
*-commutative75.9%
associate-*l/76.2%
associate-+r-76.2%
associate-*l/75.9%
*-commutative75.9%
cancel-sign-sub75.9%
*-commutative75.9%
associate-/r/68.1%
Simplified68.1%
Taylor expanded in x around inf 60.0%
Final simplification69.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8e-183) (not (<= t 2.9e-110))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8e-183) || !(t <= 2.9e-110)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} 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 ((t <= (-8d-183)) .or. (.not. (t <= 2.9d-110))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
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 ((t <= -8e-183) || !(t <= 2.9e-110)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8e-183) or not (t <= 2.9e-110): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8e-183) || !(t <= 2.9e-110)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8e-183) || ~((t <= 2.9e-110))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8e-183], N[Not[LessEqual[t, 2.9e-110]], $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[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-183} \lor \neg \left(t \leq 2.9 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -8.00000000000000004e-183 or 2.9000000000000002e-110 < t Initial program 80.3%
*-commutative80.3%
associate-*l/81.3%
*-commutative81.3%
associate-*l/86.8%
Simplified86.8%
if -8.00000000000000004e-183 < t < 2.9000000000000002e-110Initial program 59.3%
*-commutative59.3%
associate-*l/47.5%
*-commutative47.5%
associate-*l/41.3%
Simplified41.3%
Taylor expanded in t around 0 64.8%
Final simplification81.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -4.2e-183)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t 1.9e-178)
(/ z b)
(/ (+ x (/ z (/ t y))) (+ a (+ 1.0 (/ y (/ t b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.2e-183) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= 1.9e-178) {
tmp = z / b;
} else {
tmp = (x + (z / (t / y))) / (a + (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 (t <= (-4.2d-183)) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else if (t <= 1.9d-178) then
tmp = z / b
else
tmp = (x + (z / (t / y))) / (a + (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 (t <= -4.2e-183) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= 1.9e-178) {
tmp = z / b;
} else {
tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.2e-183: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) elif t <= 1.9e-178: tmp = z / b else: tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.2e-183) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= 1.9e-178) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 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 (t <= -4.2e-183) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); elseif (t <= 1.9e-178) tmp = z / b; else tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.2e-183], 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], If[LessEqual[t, 1.9e-178], N[(z / b), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-183}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-178}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\end{array}
\end{array}
if t < -4.2000000000000004e-183Initial program 81.8%
*-commutative81.8%
associate-*l/83.4%
*-commutative83.4%
associate-*l/87.1%
Simplified87.1%
if -4.2000000000000004e-183 < t < 1.90000000000000007e-178Initial program 54.0%
*-commutative54.0%
associate-*l/42.6%
*-commutative42.6%
associate-*l/38.5%
Simplified38.5%
Taylor expanded in t around 0 68.4%
if 1.90000000000000007e-178 < t Initial program 78.6%
*-commutative78.6%
associate-/l*81.5%
associate-*l/87.0%
*-commutative87.0%
cancel-sign-sub87.0%
*-commutative87.0%
associate-*l/81.5%
associate-+r-81.5%
associate-*l/87.0%
*-commutative87.0%
cancel-sign-sub87.0%
*-commutative87.0%
associate-/r/85.3%
Simplified85.3%
Final simplification82.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a (+ 1.0 (/ y (/ t b)))))))
(if (<= t -7.8e+102)
t_1
(if (<= t -85000.0)
(* (/ y t) (/ z (+ a 1.0)))
(if (or (<= t -2.9e-37) (not (<= t 1.5e-100))) t_1 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + (1.0 + (y / (t / b))));
double tmp;
if (t <= -7.8e+102) {
tmp = t_1;
} else if (t <= -85000.0) {
tmp = (y / t) * (z / (a + 1.0));
} else if ((t <= -2.9e-37) || !(t <= 1.5e-100)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (a + (1.0d0 + (y / (t / b))))
if (t <= (-7.8d+102)) then
tmp = t_1
else if (t <= (-85000.0d0)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if ((t <= (-2.9d-37)) .or. (.not. (t <= 1.5d-100))) then
tmp = t_1
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 t_1 = x / (a + (1.0 + (y / (t / b))));
double tmp;
if (t <= -7.8e+102) {
tmp = t_1;
} else if (t <= -85000.0) {
tmp = (y / t) * (z / (a + 1.0));
} else if ((t <= -2.9e-37) || !(t <= 1.5e-100)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + (1.0 + (y / (t / b)))) tmp = 0 if t <= -7.8e+102: tmp = t_1 elif t <= -85000.0: tmp = (y / t) * (z / (a + 1.0)) elif (t <= -2.9e-37) or not (t <= 1.5e-100): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))) tmp = 0.0 if (t <= -7.8e+102) tmp = t_1; elseif (t <= -85000.0) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif ((t <= -2.9e-37) || !(t <= 1.5e-100)) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + (1.0 + (y / (t / b)))); tmp = 0.0; if (t <= -7.8e+102) tmp = t_1; elseif (t <= -85000.0) tmp = (y / t) * (z / (a + 1.0)); elseif ((t <= -2.9e-37) || ~((t <= 1.5e-100))) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.8e+102], t$95$1, If[LessEqual[t, -85000.0], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.9e-37], N[Not[LessEqual[t, 1.5e-100]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{if}\;t \leq -7.8 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -85000:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-37} \lor \neg \left(t \leq 1.5 \cdot 10^{-100}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -7.7999999999999997e102 or -85000 < t < -2.90000000000000005e-37 or 1.5e-100 < t Initial program 83.1%
*-commutative83.1%
associate-/l*85.2%
associate-*l/93.8%
*-commutative93.8%
cancel-sign-sub93.8%
*-commutative93.8%
associate-*l/85.2%
associate-+r-85.2%
associate-*l/93.8%
*-commutative93.8%
cancel-sign-sub93.8%
*-commutative93.8%
associate-/r/93.1%
Simplified93.1%
Taylor expanded in x around inf 73.8%
if -7.7999999999999997e102 < t < -85000Initial program 72.8%
*-commutative72.8%
associate-*l/83.1%
*-commutative83.1%
associate-*l/83.1%
Simplified83.1%
Taylor expanded in x around 0 55.5%
times-frac76.8%
associate-+r+76.8%
associate-*r/76.8%
+-commutative76.8%
fma-udef76.8%
Simplified76.8%
Taylor expanded in y around 0 71.0%
if -2.90000000000000005e-37 < t < 1.5e-100Initial program 63.1%
*-commutative63.1%
associate-*l/53.9%
*-commutative53.9%
associate-*l/48.8%
Simplified48.8%
Taylor expanded in t around 0 57.8%
Final simplification67.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.2e-188) (not (<= t 1.55e-94))) (/ (+ x (* y (/ z t))) (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.2e-188) || !(t <= 1.55e-94)) {
tmp = (x + (y * (z / t))) / (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 ((t <= (-1.2d-188)) .or. (.not. (t <= 1.55d-94))) then
tmp = (x + (y * (z / t))) / (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 ((t <= -1.2e-188) || !(t <= 1.55e-94)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.2e-188) or not (t <= 1.55e-94): tmp = (x + (y * (z / t))) / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.2e-188) || !(t <= 1.55e-94)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / 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 ((t <= -1.2e-188) || ~((t <= 1.55e-94))) tmp = (x + (y * (z / t))) / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.2e-188], N[Not[LessEqual[t, 1.55e-94]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-188} \lor \neg \left(t \leq 1.55 \cdot 10^{-94}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.2e-188 or 1.5499999999999999e-94 < t Initial program 80.3%
*-commutative80.3%
associate-*l/81.3%
*-commutative81.3%
associate-*l/86.3%
Simplified86.3%
Taylor expanded in b around 0 73.0%
if -1.2e-188 < t < 1.5499999999999999e-94Initial program 59.3%
*-commutative59.3%
associate-*l/47.5%
*-commutative47.5%
associate-*l/42.8%
Simplified42.8%
Taylor expanded in t around 0 64.8%
Final simplification70.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -4.5e+29)
t_1
(if (<= t -78000.0)
(* (/ y t) (/ z a))
(if (or (<= t -4.1e-14) (not (<= t 4e-88))) t_1 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -4.5e+29) {
tmp = t_1;
} else if (t <= -78000.0) {
tmp = (y / t) * (z / a);
} else if ((t <= -4.1e-14) || !(t <= 4e-88)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-4.5d+29)) then
tmp = t_1
else if (t <= (-78000.0d0)) then
tmp = (y / t) * (z / a)
else if ((t <= (-4.1d-14)) .or. (.not. (t <= 4d-88))) then
tmp = t_1
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 t_1 = x / (a + 1.0);
double tmp;
if (t <= -4.5e+29) {
tmp = t_1;
} else if (t <= -78000.0) {
tmp = (y / t) * (z / a);
} else if ((t <= -4.1e-14) || !(t <= 4e-88)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -4.5e+29: tmp = t_1 elif t <= -78000.0: tmp = (y / t) * (z / a) elif (t <= -4.1e-14) or not (t <= 4e-88): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -4.5e+29) tmp = t_1; elseif (t <= -78000.0) tmp = Float64(Float64(y / t) * Float64(z / a)); elseif ((t <= -4.1e-14) || !(t <= 4e-88)) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -4.5e+29) tmp = t_1; elseif (t <= -78000.0) tmp = (y / t) * (z / a); elseif ((t <= -4.1e-14) || ~((t <= 4e-88))) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e+29], t$95$1, If[LessEqual[t, -78000.0], N[(N[(y / t), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -4.1e-14], N[Not[LessEqual[t, 4e-88]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -78000:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-14} \lor \neg \left(t \leq 4 \cdot 10^{-88}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -4.5000000000000002e29 or -78000 < t < -4.1000000000000002e-14 or 3.99999999999999974e-88 < t Initial program 81.7%
*-commutative81.7%
associate-*l/83.1%
*-commutative83.1%
associate-*l/90.8%
Simplified90.8%
Taylor expanded in t around inf 63.5%
if -4.5000000000000002e29 < t < -78000Initial program 81.7%
*-commutative81.7%
associate-*l/90.2%
*-commutative90.2%
associate-*l/90.2%
Simplified90.2%
Taylor expanded in x around 0 71.8%
times-frac89.5%
associate-+r+89.5%
associate-*r/89.5%
+-commutative89.5%
fma-udef89.5%
Simplified89.5%
Taylor expanded in a around inf 80.9%
if -4.1000000000000002e-14 < t < 3.99999999999999974e-88Initial program 64.2%
*-commutative64.2%
associate-*l/55.3%
*-commutative55.3%
associate-*l/50.3%
Simplified50.3%
Taylor expanded in t around 0 56.2%
Final simplification61.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -4.5e+29)
t_1
(if (<= t -85000.0)
(/ y (/ (* t a) z))
(if (or (<= t -1.15e-13) (not (<= t 4e-91))) t_1 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -4.5e+29) {
tmp = t_1;
} else if (t <= -85000.0) {
tmp = y / ((t * a) / z);
} else if ((t <= -1.15e-13) || !(t <= 4e-91)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-4.5d+29)) then
tmp = t_1
else if (t <= (-85000.0d0)) then
tmp = y / ((t * a) / z)
else if ((t <= (-1.15d-13)) .or. (.not. (t <= 4d-91))) then
tmp = t_1
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 t_1 = x / (a + 1.0);
double tmp;
if (t <= -4.5e+29) {
tmp = t_1;
} else if (t <= -85000.0) {
tmp = y / ((t * a) / z);
} else if ((t <= -1.15e-13) || !(t <= 4e-91)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -4.5e+29: tmp = t_1 elif t <= -85000.0: tmp = y / ((t * a) / z) elif (t <= -1.15e-13) or not (t <= 4e-91): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -4.5e+29) tmp = t_1; elseif (t <= -85000.0) tmp = Float64(y / Float64(Float64(t * a) / z)); elseif ((t <= -1.15e-13) || !(t <= 4e-91)) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -4.5e+29) tmp = t_1; elseif (t <= -85000.0) tmp = y / ((t * a) / z); elseif ((t <= -1.15e-13) || ~((t <= 4e-91))) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e+29], t$95$1, If[LessEqual[t, -85000.0], N[(y / N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.15e-13], N[Not[LessEqual[t, 4e-91]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -85000:\\
\;\;\;\;\frac{y}{\frac{t \cdot a}{z}}\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-13} \lor \neg \left(t \leq 4 \cdot 10^{-91}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -4.5000000000000002e29 or -85000 < t < -1.1499999999999999e-13 or 4.00000000000000009e-91 < t Initial program 81.7%
*-commutative81.7%
associate-*l/83.1%
*-commutative83.1%
associate-*l/90.8%
Simplified90.8%
Taylor expanded in t around inf 63.5%
if -4.5000000000000002e29 < t < -85000Initial program 81.7%
*-commutative81.7%
associate-*l/90.2%
*-commutative90.2%
associate-*l/90.2%
Simplified90.2%
Taylor expanded in b around 0 90.2%
Taylor expanded in x around 0 71.8%
associate-/r*72.1%
*-commutative72.1%
associate-/l*71.2%
Simplified71.2%
Taylor expanded in a around inf 71.8%
associate-/l*81.6%
*-commutative81.6%
Simplified81.6%
if -1.1499999999999999e-13 < t < 4.00000000000000009e-91Initial program 64.2%
*-commutative64.2%
associate-*l/55.3%
*-commutative55.3%
associate-*l/50.3%
Simplified50.3%
Taylor expanded in t around 0 56.2%
Final simplification61.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -7.8e+102)
t_1
(if (<= t -78000.0)
(* (/ y t) (/ z (+ a 1.0)))
(if (or (<= t -2.4e-14) (not (<= t 2.4e-88))) t_1 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -7.8e+102) {
tmp = t_1;
} else if (t <= -78000.0) {
tmp = (y / t) * (z / (a + 1.0));
} else if ((t <= -2.4e-14) || !(t <= 2.4e-88)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-7.8d+102)) then
tmp = t_1
else if (t <= (-78000.0d0)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if ((t <= (-2.4d-14)) .or. (.not. (t <= 2.4d-88))) then
tmp = t_1
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 t_1 = x / (a + 1.0);
double tmp;
if (t <= -7.8e+102) {
tmp = t_1;
} else if (t <= -78000.0) {
tmp = (y / t) * (z / (a + 1.0));
} else if ((t <= -2.4e-14) || !(t <= 2.4e-88)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -7.8e+102: tmp = t_1 elif t <= -78000.0: tmp = (y / t) * (z / (a + 1.0)) elif (t <= -2.4e-14) or not (t <= 2.4e-88): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -7.8e+102) tmp = t_1; elseif (t <= -78000.0) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif ((t <= -2.4e-14) || !(t <= 2.4e-88)) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -7.8e+102) tmp = t_1; elseif (t <= -78000.0) tmp = (y / t) * (z / (a + 1.0)); elseif ((t <= -2.4e-14) || ~((t <= 2.4e-88))) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.8e+102], t$95$1, If[LessEqual[t, -78000.0], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.4e-14], N[Not[LessEqual[t, 2.4e-88]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -7.8 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -78000:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-14} \lor \neg \left(t \leq 2.4 \cdot 10^{-88}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -7.7999999999999997e102 or -78000 < t < -2.4e-14 or 2.4e-88 < t Initial program 82.8%
*-commutative82.8%
associate-*l/83.6%
*-commutative83.6%
associate-*l/91.6%
Simplified91.6%
Taylor expanded in t around inf 65.1%
if -7.7999999999999997e102 < t < -78000Initial program 72.8%
*-commutative72.8%
associate-*l/83.1%
*-commutative83.1%
associate-*l/83.1%
Simplified83.1%
Taylor expanded in x around 0 55.5%
times-frac76.8%
associate-+r+76.8%
associate-*r/76.8%
+-commutative76.8%
fma-udef76.8%
Simplified76.8%
Taylor expanded in y around 0 71.0%
if -2.4e-14 < t < 2.4e-88Initial program 64.2%
*-commutative64.2%
associate-*l/55.3%
*-commutative55.3%
associate-*l/50.3%
Simplified50.3%
Taylor expanded in t around 0 56.2%
Final simplification62.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ x (/ (* y z) t)))) (if (<= a -1.4) (/ (+ x (* y (/ z t))) a) (if (<= a 1.0) t_1 (/ t_1 a)))))
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 <= -1.4) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= 1.0) {
tmp = t_1;
} else {
tmp = t_1 / a;
}
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 <= (-1.4d0)) then
tmp = (x + (y * (z / t))) / a
else if (a <= 1.0d0) then
tmp = t_1
else
tmp = t_1 / a
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 <= -1.4) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= 1.0) {
tmp = t_1;
} else {
tmp = t_1 / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) tmp = 0 if a <= -1.4: tmp = (x + (y * (z / t))) / a elif a <= 1.0: tmp = t_1 else: tmp = t_1 / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (a <= -1.4) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (a <= 1.0) tmp = t_1; else tmp = Float64(t_1 / a); 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 <= -1.4) tmp = (x + (y * (z / t))) / a; elseif (a <= 1.0) tmp = t_1; else tmp = t_1 / a; 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]}, If[LessEqual[a, -1.4], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 1.0], t$95$1, N[(t$95$1 / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a \leq -1.4:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a}\\
\end{array}
\end{array}
if a < -1.3999999999999999Initial program 76.2%
*-commutative76.2%
associate-*l/74.7%
*-commutative74.7%
associate-*l/77.5%
Simplified77.5%
Taylor expanded in a around inf 56.1%
if -1.3999999999999999 < a < 1Initial program 75.0%
*-commutative75.0%
associate-*l/74.1%
*-commutative74.1%
associate-*l/74.8%
Simplified74.8%
Taylor expanded in b around 0 60.5%
Taylor expanded in a around 0 57.2%
if 1 < a Initial program 73.8%
*-commutative73.8%
associate-*l/67.8%
*-commutative67.8%
associate-*l/73.9%
Simplified73.9%
Taylor expanded in a around inf 66.8%
Final simplification59.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))))
(if (<= a -1.0)
(+ (* (/ z t) (/ y a)) (/ x a))
(if (<= a 1.0) t_1 (/ t_1 a)))))
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 <= -1.0) {
tmp = ((z / t) * (y / a)) + (x / a);
} else if (a <= 1.0) {
tmp = t_1;
} else {
tmp = t_1 / a;
}
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 <= (-1.0d0)) then
tmp = ((z / t) * (y / a)) + (x / a)
else if (a <= 1.0d0) then
tmp = t_1
else
tmp = t_1 / a
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 <= -1.0) {
tmp = ((z / t) * (y / a)) + (x / a);
} else if (a <= 1.0) {
tmp = t_1;
} else {
tmp = t_1 / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) tmp = 0 if a <= -1.0: tmp = ((z / t) * (y / a)) + (x / a) elif a <= 1.0: tmp = t_1 else: tmp = t_1 / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (a <= -1.0) tmp = Float64(Float64(Float64(z / t) * Float64(y / a)) + Float64(x / a)); elseif (a <= 1.0) tmp = t_1; else tmp = Float64(t_1 / a); 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 <= -1.0) tmp = ((z / t) * (y / a)) + (x / a); elseif (a <= 1.0) tmp = t_1; else tmp = t_1 / a; 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]}, If[LessEqual[a, -1.0], N[(N[(N[(z / t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision] + N[(x / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.0], t$95$1, N[(t$95$1 / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{a} + \frac{x}{a}\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a}\\
\end{array}
\end{array}
if a < -1Initial program 76.2%
*-commutative76.2%
associate-/l*76.2%
associate-*l/78.9%
*-commutative78.9%
cancel-sign-sub78.9%
*-commutative78.9%
associate-*l/76.2%
associate-+r-76.2%
associate-*l/78.9%
*-commutative78.9%
cancel-sign-sub78.9%
*-commutative78.9%
associate-/r/77.5%
Simplified77.5%
Taylor expanded in x around 0 79.2%
Taylor expanded in a around inf 62.9%
times-frac63.0%
Simplified63.0%
Taylor expanded in a around inf 56.1%
if -1 < a < 1Initial program 75.0%
*-commutative75.0%
associate-*l/74.1%
*-commutative74.1%
associate-*l/74.8%
Simplified74.8%
Taylor expanded in b around 0 60.5%
Taylor expanded in a around 0 57.2%
if 1 < a Initial program 73.8%
*-commutative73.8%
associate-*l/67.8%
*-commutative67.8%
associate-*l/73.9%
Simplified73.9%
Taylor expanded in a around inf 66.8%
Final simplification59.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6.5e+44) (/ x a) (if (<= a -1.8e-10) (/ z b) (if (<= a 0.75) (- x (* x a)) (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.5e+44) {
tmp = x / a;
} else if (a <= -1.8e-10) {
tmp = z / b;
} else if (a <= 0.75) {
tmp = x - (x * a);
} else {
tmp = x / a;
}
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 <= (-6.5d+44)) then
tmp = x / a
else if (a <= (-1.8d-10)) then
tmp = z / b
else if (a <= 0.75d0) then
tmp = x - (x * a)
else
tmp = x / a
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 <= -6.5e+44) {
tmp = x / a;
} else if (a <= -1.8e-10) {
tmp = z / b;
} else if (a <= 0.75) {
tmp = x - (x * a);
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.5e+44: tmp = x / a elif a <= -1.8e-10: tmp = z / b elif a <= 0.75: tmp = x - (x * a) else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.5e+44) tmp = Float64(x / a); elseif (a <= -1.8e-10) tmp = Float64(z / b); elseif (a <= 0.75) tmp = Float64(x - Float64(x * a)); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -6.5e+44) tmp = x / a; elseif (a <= -1.8e-10) tmp = z / b; elseif (a <= 0.75) tmp = x - (x * a); else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.5e+44], N[(x / a), $MachinePrecision], If[LessEqual[a, -1.8e-10], N[(z / b), $MachinePrecision], If[LessEqual[a, 0.75], N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision], N[(x / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-10}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 0.75:\\
\;\;\;\;x - x \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -6.50000000000000018e44 or 0.75 < a Initial program 74.3%
*-commutative74.3%
associate-/l*74.3%
associate-*l/79.0%
*-commutative79.0%
cancel-sign-sub79.0%
*-commutative79.0%
associate-*l/74.3%
associate-+r-74.3%
associate-*l/79.0%
*-commutative79.0%
cancel-sign-sub79.0%
*-commutative79.0%
associate-/r/78.3%
Simplified78.3%
Taylor expanded in x around inf 50.7%
Taylor expanded in a around inf 47.4%
if -6.50000000000000018e44 < a < -1.8e-10Initial program 74.2%
*-commutative74.2%
associate-*l/74.2%
*-commutative74.2%
associate-*l/80.5%
Simplified80.5%
Taylor expanded in t around 0 50.2%
if -1.8e-10 < a < 0.75Initial program 75.8%
*-commutative75.8%
associate-*l/74.9%
*-commutative74.9%
associate-*l/74.8%
Simplified74.8%
Taylor expanded in t around inf 46.1%
Taylor expanded in a around 0 46.1%
+-commutative46.1%
mul-1-neg46.1%
unsub-neg46.1%
Simplified46.1%
Final simplification47.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.75e-14) (not (<= t 3.5e-94))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.75e-14) || !(t <= 3.5e-94)) {
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 ((t <= (-2.75d-14)) .or. (.not. (t <= 3.5d-94))) 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 ((t <= -2.75e-14) || !(t <= 3.5e-94)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.75e-14) or not (t <= 3.5e-94): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.75e-14) || !(t <= 3.5e-94)) 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 ((t <= -2.75e-14) || ~((t <= 3.5e-94))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.75e-14], N[Not[LessEqual[t, 3.5e-94]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.75 \cdot 10^{-14} \lor \neg \left(t \leq 3.5 \cdot 10^{-94}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.74999999999999996e-14 or 3.49999999999999998e-94 < t Initial program 81.7%
*-commutative81.7%
associate-*l/83.5%
*-commutative83.5%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in t around inf 61.5%
if -2.74999999999999996e-14 < t < 3.49999999999999998e-94Initial program 64.2%
*-commutative64.2%
associate-*l/55.3%
*-commutative55.3%
associate-*l/50.3%
Simplified50.3%
Taylor expanded in t around 0 56.2%
Final simplification59.5%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6.5e+46) (/ x a) (if (<= a 7.8e+49) (/ z b) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.5e+46) {
tmp = x / a;
} else if (a <= 7.8e+49) {
tmp = z / b;
} else {
tmp = x / a;
}
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 <= (-6.5d+46)) then
tmp = x / a
else if (a <= 7.8d+49) then
tmp = z / b
else
tmp = x / a
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 <= -6.5e+46) {
tmp = x / a;
} else if (a <= 7.8e+49) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.5e+46: tmp = x / a elif a <= 7.8e+49: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.5e+46) tmp = Float64(x / a); elseif (a <= 7.8e+49) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -6.5e+46) tmp = x / a; elseif (a <= 7.8e+49) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.5e+46], N[(x / a), $MachinePrecision], If[LessEqual[a, 7.8e+49], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{+49}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -6.50000000000000008e46 or 7.8000000000000002e49 < a Initial program 74.2%
*-commutative74.2%
associate-/l*74.2%
associate-*l/78.3%
*-commutative78.3%
cancel-sign-sub78.3%
*-commutative78.3%
associate-*l/74.2%
associate-+r-74.2%
associate-*l/78.3%
*-commutative78.3%
cancel-sign-sub78.3%
*-commutative78.3%
associate-/r/77.6%
Simplified77.6%
Taylor expanded in x around inf 52.4%
Taylor expanded in a around inf 48.9%
if -6.50000000000000008e46 < a < 7.8000000000000002e49Initial program 75.6%
*-commutative75.6%
associate-*l/74.9%
*-commutative74.9%
associate-*l/76.1%
Simplified76.1%
Taylor expanded in t around 0 37.3%
Final simplification42.2%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 75.0%
*-commutative75.0%
associate-/l*75.2%
associate-*l/78.7%
*-commutative78.7%
cancel-sign-sub78.7%
*-commutative78.7%
associate-*l/75.2%
associate-+r-75.2%
associate-*l/78.7%
*-commutative78.7%
cancel-sign-sub78.7%
*-commutative78.7%
associate-/r/76.3%
Simplified76.3%
Taylor expanded in x around inf 52.9%
Taylor expanded in a around inf 25.1%
Final simplification25.1%
(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 2023268
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))