
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_2 (- INFINITY))
(/ (+ z (/ t (/ y x))) b)
(if (<= t_2 -5e-242)
t_2
(if (<= t_2 1e-240)
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))
(if (<= t_2 5e+255)
t_2
(if (<= t_2 INFINITY)
(* (/ y t) (/ z (+ 1.0 (fma y (/ b t) a))))
(- (/ z b) (* (/ a y) (* (/ z b) (/ t b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (z + (t / (y / x))) / b;
} else if (t_2 <= -5e-242) {
tmp = t_2;
} else if (t_2 <= 1e-240) {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= 5e+255) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (y / t) * (z / (1.0 + fma(y, (b / t), a)));
} else {
tmp = (z / b) - ((a / y) * ((z / b) * (t / b)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); elseif (t_2 <= -5e-242) tmp = t_2; elseif (t_2 <= 1e-240) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t_2 <= 5e+255) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + fma(y, Float64(b / t), a)))); else tmp = Float64(Float64(z / b) - Float64(Float64(a / y) * Float64(Float64(z / b) * Float64(t / b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$2, -5e-242], t$95$2, If[LessEqual[t$95$2, 1e-240], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+255], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] - N[(N[(a / y), $MachinePrecision] * N[(N[(z / b), $MachinePrecision] * N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-242}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 10^{-240}:\\
\;\;\;\;\frac{t_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+255}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} - \frac{a}{y} \cdot \left(\frac{z}{b} \cdot \frac{t}{b}\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 13.1%
*-commutative13.1%
associate-/l*38.9%
associate-*l/37.6%
Simplified37.6%
Taylor expanded in y around -inf 46.1%
+-commutative46.1%
associate-*r/46.1%
distribute-lft-out--46.1%
associate-*r*46.1%
metadata-eval46.1%
*-lft-identity46.1%
associate-/l*46.1%
associate-/l*55.2%
*-commutative55.2%
associate-/r*55.2%
unpow255.2%
Simplified55.2%
Taylor expanded in b around inf 64.8%
associate-*l/73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in b around 0 64.8%
+-commutative64.8%
associate-/l*73.5%
Simplified73.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999999999999998e-242 or 9.9999999999999997e-241 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000002e255Initial program 99.7%
if -4.9999999999999998e-242 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999997e-241Initial program 64.6%
associate-/l*76.4%
Simplified76.4%
div-inv76.4%
clear-num76.4%
Applied egg-rr76.4%
if 5.0000000000000002e255 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 16.5%
*-commutative16.5%
associate-/l*64.4%
associate-*l/57.8%
Simplified57.8%
Taylor expanded in x around 0 27.6%
times-frac87.2%
associate-*r/87.2%
fma-def87.2%
Simplified87.2%
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%
associate-*l/13.6%
Simplified13.6%
Taylor expanded in y around -inf 60.3%
+-commutative60.3%
associate-*r/60.3%
distribute-lft-out--60.3%
associate-*r*60.3%
metadata-eval60.3%
*-lft-identity60.3%
associate-/l*60.3%
associate-/l*67.0%
*-commutative67.0%
associate-/r*96.6%
unpow296.6%
Simplified96.6%
Taylor expanded in a around inf 76.7%
mul-1-neg76.7%
times-frac80.0%
distribute-lft-neg-in80.0%
associate-/l*96.6%
unpow296.6%
associate-*l/96.9%
associate-/r/96.9%
associate-/r/96.7%
Simplified96.7%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
(t_3 (/ (+ z (/ t (/ y x))) b)))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -5e-242)
t_2
(if (<= t_2 1e-240)
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))
(if (<= t_2 5e+255) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_3 = (z + (t / (y / x))) / b;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -5e-242) {
tmp = t_2;
} else if (t_2 <= 1e-240) {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= 5e+255) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_3 = (z + (t / (y / x))) / b;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= -5e-242) {
tmp = t_2;
} else if (t_2 <= 1e-240) {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= 5e+255) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / ((a + 1.0) + ((y * b) / t)) t_3 = (z + (t / (y / x))) / b tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= -5e-242: tmp = t_2 elif t_2 <= 1e-240: tmp = t_1 / ((a + 1.0) + (y * (b / t))) elif t_2 <= 5e+255: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_3 = Float64(Float64(z + Float64(t / Float64(y / x))) / b) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -5e-242) tmp = t_2; elseif (t_2 <= 1e-240) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t_2 <= 5e+255) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / ((a + 1.0) + ((y * b) / t)); t_3 = (z + (t / (y / x))) / b; tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= -5e-242) tmp = t_2; elseif (t_2 <= 1e-240) tmp = t_1 / ((a + 1.0) + (y * (b / t))); elseif (t_2 <= 5e+255) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -5e-242], t$95$2, If[LessEqual[t$95$2, 1e-240], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+255], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_3 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-242}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 10^{-240}:\\
\;\;\;\;\frac{t_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+255}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\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 5.0000000000000002e255 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 7.2%
*-commutative7.2%
associate-/l*25.9%
associate-*l/30.6%
Simplified30.6%
Taylor expanded in y around -inf 44.4%
+-commutative44.4%
associate-*r/44.4%
distribute-lft-out--44.4%
associate-*r*44.4%
metadata-eval44.4%
*-lft-identity44.4%
associate-/l*44.4%
associate-/l*49.7%
*-commutative49.7%
associate-/r*65.3%
unpow265.3%
Simplified65.3%
Taylor expanded in b around inf 72.9%
associate-*l/74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in b around 0 73.0%
+-commutative73.0%
associate-/l*76.3%
Simplified76.3%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999999999999998e-242 or 9.9999999999999997e-241 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000002e255Initial program 99.7%
if -4.9999999999999998e-242 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999997e-241Initial program 64.6%
associate-/l*76.4%
Simplified76.4%
div-inv76.4%
clear-num76.4%
Applied egg-rr76.4%
Final simplification90.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* b (/ y t)))))
(if (<= t -1.02e-143)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t 1.22e-216)
(/ (+ z (/ (* x t) y)) b)
(if (<= t 3.6e-69)
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 5.8e-27)
(/ (+ z (/ t (/ y x))) b)
(/ (+ x (/ y (/ t z))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (b * (y / t));
double tmp;
if (t <= -1.02e-143) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t <= 1.22e-216) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 3.6e-69) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b)));
} else if (t <= 5.8e-27) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (a + 1.0d0) + (b * (y / t))
if (t <= (-1.02d-143)) then
tmp = (x + (z * (y / t))) / t_1
else if (t <= 1.22d-216) then
tmp = (z + ((x * t) / y)) / b
else if (t <= 3.6d-69) then
tmp = (x + ((y * z) / t)) / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 5.8d-27) then
tmp = (z + (t / (y / x))) / b
else
tmp = (x + (y / (t / z))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (b * (y / t));
double tmp;
if (t <= -1.02e-143) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t <= 1.22e-216) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 3.6e-69) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b)));
} else if (t <= 5.8e-27) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (b * (y / t)) tmp = 0 if t <= -1.02e-143: tmp = (x + (z * (y / t))) / t_1 elif t <= 1.22e-216: tmp = (z + ((x * t) / y)) / b elif t <= 3.6e-69: tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b))) elif t <= 5.8e-27: tmp = (z + (t / (y / x))) / b else: tmp = (x + (y / (t / z))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))) tmp = 0.0 if (t <= -1.02e-143) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t <= 1.22e-216) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t <= 3.6e-69) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 5.8e-27) tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (b * (y / t)); tmp = 0.0; if (t <= -1.02e-143) tmp = (x + (z * (y / t))) / t_1; elseif (t <= 1.22e-216) tmp = (z + ((x * t) / y)) / b; elseif (t <= 3.6e-69) tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b))); elseif (t <= 5.8e-27) tmp = (z + (t / (y / x))) / b; else tmp = (x + (y / (t / z))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.02e-143], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 1.22e-216], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, 3.6e-69], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e-27], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + b \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -1.02 \cdot 10^{-143}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-216}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-69}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-27}:\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t_1}\\
\end{array}
\end{array}
if t < -1.02e-143Initial program 79.4%
*-commutative79.4%
associate-/l*83.3%
associate-*l/88.1%
Simplified88.1%
Taylor expanded in z around 0 80.3%
associate-*l/88.1%
*-commutative88.1%
Simplified88.1%
if -1.02e-143 < t < 1.2200000000000001e-216Initial program 46.7%
*-commutative46.7%
associate-/l*40.0%
associate-*l/35.9%
Simplified35.9%
Taylor expanded in y around -inf 63.0%
+-commutative63.0%
associate-*r/63.0%
distribute-lft-out--63.0%
associate-*r*63.0%
metadata-eval63.0%
*-lft-identity63.0%
associate-/l*61.0%
associate-/l*61.1%
*-commutative61.1%
associate-/r*71.3%
unpow271.3%
Simplified71.3%
Taylor expanded in b around inf 79.8%
associate-*l/75.3%
*-commutative75.3%
Simplified75.3%
Taylor expanded in b around 0 79.9%
if 1.2200000000000001e-216 < t < 3.60000000000000018e-69Initial program 77.8%
associate-/l*73.2%
Simplified73.2%
if 3.60000000000000018e-69 < t < 5.80000000000000008e-27Initial program 34.2%
*-commutative34.2%
associate-/l*34.2%
associate-*l/33.9%
Simplified33.9%
Taylor expanded in y around -inf 67.9%
+-commutative67.9%
associate-*r/67.9%
distribute-lft-out--67.9%
associate-*r*67.9%
metadata-eval67.9%
*-lft-identity67.9%
associate-/l*67.9%
associate-/l*67.9%
*-commutative67.9%
associate-/r*84.5%
unpow284.5%
Simplified84.5%
Taylor expanded in b around inf 100.0%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 100.0%
+-commutative100.0%
associate-/l*100.0%
Simplified100.0%
if 5.80000000000000008e-27 < t Initial program 84.4%
*-commutative84.4%
associate-/l*88.0%
associate-*l/92.7%
Simplified92.7%
associate-/r/93.9%
Applied egg-rr93.9%
associate-*l/88.0%
*-commutative88.0%
associate-/l*93.9%
Applied egg-rr93.9%
Final simplification87.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1e-141) (not (<= t 4.2e-27))) (/ (+ x (* z (/ y t))) (+ (+ a 1.0) (* b (/ y t)))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1e-141) || !(t <= 4.2e-27)) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (z + ((x * t) / y)) / 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 <= (-1d-141)) .or. (.not. (t <= 4.2d-27))) then
tmp = (x + (z * (y / t))) / ((a + 1.0d0) + (b * (y / t)))
else
tmp = (z + ((x * t) / y)) / 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 <= -1e-141) || !(t <= 4.2e-27)) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1e-141) or not (t <= 4.2e-27): tmp = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1e-141) || !(t <= 4.2e-27)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1e-141) || ~((t <= 4.2e-27))) tmp = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1e-141], N[Not[LessEqual[t, 4.2e-27]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-141} \lor \neg \left(t \leq 4.2 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -1e-141 or 4.20000000000000031e-27 < t Initial program 81.6%
*-commutative81.6%
associate-/l*85.4%
associate-*l/90.2%
Simplified90.2%
Taylor expanded in z around 0 83.8%
associate-*l/90.1%
*-commutative90.1%
Simplified90.1%
if -1e-141 < t < 4.20000000000000031e-27Initial program 54.7%
*-commutative54.7%
associate-/l*47.9%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in y around -inf 57.3%
+-commutative57.3%
associate-*r/57.3%
distribute-lft-out--57.3%
associate-*r*57.3%
metadata-eval57.3%
*-lft-identity57.3%
associate-/l*54.7%
associate-/l*54.8%
*-commutative54.8%
associate-/r*62.6%
unpow262.6%
Simplified62.6%
Taylor expanded in b around inf 73.2%
associate-*l/69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in b around 0 73.2%
Final simplification85.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* b (/ y t)))))
(if (<= t -4.7e-142)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t 4.2e-27)
(/ (+ z (/ (* x t) y)) b)
(/ (+ 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) + (b * (y / t));
double tmp;
if (t <= -4.7e-142) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t <= 4.2e-27) {
tmp = (z + ((x * t) / y)) / b;
} 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) + (b * (y / t))
if (t <= (-4.7d-142)) then
tmp = (x + (z * (y / t))) / t_1
else if (t <= 4.2d-27) then
tmp = (z + ((x * t) / y)) / b
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) + (b * (y / t));
double tmp;
if (t <= -4.7e-142) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t <= 4.2e-27) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + (y * (z / t))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (b * (y / t)) tmp = 0 if t <= -4.7e-142: tmp = (x + (z * (y / t))) / t_1 elif t <= 4.2e-27: tmp = (z + ((x * t) / y)) / b 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(b * Float64(y / t))) tmp = 0.0 if (t <= -4.7e-142) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t <= 4.2e-27) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); 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) + (b * (y / t)); tmp = 0.0; if (t <= -4.7e-142) tmp = (x + (z * (y / t))) / t_1; elseif (t <= 4.2e-27) tmp = (z + ((x * t) / y)) / b; 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[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.7e-142], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 4.2e-27], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $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) + b \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -4.7 \cdot 10^{-142}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-27}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t_1}\\
\end{array}
\end{array}
if t < -4.6999999999999999e-142Initial program 79.4%
*-commutative79.4%
associate-/l*83.3%
associate-*l/88.1%
Simplified88.1%
Taylor expanded in z around 0 80.3%
associate-*l/88.1%
*-commutative88.1%
Simplified88.1%
if -4.6999999999999999e-142 < t < 4.20000000000000031e-27Initial program 54.7%
*-commutative54.7%
associate-/l*47.9%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in y around -inf 57.3%
+-commutative57.3%
associate-*r/57.3%
distribute-lft-out--57.3%
associate-*r*57.3%
metadata-eval57.3%
*-lft-identity57.3%
associate-/l*54.7%
associate-/l*54.8%
*-commutative54.8%
associate-/r*62.6%
unpow262.6%
Simplified62.6%
Taylor expanded in b around inf 73.2%
associate-*l/69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in b around 0 73.2%
if 4.20000000000000031e-27 < t Initial program 84.4%
*-commutative84.4%
associate-/l*88.0%
associate-*l/92.7%
Simplified92.7%
associate-/r/93.9%
Applied egg-rr93.9%
Final simplification85.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* b (/ y t)))))
(if (<= t -1.15e-144)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t 5.8e-27)
(/ (+ z (/ (* x t) y)) b)
(/ (+ x (/ y (/ t z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (b * (y / t));
double tmp;
if (t <= -1.15e-144) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t <= 5.8e-27) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (a + 1.0d0) + (b * (y / t))
if (t <= (-1.15d-144)) then
tmp = (x + (z * (y / t))) / t_1
else if (t <= 5.8d-27) then
tmp = (z + ((x * t) / y)) / b
else
tmp = (x + (y / (t / z))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (b * (y / t));
double tmp;
if (t <= -1.15e-144) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t <= 5.8e-27) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (b * (y / t)) tmp = 0 if t <= -1.15e-144: tmp = (x + (z * (y / t))) / t_1 elif t <= 5.8e-27: tmp = (z + ((x * t) / y)) / b else: tmp = (x + (y / (t / z))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))) tmp = 0.0 if (t <= -1.15e-144) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t <= 5.8e-27) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (b * (y / t)); tmp = 0.0; if (t <= -1.15e-144) tmp = (x + (z * (y / t))) / t_1; elseif (t <= 5.8e-27) tmp = (z + ((x * t) / y)) / b; else tmp = (x + (y / (t / z))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e-144], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 5.8e-27], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + b \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{-144}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-27}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t_1}\\
\end{array}
\end{array}
if t < -1.15e-144Initial program 79.4%
*-commutative79.4%
associate-/l*83.3%
associate-*l/88.1%
Simplified88.1%
Taylor expanded in z around 0 80.3%
associate-*l/88.1%
*-commutative88.1%
Simplified88.1%
if -1.15e-144 < t < 5.80000000000000008e-27Initial program 54.7%
*-commutative54.7%
associate-/l*47.9%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in y around -inf 57.3%
+-commutative57.3%
associate-*r/57.3%
distribute-lft-out--57.3%
associate-*r*57.3%
metadata-eval57.3%
*-lft-identity57.3%
associate-/l*54.7%
associate-/l*54.8%
*-commutative54.8%
associate-/r*62.6%
unpow262.6%
Simplified62.6%
Taylor expanded in b around inf 73.2%
associate-*l/69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in b around 0 73.2%
if 5.80000000000000008e-27 < t Initial program 84.4%
*-commutative84.4%
associate-/l*88.0%
associate-*l/92.7%
Simplified92.7%
associate-/r/93.9%
Applied egg-rr93.9%
associate-*l/88.0%
*-commutative88.0%
associate-/l*93.9%
Applied egg-rr93.9%
Final simplification85.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -8.5e+94)
t_1
(if (<= t -8.8e-38)
(+ (/ z b) (/ (* x (/ t b)) y))
(if (<= t -9.8e-51)
t_1
(if (<= t -4.3e-67)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= t 4.1e+31) (/ (+ z (/ (* x t) y)) b) t_1)))))))
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 <= -8.5e+94) {
tmp = t_1;
} else if (t <= -8.8e-38) {
tmp = (z / b) + ((x * (t / b)) / y);
} else if (t <= -9.8e-51) {
tmp = t_1;
} else if (t <= -4.3e-67) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 4.1e+31) {
tmp = (z + ((x * t) / y)) / 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)
if (t <= (-8.5d+94)) then
tmp = t_1
else if (t <= (-8.8d-38)) then
tmp = (z / b) + ((x * (t / b)) / y)
else if (t <= (-9.8d-51)) then
tmp = t_1
else if (t <= (-4.3d-67)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (t <= 4.1d+31) then
tmp = (z + ((x * t) / y)) / 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);
double tmp;
if (t <= -8.5e+94) {
tmp = t_1;
} else if (t <= -8.8e-38) {
tmp = (z / b) + ((x * (t / b)) / y);
} else if (t <= -9.8e-51) {
tmp = t_1;
} else if (t <= -4.3e-67) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 4.1e+31) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -8.5e+94: tmp = t_1 elif t <= -8.8e-38: tmp = (z / b) + ((x * (t / b)) / y) elif t <= -9.8e-51: tmp = t_1 elif t <= -4.3e-67: tmp = (y / t) * (z / (a + 1.0)) elif t <= 4.1e+31: tmp = (z + ((x * t) / y)) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -8.5e+94) tmp = t_1; elseif (t <= -8.8e-38) tmp = Float64(Float64(z / b) + Float64(Float64(x * Float64(t / b)) / y)); elseif (t <= -9.8e-51) tmp = t_1; elseif (t <= -4.3e-67) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (t <= 4.1e+31) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / 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); tmp = 0.0; if (t <= -8.5e+94) tmp = t_1; elseif (t <= -8.8e-38) tmp = (z / b) + ((x * (t / b)) / y); elseif (t <= -9.8e-51) tmp = t_1; elseif (t <= -4.3e-67) tmp = (y / t) * (z / (a + 1.0)); elseif (t <= 4.1e+31) tmp = (z + ((x * t) / y)) / 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 + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+94], t$95$1, If[LessEqual[t, -8.8e-38], N[(N[(z / b), $MachinePrecision] + N[(N[(x * N[(t / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.8e-51], t$95$1, If[LessEqual[t, -4.3e-67], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e+31], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -8.8 \cdot 10^{-38}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot \frac{t}{b}}{y}\\
\mathbf{elif}\;t \leq -9.8 \cdot 10^{-51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.3 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+31}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -8.50000000000000054e94 or -8.80000000000000029e-38 < t < -9.79999999999999948e-51 or 4.1000000000000002e31 < t Initial program 81.9%
*-commutative81.9%
associate-/l*87.5%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in t around inf 70.1%
if -8.50000000000000054e94 < t < -8.80000000000000029e-38Initial program 80.7%
*-commutative80.7%
associate-/l*84.2%
associate-*l/87.6%
Simplified87.6%
Taylor expanded in y around -inf 37.2%
+-commutative37.2%
associate-*r/37.2%
distribute-lft-out--37.2%
associate-*r*37.2%
metadata-eval37.2%
*-lft-identity37.2%
associate-/l*41.0%
associate-/l*41.0%
*-commutative41.0%
associate-/r*44.8%
unpow244.8%
Simplified44.8%
Taylor expanded in b around inf 41.9%
associate-*l/45.7%
*-commutative45.7%
Simplified45.7%
if -9.79999999999999948e-51 < t < -4.30000000000000027e-67Initial program 99.1%
*-commutative99.1%
associate-/l*99.1%
associate-*l/99.4%
Simplified99.4%
Taylor expanded in x around 0 61.0%
Taylor expanded in y around 0 61.7%
times-frac62.1%
Simplified62.1%
if -4.30000000000000027e-67 < t < 4.1000000000000002e31Initial program 60.9%
*-commutative60.9%
associate-/l*54.9%
associate-*l/52.9%
Simplified52.9%
Taylor expanded in y around -inf 56.7%
+-commutative56.7%
associate-*r/56.7%
distribute-lft-out--56.7%
associate-*r*56.7%
metadata-eval56.7%
*-lft-identity56.7%
associate-/l*54.2%
associate-/l*54.3%
*-commutative54.3%
associate-/r*60.1%
unpow260.1%
Simplified60.1%
Taylor expanded in b around inf 68.6%
associate-*l/65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in b around 0 69.0%
Final simplification67.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -80000000.0) (not (<= t 3.2e-26))) (/ x (+ 1.0 (+ a (* b (/ y t))))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -80000000.0) || !(t <= 3.2e-26)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = (z + ((x * t) / y)) / 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 <= (-80000000.0d0)) .or. (.not. (t <= 3.2d-26))) then
tmp = x / (1.0d0 + (a + (b * (y / t))))
else
tmp = (z + ((x * t) / y)) / 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 <= -80000000.0) || !(t <= 3.2e-26)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -80000000.0) or not (t <= 3.2e-26): tmp = x / (1.0 + (a + (b * (y / t)))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -80000000.0) || !(t <= 3.2e-26)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -80000000.0) || ~((t <= 3.2e-26))) tmp = x / (1.0 + (a + (b * (y / t)))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -80000000.0], N[Not[LessEqual[t, 3.2e-26]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -80000000 \lor \neg \left(t \leq 3.2 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -8e7 or 3.2000000000000001e-26 < t Initial program 81.4%
*-commutative81.4%
associate-/l*86.6%
associate-*l/92.3%
Simplified92.3%
Taylor expanded in x around inf 68.5%
associate-*l/69.8%
Applied egg-rr69.8%
if -8e7 < t < 3.2000000000000001e-26Initial program 62.5%
*-commutative62.5%
associate-/l*56.6%
associate-*l/54.6%
Simplified54.6%
Taylor expanded in y around -inf 52.2%
+-commutative52.2%
associate-*r/52.2%
distribute-lft-out--52.2%
associate-*r*52.2%
metadata-eval52.2%
*-lft-identity52.2%
associate-/l*50.4%
associate-/l*50.4%
*-commutative50.4%
associate-/r*56.1%
unpow256.1%
Simplified56.1%
Taylor expanded in b around inf 63.9%
associate-*l/60.7%
*-commutative60.7%
Simplified60.7%
Taylor expanded in b around 0 65.2%
Final simplification67.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.5e-54) (not (<= t 2.8e+32))) (/ (+ x (* y (/ z t))) (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.5e-54) || !(t <= 2.8e+32)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / 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 <= (-3.5d-54)) .or. (.not. (t <= 2.8d+32))) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / 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 <= -3.5e-54) || !(t <= 2.8e+32)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.5e-54) or not (t <= 2.8e+32): tmp = (x + (y * (z / t))) / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.5e-54) || !(t <= 2.8e+32)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3.5e-54) || ~((t <= 2.8e+32))) tmp = (x + (y * (z / t))) / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3.5e-54], N[Not[LessEqual[t, 2.8e+32]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-54} \lor \neg \left(t \leq 2.8 \cdot 10^{+32}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -3.49999999999999982e-54 or 2.8e32 < t Initial program 81.8%
*-commutative81.8%
associate-/l*87.0%
associate-*l/92.7%
Simplified92.7%
associate-/r/94.0%
Applied egg-rr94.0%
Taylor expanded in y around 0 82.4%
if -3.49999999999999982e-54 < t < 2.8e32Initial program 62.3%
*-commutative62.3%
associate-/l*56.6%
associate-*l/54.7%
Simplified54.7%
Taylor expanded in y around -inf 55.5%
+-commutative55.5%
associate-*r/55.5%
distribute-lft-out--55.5%
associate-*r*55.5%
metadata-eval55.5%
*-lft-identity55.5%
associate-/l*53.2%
associate-/l*53.2%
*-commutative53.2%
associate-/r*58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in b around inf 67.1%
associate-*l/63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in b around 0 68.3%
Final simplification76.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.05e-53) (not (<= t 6.2e+31))) (/ (+ x (/ y (/ t z))) (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.05e-53) || !(t <= 6.2e+31)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / 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.05d-53)) .or. (.not. (t <= 6.2d+31))) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / 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.05e-53) || !(t <= 6.2e+31)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.05e-53) or not (t <= 6.2e+31): tmp = (x + (y / (t / z))) / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.05e-53) || !(t <= 6.2e+31)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.05e-53) || ~((t <= 6.2e+31))) tmp = (x + (y / (t / z))) / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.05e-53], N[Not[LessEqual[t, 6.2e+31]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-53} \lor \neg \left(t \leq 6.2 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -1.04999999999999989e-53 or 6.2000000000000004e31 < t Initial program 81.8%
*-commutative81.8%
associate-/l*87.0%
associate-*l/92.7%
Simplified92.7%
associate-/r/94.0%
Applied egg-rr94.0%
associate-*l/85.0%
*-commutative85.0%
associate-/l*94.0%
Applied egg-rr94.0%
Taylor expanded in y around 0 82.5%
if -1.04999999999999989e-53 < t < 6.2000000000000004e31Initial program 62.3%
*-commutative62.3%
associate-/l*56.6%
associate-*l/54.7%
Simplified54.7%
Taylor expanded in y around -inf 55.5%
+-commutative55.5%
associate-*r/55.5%
distribute-lft-out--55.5%
associate-*r*55.5%
metadata-eval55.5%
*-lft-identity55.5%
associate-/l*53.2%
associate-/l*53.2%
*-commutative53.2%
associate-/r*58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in b around inf 67.1%
associate-*l/63.9%
*-commutative63.9%
Simplified63.9%
Taylor expanded in b around 0 68.3%
Final simplification76.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3e-143)
(/ x (+ 1.0 (+ a (/ y (/ t b)))))
(if (<= t 5.8e-27)
(/ (+ z (/ (* x t) y)) b)
(/ x (+ 1.0 (+ a (* b (/ y t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3e-143) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else if (t <= 5.8e-27) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (1.0 + (a + (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 (t <= (-3d-143)) then
tmp = x / (1.0d0 + (a + (y / (t / b))))
else if (t <= 5.8d-27) then
tmp = (z + ((x * t) / y)) / b
else
tmp = x / (1.0d0 + (a + (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 (t <= -3e-143) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else if (t <= 5.8e-27) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (1.0 + (a + (b * (y / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3e-143: tmp = x / (1.0 + (a + (y / (t / b)))) elif t <= 5.8e-27: tmp = (z + ((x * t) / y)) / b else: tmp = x / (1.0 + (a + (b * (y / t)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3e-143) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))); elseif (t <= 5.8e-27) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3e-143) tmp = x / (1.0 + (a + (y / (t / b)))); elseif (t <= 5.8e-27) tmp = (z + ((x * t) / y)) / b; else tmp = x / (1.0 + (a + (b * (y / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3e-143], N[(x / N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e-27], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-143}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-27}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\end{array}
\end{array}
if t < -2.99999999999999985e-143Initial program 79.4%
*-commutative79.4%
associate-/l*83.3%
associate-*l/88.1%
Simplified88.1%
associate-/r/87.1%
Applied egg-rr87.1%
associate-*l/80.3%
*-commutative80.3%
associate-/l*87.4%
Applied egg-rr87.4%
Taylor expanded in x around inf 62.5%
associate-/l*62.2%
Simplified62.2%
if -2.99999999999999985e-143 < t < 5.80000000000000008e-27Initial program 54.7%
*-commutative54.7%
associate-/l*47.9%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in y around -inf 57.3%
+-commutative57.3%
associate-*r/57.3%
distribute-lft-out--57.3%
associate-*r*57.3%
metadata-eval57.3%
*-lft-identity57.3%
associate-/l*54.7%
associate-/l*54.8%
*-commutative54.8%
associate-/r*62.6%
unpow262.6%
Simplified62.6%
Taylor expanded in b around inf 73.2%
associate-*l/69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in b around 0 73.2%
if 5.80000000000000008e-27 < t Initial program 84.4%
*-commutative84.4%
associate-/l*88.0%
associate-*l/92.7%
Simplified92.7%
Taylor expanded in x around inf 68.1%
associate-*l/70.5%
Applied egg-rr70.5%
Final simplification68.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.22e-141)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= t 9.5e-27)
(/ (+ z (/ (* x t) y)) b)
(/ x (+ 1.0 (+ a (* b (/ y t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.22e-141) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (t <= 9.5e-27) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (1.0 + (a + (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 (t <= (-1.22d-141)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (t <= 9.5d-27) then
tmp = (z + ((x * t) / y)) / b
else
tmp = x / (1.0d0 + (a + (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 (t <= -1.22e-141) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (t <= 9.5e-27) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (1.0 + (a + (b * (y / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.22e-141: tmp = x / (1.0 + (a + ((y * b) / t))) elif t <= 9.5e-27: tmp = (z + ((x * t) / y)) / b else: tmp = x / (1.0 + (a + (b * (y / t)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.22e-141) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (t <= 9.5e-27) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.22e-141) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (t <= 9.5e-27) tmp = (z + ((x * t) / y)) / b; else tmp = x / (1.0 + (a + (b * (y / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.22e-141], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-27], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{-141}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-27}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\end{array}
\end{array}
if t < -1.22e-141Initial program 79.4%
*-commutative79.4%
associate-/l*83.3%
associate-*l/88.1%
Simplified88.1%
Taylor expanded in x around inf 62.5%
if -1.22e-141 < t < 9.50000000000000037e-27Initial program 54.7%
*-commutative54.7%
associate-/l*47.9%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in y around -inf 57.3%
+-commutative57.3%
associate-*r/57.3%
distribute-lft-out--57.3%
associate-*r*57.3%
metadata-eval57.3%
*-lft-identity57.3%
associate-/l*54.7%
associate-/l*54.8%
*-commutative54.8%
associate-/r*62.6%
unpow262.6%
Simplified62.6%
Taylor expanded in b around inf 73.2%
associate-*l/69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in b around 0 73.2%
if 9.50000000000000037e-27 < t Initial program 84.4%
*-commutative84.4%
associate-/l*88.0%
associate-*l/92.7%
Simplified92.7%
Taylor expanded in x around inf 68.1%
associate-*l/70.5%
Applied egg-rr70.5%
Final simplification68.2%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -1.5e+54)
(not
(or (<= t -3.5e-37) (and (not (<= t -1.22e-141)) (<= t 1.25e-11)))))
(/ x (+ a 1.0))
(/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.5e+54) || !((t <= -3.5e-37) || (!(t <= -1.22e-141) && (t <= 1.25e-11)))) {
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 <= (-1.5d+54)) .or. (.not. (t <= (-3.5d-37)) .or. (.not. (t <= (-1.22d-141))) .and. (t <= 1.25d-11))) 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 <= -1.5e+54) || !((t <= -3.5e-37) || (!(t <= -1.22e-141) && (t <= 1.25e-11)))) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.5e+54) or not ((t <= -3.5e-37) or (not (t <= -1.22e-141) and (t <= 1.25e-11))): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.5e+54) || !((t <= -3.5e-37) || (!(t <= -1.22e-141) && (t <= 1.25e-11)))) 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 <= -1.5e+54) || ~(((t <= -3.5e-37) || (~((t <= -1.22e-141)) && (t <= 1.25e-11))))) 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, -1.5e+54], N[Not[Or[LessEqual[t, -3.5e-37], And[N[Not[LessEqual[t, -1.22e-141]], $MachinePrecision], LessEqual[t, 1.25e-11]]]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+54} \lor \neg \left(t \leq -3.5 \cdot 10^{-37} \lor \neg \left(t \leq -1.22 \cdot 10^{-141}\right) \land t \leq 1.25 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.4999999999999999e54 or -3.5000000000000001e-37 < t < -1.22e-141 or 1.25000000000000005e-11 < t Initial program 81.6%
*-commutative81.6%
associate-/l*85.9%
associate-*l/90.8%
Simplified90.8%
Taylor expanded in t around inf 61.6%
if -1.4999999999999999e54 < t < -3.5000000000000001e-37 or -1.22e-141 < t < 1.25000000000000005e-11Initial program 60.6%
*-commutative60.6%
associate-/l*55.1%
associate-*l/53.9%
Simplified53.9%
Taylor expanded in t around 0 60.3%
Final simplification61.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.8e+94) (not (<= t 2.9e+32))) (/ x (+ a 1.0)) (/ (+ z (/ t (/ y x))) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.8e+94) || !(t <= 2.9e+32)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + (t / (y / x))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-6.8d+94)) .or. (.not. (t <= 2.9d+32))) then
tmp = x / (a + 1.0d0)
else
tmp = (z + (t / (y / x))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.8e+94) || !(t <= 2.9e+32)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + (t / (y / x))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.8e+94) or not (t <= 2.9e+32): tmp = x / (a + 1.0) else: tmp = (z + (t / (y / x))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.8e+94) || !(t <= 2.9e+32)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6.8e+94) || ~((t <= 2.9e+32))) tmp = x / (a + 1.0); else tmp = (z + (t / (y / x))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.8e+94], N[Not[LessEqual[t, 2.9e+32]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+94} \lor \neg \left(t \leq 2.9 \cdot 10^{+32}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\end{array}
\end{array}
if t < -6.8000000000000004e94 or 2.90000000000000003e32 < t Initial program 81.4%
*-commutative81.4%
associate-/l*87.2%
associate-*l/93.6%
Simplified93.6%
Taylor expanded in t around inf 69.4%
if -6.8000000000000004e94 < t < 2.90000000000000003e32Initial program 66.8%
*-commutative66.8%
associate-/l*62.9%
associate-*l/62.0%
Simplified62.0%
Taylor expanded in y around -inf 50.6%
+-commutative50.6%
associate-*r/50.6%
distribute-lft-out--50.6%
associate-*r*50.6%
metadata-eval50.6%
*-lft-identity50.6%
associate-/l*49.4%
associate-/l*49.4%
*-commutative49.4%
associate-/r*54.5%
unpow254.5%
Simplified54.5%
Taylor expanded in b around inf 60.5%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in b around 0 61.8%
+-commutative61.8%
associate-/l*59.6%
Simplified59.6%
Final simplification64.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.1e+94) (not (<= t 5.8e+31))) (/ x (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.1e+94) || !(t <= 5.8e+31)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-6.1d+94)) .or. (.not. (t <= 5.8d+31))) then
tmp = x / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.1e+94) || !(t <= 5.8e+31)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.1e+94) or not (t <= 5.8e+31): tmp = x / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.1e+94) || !(t <= 5.8e+31)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6.1e+94) || ~((t <= 5.8e+31))) tmp = x / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.1e+94], N[Not[LessEqual[t, 5.8e+31]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.1 \cdot 10^{+94} \lor \neg \left(t \leq 5.8 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -6.10000000000000035e94 or 5.8000000000000001e31 < t Initial program 81.4%
*-commutative81.4%
associate-/l*87.2%
associate-*l/93.6%
Simplified93.6%
Taylor expanded in t around inf 69.4%
if -6.10000000000000035e94 < t < 5.8000000000000001e31Initial program 66.8%
*-commutative66.8%
associate-/l*62.9%
associate-*l/62.0%
Simplified62.0%
Taylor expanded in y around -inf 50.6%
+-commutative50.6%
associate-*r/50.6%
distribute-lft-out--50.6%
associate-*r*50.6%
metadata-eval50.6%
*-lft-identity50.6%
associate-/l*49.4%
associate-/l*49.4%
*-commutative49.4%
associate-/r*54.5%
unpow254.5%
Simplified54.5%
Taylor expanded in b around inf 60.5%
associate-*l/58.7%
*-commutative58.7%
Simplified58.7%
Taylor expanded in b around 0 61.8%
Final simplification65.3%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7.6e-46) (/ z b) (if (<= y 9.5e-17) (/ x a) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.6e-46) {
tmp = z / b;
} else if (y <= 9.5e-17) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-7.6d-46)) then
tmp = z / b
else if (y <= 9.5d-17) then
tmp = x / a
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.6e-46) {
tmp = z / b;
} else if (y <= 9.5e-17) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.6e-46: tmp = z / b elif y <= 9.5e-17: tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.6e-46) tmp = Float64(z / b); elseif (y <= 9.5e-17) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7.6e-46) tmp = z / b; elseif (y <= 9.5e-17) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.6e-46], N[(z / b), $MachinePrecision], If[LessEqual[y, 9.5e-17], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{-46}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -7.5999999999999993e-46 or 9.50000000000000029e-17 < y Initial program 55.5%
*-commutative55.5%
associate-/l*58.5%
associate-*l/63.0%
Simplified63.0%
Taylor expanded in t around 0 47.2%
if -7.5999999999999993e-46 < y < 9.50000000000000029e-17Initial program 98.0%
*-commutative98.0%
associate-/l*95.5%
associate-*l/95.5%
Simplified95.5%
Taylor expanded in x around inf 76.3%
Taylor expanded in a around inf 39.7%
Final simplification44.0%
(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 73.6%
*-commutative73.6%
associate-/l*74.3%
associate-*l/76.8%
Simplified76.8%
Taylor expanded in x around inf 54.0%
Taylor expanded in a around inf 27.1%
Final simplification27.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 2023195
(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))))