
(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 21 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 (- (/ z b) (/ (fma -1.0 (/ t (/ b x)) (* (/ z b) (/ t b))) y)))
(t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_3 (+ a (fma y (/ b t) 1.0))))
(if (<= t_2 (- INFINITY))
(/ y (* t (/ t_3 z)))
(if (<= t_2 -1e-308)
t_2
(if (<= t_2 0.0)
t_1
(if (<= t_2 1e+283)
t_2
(if (<= t_2 INFINITY) (* (/ y t) (/ z t_3)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) - (fma(-1.0, (t / (b / x)), ((z / b) * (t / b))) / y);
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_3 = a + fma(y, (b / t), 1.0);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = y / (t * (t_3 / z));
} else if (t_2 <= -1e-308) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t_1;
} else if (t_2 <= 1e+283) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (y / t) * (z / t_3);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) - Float64(fma(-1.0, Float64(t / Float64(b / x)), Float64(Float64(z / b) * Float64(t / b))) / y)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_3 = Float64(a + fma(y, Float64(b / t), 1.0)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(y / Float64(t * Float64(t_3 / z))); elseif (t_2 <= -1e-308) tmp = t_2; elseif (t_2 <= 0.0) tmp = t_1; elseif (t_2 <= 1e+283) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / t_3)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] - N[(N[(-1.0 * N[(t / N[(b / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / b), $MachinePrecision] * N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y / N[(t * N[(t$95$3 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-308], t$95$2, If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 1e+283], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$3), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} - \frac{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, \frac{z}{b} \cdot \frac{t}{b}\right)}{y}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_3 := a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{y}{t \cdot \frac{t_3}{z}}\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{+283}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t_3}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\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 23.0%
*-commutative23.0%
associate-*l/49.0%
*-commutative49.0%
associate-*l/49.0%
Simplified49.0%
Taylor expanded in x around 0 57.4%
times-frac56.9%
+-commutative56.9%
+-commutative56.9%
associate-*l/56.9%
*-commutative56.9%
+-commutative56.9%
associate-+r+56.9%
fma-udef56.9%
Simplified56.9%
*-commutative56.9%
clear-num56.9%
frac-times82.6%
*-un-lft-identity82.6%
Applied egg-rr82.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282Initial program 99.2%
if -9.9999999999999991e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0 or +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 30.7%
*-commutative30.7%
associate-*l/30.0%
*-commutative30.0%
associate-*l/43.6%
Simplified43.6%
Taylor expanded in a around 0 21.8%
Taylor expanded in y around -inf 79.1%
+-commutative79.1%
mul-1-neg79.1%
unsub-neg79.1%
fma-neg79.1%
associate-/l*82.6%
mul-1-neg82.6%
remove-double-neg82.6%
*-commutative82.6%
unpow282.6%
times-frac86.2%
Simplified86.2%
if 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 47.2%
*-commutative47.2%
associate-*l/70.8%
*-commutative70.8%
associate-*l/70.8%
Simplified70.8%
Taylor expanded in x around 0 58.4%
times-frac94.0%
+-commutative94.0%
+-commutative94.0%
associate-*l/94.0%
*-commutative94.0%
+-commutative94.0%
associate-+r+94.0%
fma-udef94.0%
Simplified94.0%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(/ z b)
(if (<= t_1 -1e-308)
t_1
(if (<= t_1 0.0)
(+
(/ z b)
(+ (* (/ t b) (/ x y)) (* (/ t (* b b)) (/ (* z (- -1.0 a)) y))))
(if (<= t_1 1e+283)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (+ a (fma y (/ b t) 1.0))))
(/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z / b;
} else if (t_1 <= -1e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + (((t / b) * (x / y)) + ((t / (b * b)) * ((z * (-1.0 - a)) / y)));
} else if (t_1 <= 1e+283) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / (a + fma(y, (b / t), 1.0)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z / b); elseif (t_1 <= -1e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(Float64(t / b) * Float64(x / y)) + Float64(Float64(t / Float64(b * b)) * Float64(Float64(z * Float64(-1.0 - a)) / y)))); elseif (t_1 <= 1e+283) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + fma(y, Float64(b / t), 1.0)))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, -1e-308], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b * b), $MachinePrecision]), $MachinePrecision] * N[(N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+283], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{z}{b} + \left(\frac{t}{b} \cdot \frac{x}{y} + \frac{t}{b \cdot b} \cdot \frac{z \cdot \left(-1 - a\right)}{y}\right)\\
\mathbf{elif}\;t_1 \leq 10^{+283}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\
\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.0 or +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 8.2%
*-commutative8.2%
associate-*l/17.7%
*-commutative17.7%
associate-*l/27.0%
Simplified27.0%
Taylor expanded in t around 0 84.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282Initial program 99.2%
if -9.9999999999999991e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 47.8%
*-commutative47.8%
associate-*l/46.4%
*-commutative46.4%
associate-*l/59.6%
Simplified59.6%
Taylor expanded in y around inf 72.9%
associate--l+72.9%
times-frac78.1%
times-frac78.4%
unpow278.4%
Simplified78.4%
if 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 47.2%
*-commutative47.2%
associate-*l/70.8%
*-commutative70.8%
associate-*l/70.8%
Simplified70.8%
Taylor expanded in x around 0 58.4%
times-frac94.0%
+-commutative94.0%
+-commutative94.0%
associate-*l/94.0%
*-commutative94.0%
+-commutative94.0%
associate-+r+94.0%
fma-udef94.0%
Simplified94.0%
Final simplification94.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (+ a (fma y (/ b t) 1.0))))
(if (<= t_1 (- INFINITY))
(/ y (* t (/ t_2 z)))
(if (<= t_1 -1e-308)
t_1
(if (<= t_1 0.0)
(+
(/ z b)
(+ (* (/ t b) (/ x y)) (* (/ t (* b b)) (/ (* z (- -1.0 a)) y))))
(if (<= t_1 1e+283)
t_1
(if (<= t_1 INFINITY) (* (/ y t) (/ z t_2)) (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = a + fma(y, (b / t), 1.0);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y / (t * (t_2 / z));
} else if (t_1 <= -1e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + (((t / b) * (x / y)) + ((t / (b * b)) * ((z * (-1.0 - a)) / y)));
} else if (t_1 <= 1e+283) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / t_2);
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_2 = Float64(a + fma(y, Float64(b / t), 1.0)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y / Float64(t * Float64(t_2 / z))); elseif (t_1 <= -1e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(Float64(t / b) * Float64(x / y)) + Float64(Float64(t / Float64(b * b)) * Float64(Float64(z * Float64(-1.0 - a)) / y)))); elseif (t_1 <= 1e+283) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / t_2)); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y / N[(t * N[(t$95$2 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-308], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b * b), $MachinePrecision]), $MachinePrecision] * N[(N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+283], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_2 := a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{y}{t \cdot \frac{t_2}{z}}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{z}{b} + \left(\frac{t}{b} \cdot \frac{x}{y} + \frac{t}{b \cdot b} \cdot \frac{z \cdot \left(-1 - a\right)}{y}\right)\\
\mathbf{elif}\;t_1 \leq 10^{+283}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{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 23.0%
*-commutative23.0%
associate-*l/49.0%
*-commutative49.0%
associate-*l/49.0%
Simplified49.0%
Taylor expanded in x around 0 57.4%
times-frac56.9%
+-commutative56.9%
+-commutative56.9%
associate-*l/56.9%
*-commutative56.9%
+-commutative56.9%
associate-+r+56.9%
fma-udef56.9%
Simplified56.9%
*-commutative56.9%
clear-num56.9%
frac-times82.6%
*-un-lft-identity82.6%
Applied egg-rr82.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282Initial program 99.2%
if -9.9999999999999991e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 47.8%
*-commutative47.8%
associate-*l/46.4%
*-commutative46.4%
associate-*l/59.6%
Simplified59.6%
Taylor expanded in y around inf 72.9%
associate--l+72.9%
times-frac78.1%
times-frac78.4%
unpow278.4%
Simplified78.4%
if 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 47.2%
*-commutative47.2%
associate-*l/70.8%
*-commutative70.8%
associate-*l/70.8%
Simplified70.8%
Taylor expanded in x around 0 58.4%
times-frac94.0%
+-commutative94.0%
+-commutative94.0%
associate-*l/94.0%
*-commutative94.0%
+-commutative94.0%
associate-+r+94.0%
fma-udef94.0%
Simplified94.0%
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.5%
*-commutative0.5%
associate-*l/14.8%
Simplified14.8%
Taylor expanded in t around 0 90.1%
Final simplification94.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(/ z b)
(if (<= t_1 -1e-308)
t_1
(if (<= t_1 0.0)
(/ z b)
(if (<= t_1 INFINITY)
(/ (+ x (/ z (/ t y))) (+ a (+ 1.0 (* (/ 1.0 t) (* y b)))))
(/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z / b;
} else if (t_1 <= -1e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = z / b;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (x + (z / (t / y))) / (a + (1.0 + ((1.0 / t) * (y * b))));
} 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)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z / b;
} else if (t_1 <= -1e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = z / b;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (x + (z / (t / y))) / (a + (1.0 + ((1.0 / t) * (y * b))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_1 <= -math.inf: tmp = z / b elif t_1 <= -1e-308: tmp = t_1 elif t_1 <= 0.0: tmp = z / b elif t_1 <= math.inf: tmp = (x + (z / (t / y))) / (a + (1.0 + ((1.0 / t) * (y * b)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z / b); elseif (t_1 <= -1e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(z / b); elseif (t_1 <= Inf) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + Float64(1.0 + Float64(Float64(1.0 / t) * Float64(y * b))))); 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)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -Inf) tmp = z / b; elseif (t_1 <= -1e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = z / b; elseif (t_1 <= Inf) tmp = (x + (z / (t / y))) / (a + (1.0 + ((1.0 / t) * (y * b)))); else tmp = z / b; 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] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, -1e-308], t$95$1, If[LessEqual[t$95$1, 0.0], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(N[(1.0 / t), $MachinePrecision] * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + \frac{1}{t} \cdot \left(y \cdot b\right)\right)}\\
\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.0 or -9.9999999999999991e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0 or +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 29.4%
*-commutative29.4%
associate-*l/33.1%
*-commutative33.1%
associate-*l/44.5%
Simplified44.5%
Taylor expanded in t around 0 77.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309Initial program 99.8%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 91.1%
*-commutative91.1%
associate-/l*93.8%
associate-*l/90.9%
*-commutative90.9%
cancel-sign-sub90.9%
*-commutative90.9%
associate-*l/93.8%
associate-+r-93.8%
associate-*l/90.9%
*-commutative90.9%
cancel-sign-sub90.9%
*-commutative90.9%
associate-/r/90.0%
Simplified90.0%
associate-/l*93.8%
div-inv93.8%
Applied egg-rr93.8%
Final simplification91.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(/ z b)
(if (<= t_1 -1e-308)
t_1
(if (<= t_1 0.0)
(+
(/ z b)
(+ (* (/ t b) (/ x y)) (* (/ t (* b b)) (/ (* z (- -1.0 a)) y))))
(if (<= t_1 INFINITY)
(/ (+ x (/ z (/ t y))) (+ a (+ 1.0 (* (/ 1.0 t) (* y b)))))
(/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z / b;
} else if (t_1 <= -1e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + (((t / b) * (x / y)) + ((t / (b * b)) * ((z * (-1.0 - a)) / y)));
} else if (t_1 <= ((double) INFINITY)) {
tmp = (x + (z / (t / y))) / (a + (1.0 + ((1.0 / t) * (y * b))));
} 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)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z / b;
} else if (t_1 <= -1e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + (((t / b) * (x / y)) + ((t / (b * b)) * ((z * (-1.0 - a)) / y)));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (x + (z / (t / y))) / (a + (1.0 + ((1.0 / t) * (y * b))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_1 <= -math.inf: tmp = z / b elif t_1 <= -1e-308: tmp = t_1 elif t_1 <= 0.0: tmp = (z / b) + (((t / b) * (x / y)) + ((t / (b * b)) * ((z * (-1.0 - a)) / y))) elif t_1 <= math.inf: tmp = (x + (z / (t / y))) / (a + (1.0 + ((1.0 / t) * (y * b)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z / b); elseif (t_1 <= -1e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(Float64(t / b) * Float64(x / y)) + Float64(Float64(t / Float64(b * b)) * Float64(Float64(z * Float64(-1.0 - a)) / y)))); elseif (t_1 <= Inf) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + Float64(1.0 + Float64(Float64(1.0 / t) * Float64(y * b))))); 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)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -Inf) tmp = z / b; elseif (t_1 <= -1e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = (z / b) + (((t / b) * (x / y)) + ((t / (b * b)) * ((z * (-1.0 - a)) / y))); elseif (t_1 <= Inf) tmp = (x + (z / (t / y))) / (a + (1.0 + ((1.0 / t) * (y * b)))); else tmp = z / b; 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] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, -1e-308], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(b * b), $MachinePrecision]), $MachinePrecision] * N[(N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(N[(1.0 / t), $MachinePrecision] * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{z}{b} + \left(\frac{t}{b} \cdot \frac{x}{y} + \frac{t}{b \cdot b} \cdot \frac{z \cdot \left(-1 - a\right)}{y}\right)\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + \frac{1}{t} \cdot \left(y \cdot b\right)\right)}\\
\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.0 or +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 8.2%
*-commutative8.2%
associate-*l/17.7%
*-commutative17.7%
associate-*l/27.0%
Simplified27.0%
Taylor expanded in t around 0 84.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309Initial program 99.8%
if -9.9999999999999991e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 47.8%
*-commutative47.8%
associate-*l/46.4%
*-commutative46.4%
associate-*l/59.6%
Simplified59.6%
Taylor expanded in y around inf 72.9%
associate--l+72.9%
times-frac78.1%
times-frac78.4%
unpow278.4%
Simplified78.4%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 91.1%
*-commutative91.1%
associate-/l*93.8%
associate-*l/90.9%
*-commutative90.9%
cancel-sign-sub90.9%
*-commutative90.9%
associate-*l/93.8%
associate-+r-93.8%
associate-*l/90.9%
*-commutative90.9%
cancel-sign-sub90.9%
*-commutative90.9%
associate-/r/90.0%
Simplified90.0%
associate-/l*93.8%
div-inv93.8%
Applied egg-rr93.8%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(/ z b)
(if (or (<= t_1 -1e-308) (and (not (<= t_1 0.0)) (<= t_1 1e+283)))
t_1
(/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z / b;
} else if ((t_1 <= -1e-308) || (!(t_1 <= 0.0) && (t_1 <= 1e+283))) {
tmp = t_1;
} 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)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z / b;
} else if ((t_1 <= -1e-308) || (!(t_1 <= 0.0) && (t_1 <= 1e+283))) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_1 <= -math.inf: tmp = z / b elif (t_1 <= -1e-308) or (not (t_1 <= 0.0) and (t_1 <= 1e+283)): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z / b); elseif ((t_1 <= -1e-308) || (!(t_1 <= 0.0) && (t_1 <= 1e+283))) 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 + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -Inf) tmp = z / b; elseif ((t_1 <= -1e-308) || (~((t_1 <= 0.0)) && (t_1 <= 1e+283))) tmp = t_1; else tmp = z / b; 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] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z / b), $MachinePrecision], If[Or[LessEqual[t$95$1, -1e-308], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 1e+283]]], t$95$1, N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 10^{+283}:\\
\;\;\;\;t_1\\
\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.0 or -9.9999999999999991e-309 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0 or 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 32.9%
*-commutative32.9%
associate-*l/40.4%
*-commutative40.4%
associate-*l/49.6%
Simplified49.6%
Taylor expanded in t around 0 72.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999991e-309 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282Initial program 99.2%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) a)))
(if (<= (+ a 1.0) -500000000.0)
t_1
(if (<= (+ a 1.0) 1.05)
(/ x (+ 1.0 (* b (/ y t))))
(if (<= (+ a 1.0) 1e+72)
t_1
(if (<= (+ a 1.0) 5e+94) (/ z b) (/ (+ x (/ z (/ t y))) a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / a;
double tmp;
if ((a + 1.0) <= -500000000.0) {
tmp = t_1;
} else if ((a + 1.0) <= 1.05) {
tmp = x / (1.0 + (b * (y / t)));
} else if ((a + 1.0) <= 1e+72) {
tmp = t_1;
} else if ((a + 1.0) <= 5e+94) {
tmp = z / b;
} else {
tmp = (x + (z / (t / y))) / 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 / (t / z))) / a
if ((a + 1.0d0) <= (-500000000.0d0)) then
tmp = t_1
else if ((a + 1.0d0) <= 1.05d0) then
tmp = x / (1.0d0 + (b * (y / t)))
else if ((a + 1.0d0) <= 1d+72) then
tmp = t_1
else if ((a + 1.0d0) <= 5d+94) then
tmp = z / b
else
tmp = (x + (z / (t / y))) / 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 / (t / z))) / a;
double tmp;
if ((a + 1.0) <= -500000000.0) {
tmp = t_1;
} else if ((a + 1.0) <= 1.05) {
tmp = x / (1.0 + (b * (y / t)));
} else if ((a + 1.0) <= 1e+72) {
tmp = t_1;
} else if ((a + 1.0) <= 5e+94) {
tmp = z / b;
} else {
tmp = (x + (z / (t / y))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y / (t / z))) / a tmp = 0 if (a + 1.0) <= -500000000.0: tmp = t_1 elif (a + 1.0) <= 1.05: tmp = x / (1.0 + (b * (y / t))) elif (a + 1.0) <= 1e+72: tmp = t_1 elif (a + 1.0) <= 5e+94: tmp = z / b else: tmp = (x + (z / (t / y))) / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / a) tmp = 0.0 if (Float64(a + 1.0) <= -500000000.0) tmp = t_1; elseif (Float64(a + 1.0) <= 1.05) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); elseif (Float64(a + 1.0) <= 1e+72) tmp = t_1; elseif (Float64(a + 1.0) <= 5e+94) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y / (t / z))) / a; tmp = 0.0; if ((a + 1.0) <= -500000000.0) tmp = t_1; elseif ((a + 1.0) <= 1.05) tmp = x / (1.0 + (b * (y / t))); elseif ((a + 1.0) <= 1e+72) tmp = t_1; elseif ((a + 1.0) <= 5e+94) tmp = z / b; else tmp = (x + (z / (t / y))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[N[(a + 1.0), $MachinePrecision], -500000000.0], t$95$1, If[LessEqual[N[(a + 1.0), $MachinePrecision], 1.05], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 1e+72], t$95$1, If[LessEqual[N[(a + 1.0), $MachinePrecision], 5e+94], N[(z / b), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\mathbf{if}\;a + 1 \leq -500000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a + 1 \leq 1.05:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;a + 1 \leq 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a + 1 \leq 5 \cdot 10^{+94}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a}\\
\end{array}
\end{array}
if (+.f64 a 1) < -5e8 or 1.05000000000000004 < (+.f64 a 1) < 9.99999999999999944e71Initial program 84.8%
*-commutative84.8%
associate-*l/84.8%
*-commutative84.8%
associate-*l/83.6%
Simplified83.6%
associate-*l/83.6%
*-commutative83.6%
associate-/l*84.9%
Applied egg-rr84.9%
Taylor expanded in a around inf 66.3%
if -5e8 < (+.f64 a 1) < 1.05000000000000004Initial program 75.3%
*-commutative75.3%
associate-*l/74.1%
*-commutative74.1%
associate-*l/72.5%
Simplified72.5%
Taylor expanded in x around inf 57.8%
div-inv57.7%
*-commutative57.7%
*-commutative57.7%
Applied egg-rr57.7%
Taylor expanded in a around 0 56.3%
*-rgt-identity56.3%
associate-*r*56.3%
*-commutative56.3%
associate-*r/56.3%
*-commutative56.3%
associate-*l*57.1%
associate-*r/57.1%
*-rgt-identity57.1%
Simplified57.1%
if 9.99999999999999944e71 < (+.f64 a 1) < 5.0000000000000001e94Initial program 43.3%
*-commutative43.3%
associate-*l/43.3%
*-commutative43.3%
associate-*l/5.0%
Simplified5.0%
Taylor expanded in t around 0 61.3%
if 5.0000000000000001e94 < (+.f64 a 1) Initial program 75.9%
*-commutative75.9%
associate-/l*75.7%
associate-*l/83.7%
*-commutative83.7%
cancel-sign-sub83.7%
*-commutative83.7%
associate-*l/75.7%
associate-+r-75.7%
associate-*l/83.7%
*-commutative83.7%
cancel-sign-sub83.7%
*-commutative83.7%
associate-/r/81.7%
Simplified81.7%
associate-/l*75.7%
div-inv75.7%
Applied egg-rr75.7%
Taylor expanded in a around inf 77.8%
Final simplification63.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5e-179) (not (<= t 6.8e-126))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5e-179) || !(t <= 6.8e-126)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (y * z) / ((y * b) + (t * (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 ((t <= (-5d-179)) .or. (.not. (t <= 6.8d-126))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (y * z) / ((y * b) + (t * (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 ((t <= -5e-179) || !(t <= 6.8e-126)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5e-179) or not (t <= 6.8e-126): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5e-179) || !(t <= 6.8e-126)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5e-179) || ~((t <= 6.8e-126))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5e-179], N[Not[LessEqual[t, 6.8e-126]], $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[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-179} \lor \neg \left(t \leq 6.8 \cdot 10^{-126}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -4.9999999999999998e-179 or 6.8e-126 < t Initial program 84.5%
*-commutative84.5%
associate-*l/86.3%
*-commutative86.3%
associate-*l/88.3%
Simplified88.3%
if -4.9999999999999998e-179 < t < 6.8e-126Initial program 59.6%
*-commutative59.6%
associate-*l/51.4%
*-commutative51.4%
associate-*l/43.2%
Simplified43.2%
Taylor expanded in x around 0 45.5%
Taylor expanded in t around 0 62.1%
Final simplification81.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* y (/ b t)))))
(if (<= t -4.2e-181)
(/ (+ x (/ y (/ t z))) t_1)
(if (<= t 8.5e-127)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (* y (/ z t))) 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 tmp;
if (t <= -4.2e-181) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= 8.5e-127) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / 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 = (a + 1.0d0) + (y * (b / t))
if (t <= (-4.2d-181)) then
tmp = (x + (y / (t / z))) / t_1
else if (t <= 8.5d-127) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y * (z / t))) / 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 tmp;
if (t <= -4.2e-181) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= 8.5e-127) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (y * (b / t)) tmp = 0 if t <= -4.2e-181: tmp = (x + (y / (t / z))) / t_1 elif t <= 8.5e-127: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y * (z / t))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))) tmp = 0.0 if (t <= -4.2e-181) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); elseif (t <= 8.5e-127) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (y * (b / t)); tmp = 0.0; if (t <= -4.2e-181) tmp = (x + (y / (t / z))) / t_1; elseif (t <= 8.5e-127) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y * (z / t))) / 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]}, If[LessEqual[t, -4.2e-181], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 8.5e-127], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + y \cdot \frac{b}{t}\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{-181}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t_1}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t_1}\\
\end{array}
\end{array}
if t < -4.20000000000000006e-181Initial program 86.2%
*-commutative86.2%
associate-*l/87.2%
*-commutative87.2%
associate-*l/86.2%
Simplified86.2%
associate-*l/85.2%
*-commutative85.2%
associate-/l*87.2%
Applied egg-rr87.2%
if -4.20000000000000006e-181 < t < 8.5e-127Initial program 59.6%
*-commutative59.6%
associate-*l/51.4%
*-commutative51.4%
associate-*l/43.2%
Simplified43.2%
Taylor expanded in x around 0 45.5%
Taylor expanded in t around 0 62.1%
if 8.5e-127 < t Initial program 82.5%
*-commutative82.5%
associate-*l/85.3%
*-commutative85.3%
associate-*l/90.7%
Simplified90.7%
Final simplification81.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.8e-235)
(/ (+ x (/ z (/ t y))) (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t 2.9e-130)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.8e-235) {
tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
} else if (t <= 2.9e-130) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / ((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) :: tmp
if (t <= (-2.8d-235)) then
tmp = (x + (z / (t / y))) / (a + (1.0d0 + (y / (t / b))))
else if (t <= 2.9d-130) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y * (z / t))) / ((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 tmp;
if (t <= -2.8e-235) {
tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
} else if (t <= 2.9e-130) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.8e-235: tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))) elif t <= 2.9e-130: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.8e-235) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t <= 2.9e-130) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.8e-235) tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))); elseif (t <= 2.9e-130) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.8e-235], 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], If[LessEqual[t, 2.9e-130], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-235}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-130}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -2.79999999999999995e-235Initial program 83.5%
*-commutative83.5%
associate-/l*84.4%
associate-*l/84.1%
*-commutative84.1%
cancel-sign-sub84.1%
*-commutative84.1%
associate-*l/84.4%
associate-+r-84.4%
associate-*l/84.1%
*-commutative84.1%
cancel-sign-sub84.1%
*-commutative84.1%
associate-/r/84.1%
Simplified84.1%
if -2.79999999999999995e-235 < t < 2.9e-130Initial program 58.4%
*-commutative58.4%
associate-*l/49.8%
*-commutative49.8%
associate-*l/41.3%
Simplified41.3%
Taylor expanded in x around 0 45.8%
Taylor expanded in t around 0 63.0%
if 2.9e-130 < t Initial program 82.5%
*-commutative82.5%
associate-*l/85.3%
*-commutative85.3%
associate-*l/90.7%
Simplified90.7%
Final simplification81.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (+ a (/ (* y b) t))))))
(if (<= y -1.45e+21)
(/ z b)
(if (<= y 9e-187)
t_1
(if (<= y 6.4e-156)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 7e+105) t_1 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (a + ((y * b) / t)));
double tmp;
if (y <= -1.45e+21) {
tmp = z / b;
} else if (y <= 9e-187) {
tmp = t_1;
} else if (y <= 6.4e-156) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 7e+105) {
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 / (1.0d0 + (a + ((y * b) / t)))
if (y <= (-1.45d+21)) then
tmp = z / b
else if (y <= 9d-187) then
tmp = t_1
else if (y <= 6.4d-156) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 7d+105) 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 / (1.0 + (a + ((y * b) / t)));
double tmp;
if (y <= -1.45e+21) {
tmp = z / b;
} else if (y <= 9e-187) {
tmp = t_1;
} else if (y <= 6.4e-156) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 7e+105) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + (a + ((y * b) / t))) tmp = 0 if y <= -1.45e+21: tmp = z / b elif y <= 9e-187: tmp = t_1 elif y <= 6.4e-156: tmp = (y / t) * (z / (a + 1.0)) elif y <= 7e+105: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))) tmp = 0.0 if (y <= -1.45e+21) tmp = Float64(z / b); elseif (y <= 9e-187) tmp = t_1; elseif (y <= 6.4e-156) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 7e+105) 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 / (1.0 + (a + ((y * b) / t))); tmp = 0.0; if (y <= -1.45e+21) tmp = z / b; elseif (y <= 9e-187) tmp = t_1; elseif (y <= 6.4e-156) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 7e+105) 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[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e+21], N[(z / b), $MachinePrecision], If[LessEqual[y, 9e-187], t$95$1, If[LessEqual[y, 6.4e-156], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+105], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+21}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-187}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-156}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+105}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.45e21 or 6.99999999999999982e105 < y Initial program 45.1%
*-commutative45.1%
associate-*l/51.8%
*-commutative51.8%
associate-*l/60.2%
Simplified60.2%
Taylor expanded in t around 0 62.2%
if -1.45e21 < y < 8.9999999999999996e-187 or 6.39999999999999964e-156 < y < 6.99999999999999982e105Initial program 92.0%
*-commutative92.0%
associate-*l/89.2%
*-commutative89.2%
associate-*l/84.2%
Simplified84.2%
Taylor expanded in x around inf 69.5%
if 8.9999999999999996e-187 < y < 6.39999999999999964e-156Initial program 99.4%
*-commutative99.4%
associate-*l/42.5%
*-commutative42.5%
associate-*l/42.5%
Simplified42.5%
Taylor expanded in x around 0 95.8%
times-frac95.8%
+-commutative95.8%
+-commutative95.8%
associate-*l/95.8%
*-commutative95.8%
+-commutative95.8%
associate-+r+95.8%
fma-udef95.8%
Simplified95.8%
Taylor expanded in y around 0 95.8%
Final simplification67.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ a 1.0) -500000000.0) (not (<= (+ a 1.0) 1.05))) (/ (+ x (* y (/ z t))) a) (/ x (+ 1.0 (* b (/ y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a + 1.0) <= -500000000.0) || !((a + 1.0) <= 1.05)) {
tmp = (x + (y * (z / t))) / a;
} else {
tmp = x / (1.0 + (b * (y / 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 (((a + 1.0d0) <= (-500000000.0d0)) .or. (.not. ((a + 1.0d0) <= 1.05d0))) then
tmp = (x + (y * (z / t))) / a
else
tmp = x / (1.0d0 + (b * (y / 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 (((a + 1.0) <= -500000000.0) || !((a + 1.0) <= 1.05)) {
tmp = (x + (y * (z / t))) / a;
} else {
tmp = x / (1.0 + (b * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a + 1.0) <= -500000000.0) or not ((a + 1.0) <= 1.05): tmp = (x + (y * (z / t))) / a else: tmp = x / (1.0 + (b * (y / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a + 1.0) <= -500000000.0) || !(Float64(a + 1.0) <= 1.05)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); else tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a + 1.0) <= -500000000.0) || ~(((a + 1.0) <= 1.05))) tmp = (x + (y * (z / t))) / a; else tmp = x / (1.0 + (b * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a + 1.0), $MachinePrecision], -500000000.0], N[Not[LessEqual[N[(a + 1.0), $MachinePrecision], 1.05]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -500000000 \lor \neg \left(a + 1 \leq 1.05\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if (+.f64 a 1) < -5e8 or 1.05000000000000004 < (+.f64 a 1) Initial program 80.0%
*-commutative80.0%
associate-*l/79.2%
*-commutative79.2%
associate-*l/79.2%
Simplified79.2%
Taylor expanded in a around inf 65.8%
if -5e8 < (+.f64 a 1) < 1.05000000000000004Initial program 75.3%
*-commutative75.3%
associate-*l/74.1%
*-commutative74.1%
associate-*l/72.5%
Simplified72.5%
Taylor expanded in x around inf 57.8%
div-inv57.7%
*-commutative57.7%
*-commutative57.7%
Applied egg-rr57.7%
Taylor expanded in a around 0 56.3%
*-rgt-identity56.3%
associate-*r*56.3%
*-commutative56.3%
associate-*r/56.3%
*-commutative56.3%
associate-*l*57.1%
associate-*r/57.1%
*-rgt-identity57.1%
Simplified57.1%
Final simplification61.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ a 1.0) -500000000.0) (not (<= (+ a 1.0) 1.05))) (/ (+ x (/ y (/ t z))) a) (/ x (+ 1.0 (* b (/ y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a + 1.0) <= -500000000.0) || !((a + 1.0) <= 1.05)) {
tmp = (x + (y / (t / z))) / a;
} else {
tmp = x / (1.0 + (b * (y / 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 (((a + 1.0d0) <= (-500000000.0d0)) .or. (.not. ((a + 1.0d0) <= 1.05d0))) then
tmp = (x + (y / (t / z))) / a
else
tmp = x / (1.0d0 + (b * (y / 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 (((a + 1.0) <= -500000000.0) || !((a + 1.0) <= 1.05)) {
tmp = (x + (y / (t / z))) / a;
} else {
tmp = x / (1.0 + (b * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a + 1.0) <= -500000000.0) or not ((a + 1.0) <= 1.05): tmp = (x + (y / (t / z))) / a else: tmp = x / (1.0 + (b * (y / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a + 1.0) <= -500000000.0) || !(Float64(a + 1.0) <= 1.05)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); else tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a + 1.0) <= -500000000.0) || ~(((a + 1.0) <= 1.05))) tmp = (x + (y / (t / z))) / a; else tmp = x / (1.0 + (b * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a + 1.0), $MachinePrecision], -500000000.0], N[Not[LessEqual[N[(a + 1.0), $MachinePrecision], 1.05]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -500000000 \lor \neg \left(a + 1 \leq 1.05\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if (+.f64 a 1) < -5e8 or 1.05000000000000004 < (+.f64 a 1) Initial program 80.0%
*-commutative80.0%
associate-*l/79.2%
*-commutative79.2%
associate-*l/79.2%
Simplified79.2%
associate-*l/78.5%
*-commutative78.5%
associate-/l*80.1%
Applied egg-rr80.1%
Taylor expanded in a around inf 66.6%
if -5e8 < (+.f64 a 1) < 1.05000000000000004Initial program 75.3%
*-commutative75.3%
associate-*l/74.1%
*-commutative74.1%
associate-*l/72.5%
Simplified72.5%
Taylor expanded in x around inf 57.8%
div-inv57.7%
*-commutative57.7%
*-commutative57.7%
Applied egg-rr57.7%
Taylor expanded in a around 0 56.3%
*-rgt-identity56.3%
associate-*r*56.3%
*-commutative56.3%
associate-*r/56.3%
*-commutative56.3%
associate-*l*57.1%
associate-*r/57.1%
*-rgt-identity57.1%
Simplified57.1%
Final simplification62.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= y -1.1e+20)
(/ z b)
(if (<= y 9e-187)
t_1
(if (<= y 4e-148)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 9e+71) 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 (y <= -1.1e+20) {
tmp = z / b;
} else if (y <= 9e-187) {
tmp = t_1;
} else if (y <= 4e-148) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 9e+71) {
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 (y <= (-1.1d+20)) then
tmp = z / b
else if (y <= 9d-187) then
tmp = t_1
else if (y <= 4d-148) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 9d+71) 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 (y <= -1.1e+20) {
tmp = z / b;
} else if (y <= 9e-187) {
tmp = t_1;
} else if (y <= 4e-148) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 9e+71) {
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 y <= -1.1e+20: tmp = z / b elif y <= 9e-187: tmp = t_1 elif y <= 4e-148: tmp = (y / t) * (z / (a + 1.0)) elif y <= 9e+71: 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 (y <= -1.1e+20) tmp = Float64(z / b); elseif (y <= 9e-187) tmp = t_1; elseif (y <= 4e-148) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 9e+71) 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 (y <= -1.1e+20) tmp = z / b; elseif (y <= 9e-187) tmp = t_1; elseif (y <= 4e-148) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 9e+71) 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[y, -1.1e+20], N[(z / b), $MachinePrecision], If[LessEqual[y, 9e-187], t$95$1, If[LessEqual[y, 4e-148], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+71], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+20}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-187}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-148}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.1e20 or 9.00000000000000087e71 < y Initial program 48.7%
*-commutative48.7%
associate-*l/55.5%
*-commutative55.5%
associate-*l/63.7%
Simplified63.7%
Taylor expanded in t around 0 59.1%
if -1.1e20 < y < 8.9999999999999996e-187 or 3.99999999999999974e-148 < y < 9.00000000000000087e71Initial program 93.7%
*-commutative93.7%
associate-*l/90.0%
*-commutative90.0%
associate-*l/84.5%
Simplified84.5%
Taylor expanded in t around inf 60.9%
if 8.9999999999999996e-187 < y < 3.99999999999999974e-148Initial program 99.1%
*-commutative99.1%
associate-*l/58.7%
*-commutative58.7%
associate-*l/45.0%
Simplified45.0%
Taylor expanded in x around 0 82.8%
times-frac83.1%
+-commutative83.1%
+-commutative83.1%
associate-*l/83.1%
*-commutative83.1%
+-commutative83.1%
associate-+r+83.1%
fma-udef83.1%
Simplified83.1%
Taylor expanded in y around 0 83.0%
Final simplification60.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.5e-33) (not (<= z 1.15e-112))) (/ (+ x (* y (/ z t))) (+ a 1.0)) (/ x (+ 1.0 (+ a (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.5e-33) || !(z <= 1.15e-112)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} 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 ((z <= (-5.5d-33)) .or. (.not. (z <= 1.15d-112))) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
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 ((z <= -5.5e-33) || !(z <= 1.15e-112)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.5e-33) or not (z <= 1.15e-112): tmp = (x + (y * (z / t))) / (a + 1.0) else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.5e-33) || !(z <= 1.15e-112)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); 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 ((z <= -5.5e-33) || ~((z <= 1.15e-112))) tmp = (x + (y * (z / t))) / (a + 1.0); else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.5e-33], N[Not[LessEqual[z, 1.15e-112]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $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}\;z \leq -5.5 \cdot 10^{-33} \lor \neg \left(z \leq 1.15 \cdot 10^{-112}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if z < -5.5e-33 or 1.14999999999999995e-112 < z Initial program 70.6%
*-commutative70.6%
associate-*l/68.6%
*-commutative68.6%
associate-*l/71.8%
Simplified71.8%
Taylor expanded in b around 0 61.0%
if -5.5e-33 < z < 1.14999999999999995e-112Initial program 88.1%
*-commutative88.1%
associate-*l/88.6%
*-commutative88.6%
associate-*l/82.1%
Simplified82.1%
Taylor expanded in x around inf 82.4%
Final simplification69.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.2e-32) (not (<= z 8.8e-99))) (/ (+ x (/ y (/ t z))) (+ a 1.0)) (/ x (+ 1.0 (+ a (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.2e-32) || !(z <= 8.8e-99)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} 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 ((z <= (-1.2d-32)) .or. (.not. (z <= 8.8d-99))) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
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 ((z <= -1.2e-32) || !(z <= 8.8e-99)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.2e-32) or not (z <= 8.8e-99): tmp = (x + (y / (t / z))) / (a + 1.0) else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.2e-32) || !(z <= 8.8e-99)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); 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 ((z <= -1.2e-32) || ~((z <= 8.8e-99))) tmp = (x + (y / (t / z))) / (a + 1.0); else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.2e-32], N[Not[LessEqual[z, 8.8e-99]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $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}\;z \leq -1.2 \cdot 10^{-32} \lor \neg \left(z \leq 8.8 \cdot 10^{-99}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if z < -1.2000000000000001e-32 or 8.80000000000000018e-99 < z Initial program 70.6%
*-commutative70.6%
associate-*l/68.6%
*-commutative68.6%
associate-*l/71.8%
Simplified71.8%
associate-*l/71.2%
*-commutative71.2%
associate-/l*73.4%
Applied egg-rr73.4%
Taylor expanded in b around 0 61.7%
if -1.2000000000000001e-32 < z < 8.80000000000000018e-99Initial program 88.1%
*-commutative88.1%
associate-*l/88.6%
*-commutative88.6%
associate-*l/82.1%
Simplified82.1%
Taylor expanded in x around inf 82.4%
Final simplification70.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.4e-34)
(/ (+ x (/ y (/ t z))) (+ a 1.0))
(if (<= z 1.15e-102)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(/ (+ x (/ z (/ t y))) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.4e-34) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (z <= 1.15e-102) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (x + (z / (t / y))) / (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 (z <= (-3.4d-34)) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else if (z <= 1.15d-102) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = (x + (z / (t / y))) / (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 (z <= -3.4e-34) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (z <= 1.15e-102) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (x + (z / (t / y))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.4e-34: tmp = (x + (y / (t / z))) / (a + 1.0) elif z <= 1.15e-102: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = (x + (z / (t / y))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.4e-34) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); elseif (z <= 1.15e-102) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.4e-34) tmp = (x + (y / (t / z))) / (a + 1.0); elseif (z <= 1.15e-102) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = (x + (z / (t / y))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.4e-34], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e-102], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-34}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-102}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\end{array}
\end{array}
if z < -3.4000000000000001e-34Initial program 68.2%
*-commutative68.2%
associate-*l/69.6%
*-commutative69.6%
associate-*l/75.4%
Simplified75.4%
associate-*l/69.7%
*-commutative69.7%
associate-/l*76.4%
Applied egg-rr76.4%
Taylor expanded in b around 0 63.7%
if -3.4000000000000001e-34 < z < 1.14999999999999993e-102Initial program 88.1%
*-commutative88.1%
associate-*l/88.6%
*-commutative88.6%
associate-*l/82.1%
Simplified82.1%
Taylor expanded in x around inf 82.4%
if 1.14999999999999993e-102 < z Initial program 72.4%
*-commutative72.4%
associate-/l*75.8%
associate-*l/73.2%
*-commutative73.2%
cancel-sign-sub73.2%
*-commutative73.2%
associate-*l/75.8%
associate-+r-75.8%
associate-*l/73.2%
*-commutative73.2%
cancel-sign-sub73.2%
*-commutative73.2%
associate-/r/75.8%
Simplified75.8%
associate-/l*75.8%
div-inv75.8%
Applied egg-rr75.8%
Taylor expanded in y around 0 64.7%
Final simplification71.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9e+20) (not (<= y 8.5e+71))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9e+20) || !(y <= 8.5e+71)) {
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 <= (-9d+20)) .or. (.not. (y <= 8.5d+71))) 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 <= -9e+20) || !(y <= 8.5e+71)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9e+20) or not (y <= 8.5e+71): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9e+20) || !(y <= 8.5e+71)) 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 <= -9e+20) || ~((y <= 8.5e+71))) 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, -9e+20], N[Not[LessEqual[y, 8.5e+71]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+20} \lor \neg \left(y \leq 8.5 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -9e20 or 8.4999999999999996e71 < y Initial program 48.7%
*-commutative48.7%
associate-*l/55.5%
*-commutative55.5%
associate-*l/63.7%
Simplified63.7%
Taylor expanded in t around 0 59.1%
if -9e20 < y < 8.4999999999999996e71Initial program 93.9%
*-commutative93.9%
associate-*l/88.7%
*-commutative88.7%
associate-*l/82.8%
Simplified82.8%
Taylor expanded in t around inf 58.6%
Final simplification58.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.0) (/ x a) (if (<= a 0.057) x (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.0) {
tmp = x / a;
} else if (a <= 0.057) {
tmp = x;
} 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 <= (-1.0d0)) then
tmp = x / a
else if (a <= 0.057d0) then
tmp = x
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 <= -1.0) {
tmp = x / a;
} else if (a <= 0.057) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.0: tmp = x / a elif a <= 0.057: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.0) tmp = Float64(x / a); elseif (a <= 0.057) tmp = x; else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.0) tmp = x / a; elseif (a <= 0.057) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.0], N[(x / a), $MachinePrecision], If[LessEqual[a, 0.057], x, N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 0.057:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1 or 0.0570000000000000021 < a Initial program 80.0%
*-commutative80.0%
associate-*l/79.2%
*-commutative79.2%
associate-*l/79.2%
Simplified79.2%
Taylor expanded in x around inf 54.3%
Taylor expanded in a around inf 47.0%
if -1 < a < 0.0570000000000000021Initial program 75.3%
*-commutative75.3%
associate-*l/74.1%
*-commutative74.1%
associate-*l/72.5%
Simplified72.5%
Taylor expanded in a around 0 72.3%
Taylor expanded in t around inf 39.9%
Final simplification43.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -32500000000000.0) x (if (<= t 1.7e+65) (/ z b) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -32500000000000.0) {
tmp = x;
} else if (t <= 1.7e+65) {
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 (t <= (-32500000000000.0d0)) then
tmp = x
else if (t <= 1.7d+65) 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 (t <= -32500000000000.0) {
tmp = x;
} else if (t <= 1.7e+65) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -32500000000000.0: tmp = x elif t <= 1.7e+65: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -32500000000000.0) tmp = x; elseif (t <= 1.7e+65) 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 (t <= -32500000000000.0) tmp = x; elseif (t <= 1.7e+65) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -32500000000000.0], x, If[LessEqual[t, 1.7e+65], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -32500000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+65}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if t < -3.25e13Initial program 90.0%
*-commutative90.0%
associate-*l/96.5%
*-commutative96.5%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in a around 0 55.3%
Taylor expanded in t around inf 34.4%
if -3.25e13 < t < 1.7e65Initial program 70.1%
*-commutative70.1%
associate-*l/63.9%
*-commutative63.9%
associate-*l/58.5%
Simplified58.5%
Taylor expanded in t around 0 49.3%
if 1.7e65 < t Initial program 84.1%
*-commutative84.1%
associate-*l/88.6%
*-commutative88.6%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in x around inf 69.2%
Taylor expanded in a around inf 40.4%
Final simplification44.0%
(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 77.7%
*-commutative77.7%
associate-*l/76.7%
*-commutative76.7%
associate-*l/76.0%
Simplified76.0%
Taylor expanded in a around 0 45.4%
Taylor expanded in t around inf 21.4%
Final simplification21.4%
(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 2023275
(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))))