
(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 15 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))
(* (/ y t) (/ z (fma y (/ b t) (+ a 1.0))))
(if (<= t_2 5e+302) (/ t_1 (+ (+ a 1.0) (* b (/ y t)))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y / t) * (z / fma(y, (b / t), (a + 1.0)));
} else if (t_2 <= 5e+302) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / fma(y, Float64(b / t), Float64(a + 1.0)))); elseif (t_2 <= 5e+302) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+302], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\frac{t_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 41.5%
Taylor expanded in x around 0 58.9%
times-frac76.8%
associate-+r+76.8%
+-commutative76.8%
+-commutative76.8%
associate-*l/76.8%
*-commutative76.8%
fma-udef76.8%
+-commutative76.8%
Simplified76.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5e302Initial program 92.0%
associate-/l*88.0%
associate-/r/93.6%
Applied egg-rr93.6%
if 5e302 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 18.8%
Taylor expanded in y around inf 78.8%
Final simplification90.5%
(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))
(/ (+ x (* y (/ z t))) (+ 1.0 (+ a (* y (/ b t)))))
(if (<= t_2 5e+302) (/ t_1 (+ (+ a 1.0) (* b (/ y t)))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x + (y * (z / t))) / (1.0 + (a + (y * (b / t))));
} else if (t_2 <= 5e+302) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (x + (y * (z / t))) / (1.0 + (a + (y * (b / t))));
} else if (t_2 <= 5e+302) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_2 <= -math.inf: tmp = (x + (y * (z / t))) / (1.0 + (a + (y * (b / t)))) elif t_2 <= 5e+302: tmp = t_1 / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); elseif (t_2 <= 5e+302) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_2 <= -Inf) tmp = (x + (y * (z / t))) / (1.0 + (a + (y * (b / t)))); elseif (t_2 <= 5e+302) tmp = t_1 / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+302], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\frac{t_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 41.5%
*-commutative41.5%
associate-/l*59.0%
+-commutative59.0%
associate-+l+59.0%
associate-*r/59.0%
*-commutative59.0%
Simplified59.0%
associate-/r/59.2%
Applied egg-rr59.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5e302Initial program 92.0%
associate-/l*88.0%
associate-/r/93.6%
Applied egg-rr93.6%
if 5e302 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 18.8%
Taylor expanded in y around inf 78.8%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (/ (* y b) t))))
(t_2 (+ x (* z (/ y t))))
(t_3 (/ t_2 a)))
(if (<= a -2100.0)
t_3
(if (<= a -1.35e-147)
t_1
(if (<= a 7.2e-216)
t_2
(if (<= a 1.8e-134)
t_1
(if (<= a 5e-110)
(/ z b)
(if (<= a 3.9e-63)
(/ x (+ 1.0 (* b (/ y t))))
(if (<= a 8.6e+45) (/ z b) t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + ((y * b) / t));
double t_2 = x + (z * (y / t));
double t_3 = t_2 / a;
double tmp;
if (a <= -2100.0) {
tmp = t_3;
} else if (a <= -1.35e-147) {
tmp = t_1;
} else if (a <= 7.2e-216) {
tmp = t_2;
} else if (a <= 1.8e-134) {
tmp = t_1;
} else if (a <= 5e-110) {
tmp = z / b;
} else if (a <= 3.9e-63) {
tmp = x / (1.0 + (b * (y / t)));
} else if (a <= 8.6e+45) {
tmp = z / b;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x / (1.0d0 + ((y * b) / t))
t_2 = x + (z * (y / t))
t_3 = t_2 / a
if (a <= (-2100.0d0)) then
tmp = t_3
else if (a <= (-1.35d-147)) then
tmp = t_1
else if (a <= 7.2d-216) then
tmp = t_2
else if (a <= 1.8d-134) then
tmp = t_1
else if (a <= 5d-110) then
tmp = z / b
else if (a <= 3.9d-63) then
tmp = x / (1.0d0 + (b * (y / t)))
else if (a <= 8.6d+45) then
tmp = z / b
else
tmp = t_3
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 + ((y * b) / t));
double t_2 = x + (z * (y / t));
double t_3 = t_2 / a;
double tmp;
if (a <= -2100.0) {
tmp = t_3;
} else if (a <= -1.35e-147) {
tmp = t_1;
} else if (a <= 7.2e-216) {
tmp = t_2;
} else if (a <= 1.8e-134) {
tmp = t_1;
} else if (a <= 5e-110) {
tmp = z / b;
} else if (a <= 3.9e-63) {
tmp = x / (1.0 + (b * (y / t)));
} else if (a <= 8.6e+45) {
tmp = z / b;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + ((y * b) / t)) t_2 = x + (z * (y / t)) t_3 = t_2 / a tmp = 0 if a <= -2100.0: tmp = t_3 elif a <= -1.35e-147: tmp = t_1 elif a <= 7.2e-216: tmp = t_2 elif a <= 1.8e-134: tmp = t_1 elif a <= 5e-110: tmp = z / b elif a <= 3.9e-63: tmp = x / (1.0 + (b * (y / t))) elif a <= 8.6e+45: tmp = z / b else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))) t_2 = Float64(x + Float64(z * Float64(y / t))) t_3 = Float64(t_2 / a) tmp = 0.0 if (a <= -2100.0) tmp = t_3; elseif (a <= -1.35e-147) tmp = t_1; elseif (a <= 7.2e-216) tmp = t_2; elseif (a <= 1.8e-134) tmp = t_1; elseif (a <= 5e-110) tmp = Float64(z / b); elseif (a <= 3.9e-63) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); elseif (a <= 8.6e+45) tmp = Float64(z / b); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 + ((y * b) / t)); t_2 = x + (z * (y / t)); t_3 = t_2 / a; tmp = 0.0; if (a <= -2100.0) tmp = t_3; elseif (a <= -1.35e-147) tmp = t_1; elseif (a <= 7.2e-216) tmp = t_2; elseif (a <= 1.8e-134) tmp = t_1; elseif (a <= 5e-110) tmp = z / b; elseif (a <= 3.9e-63) tmp = x / (1.0 + (b * (y / t))); elseif (a <= 8.6e+45) tmp = z / b; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / a), $MachinePrecision]}, If[LessEqual[a, -2100.0], t$95$3, If[LessEqual[a, -1.35e-147], t$95$1, If[LessEqual[a, 7.2e-216], t$95$2, If[LessEqual[a, 1.8e-134], t$95$1, If[LessEqual[a, 5e-110], N[(z / b), $MachinePrecision], If[LessEqual[a, 3.9e-63], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.6e+45], N[(z / b), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \frac{y \cdot b}{t}}\\
t_2 := x + z \cdot \frac{y}{t}\\
t_3 := \frac{t_2}{a}\\
\mathbf{if}\;a \leq -2100:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{-147}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-216}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-110}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-63}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;a \leq 8.6 \cdot 10^{+45}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if a < -2100 or 8.6000000000000006e45 < a Initial program 81.0%
associate-/l*77.6%
associate-/r/80.6%
Applied egg-rr80.6%
Taylor expanded in a around inf 68.5%
associate-/l*64.0%
associate-/r/68.6%
Simplified68.6%
if -2100 < a < -1.35e-147 or 7.1999999999999998e-216 < a < 1.79999999999999995e-134Initial program 85.4%
Taylor expanded in x around inf 69.2%
Taylor expanded in a around 0 69.2%
if -1.35e-147 < a < 7.1999999999999998e-216Initial program 73.3%
Taylor expanded in b around 0 55.6%
Taylor expanded in a around 0 55.6%
associate-/l*61.0%
associate-/r/62.9%
Simplified62.9%
if 1.79999999999999995e-134 < a < 5e-110 or 3.90000000000000022e-63 < a < 8.6000000000000006e45Initial program 59.3%
Taylor expanded in y around inf 58.0%
if 5e-110 < a < 3.90000000000000022e-63Initial program 90.9%
Taylor expanded in x around inf 82.4%
Taylor expanded in a around 0 82.4%
associate-*r/82.4%
Simplified82.4%
Final simplification67.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (/ (* y b) t)))) (t_2 (+ x (* z (/ y t)))))
(if (<= a -8200.0)
(/ (+ x (/ (* y z) t)) a)
(if (<= a -1.7e-151)
t_1
(if (<= a 2.7e-211)
t_2
(if (<= a 9.5e-135)
t_1
(if (<= a 6.6e-106)
(/ z b)
(if (<= a 1.6e-64)
(/ x (+ 1.0 (* b (/ y t))))
(if (<= a 8.6e+45) (/ z b) (/ t_2 a))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + ((y * b) / t));
double t_2 = x + (z * (y / t));
double tmp;
if (a <= -8200.0) {
tmp = (x + ((y * z) / t)) / a;
} else if (a <= -1.7e-151) {
tmp = t_1;
} else if (a <= 2.7e-211) {
tmp = t_2;
} else if (a <= 9.5e-135) {
tmp = t_1;
} else if (a <= 6.6e-106) {
tmp = z / b;
} else if (a <= 1.6e-64) {
tmp = x / (1.0 + (b * (y / t)));
} else if (a <= 8.6e+45) {
tmp = z / b;
} else {
tmp = t_2 / 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) :: t_2
real(8) :: tmp
t_1 = x / (1.0d0 + ((y * b) / t))
t_2 = x + (z * (y / t))
if (a <= (-8200.0d0)) then
tmp = (x + ((y * z) / t)) / a
else if (a <= (-1.7d-151)) then
tmp = t_1
else if (a <= 2.7d-211) then
tmp = t_2
else if (a <= 9.5d-135) then
tmp = t_1
else if (a <= 6.6d-106) then
tmp = z / b
else if (a <= 1.6d-64) then
tmp = x / (1.0d0 + (b * (y / t)))
else if (a <= 8.6d+45) then
tmp = z / b
else
tmp = t_2 / 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 / (1.0 + ((y * b) / t));
double t_2 = x + (z * (y / t));
double tmp;
if (a <= -8200.0) {
tmp = (x + ((y * z) / t)) / a;
} else if (a <= -1.7e-151) {
tmp = t_1;
} else if (a <= 2.7e-211) {
tmp = t_2;
} else if (a <= 9.5e-135) {
tmp = t_1;
} else if (a <= 6.6e-106) {
tmp = z / b;
} else if (a <= 1.6e-64) {
tmp = x / (1.0 + (b * (y / t)));
} else if (a <= 8.6e+45) {
tmp = z / b;
} else {
tmp = t_2 / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + ((y * b) / t)) t_2 = x + (z * (y / t)) tmp = 0 if a <= -8200.0: tmp = (x + ((y * z) / t)) / a elif a <= -1.7e-151: tmp = t_1 elif a <= 2.7e-211: tmp = t_2 elif a <= 9.5e-135: tmp = t_1 elif a <= 6.6e-106: tmp = z / b elif a <= 1.6e-64: tmp = x / (1.0 + (b * (y / t))) elif a <= 8.6e+45: tmp = z / b else: tmp = t_2 / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))) t_2 = Float64(x + Float64(z * Float64(y / t))) tmp = 0.0 if (a <= -8200.0) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); elseif (a <= -1.7e-151) tmp = t_1; elseif (a <= 2.7e-211) tmp = t_2; elseif (a <= 9.5e-135) tmp = t_1; elseif (a <= 6.6e-106) tmp = Float64(z / b); elseif (a <= 1.6e-64) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); elseif (a <= 8.6e+45) tmp = Float64(z / b); else tmp = Float64(t_2 / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 + ((y * b) / t)); t_2 = x + (z * (y / t)); tmp = 0.0; if (a <= -8200.0) tmp = (x + ((y * z) / t)) / a; elseif (a <= -1.7e-151) tmp = t_1; elseif (a <= 2.7e-211) tmp = t_2; elseif (a <= 9.5e-135) tmp = t_1; elseif (a <= 6.6e-106) tmp = z / b; elseif (a <= 1.6e-64) tmp = x / (1.0 + (b * (y / t))); elseif (a <= 8.6e+45) tmp = z / b; else tmp = t_2 / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8200.0], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -1.7e-151], t$95$1, If[LessEqual[a, 2.7e-211], t$95$2, If[LessEqual[a, 9.5e-135], t$95$1, If[LessEqual[a, 6.6e-106], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.6e-64], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.6e+45], N[(z / b), $MachinePrecision], N[(t$95$2 / a), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \frac{y \cdot b}{t}}\\
t_2 := x + z \cdot \frac{y}{t}\\
\mathbf{if}\;a \leq -8200:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-151}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-211}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{-106}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;a \leq 8.6 \cdot 10^{+45}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_2}{a}\\
\end{array}
\end{array}
if a < -8200Initial program 79.2%
Taylor expanded in a around inf 63.7%
if -8200 < a < -1.7000000000000001e-151 or 2.6999999999999999e-211 < a < 9.50000000000000007e-135Initial program 85.4%
Taylor expanded in x around inf 69.2%
Taylor expanded in a around 0 69.2%
if -1.7000000000000001e-151 < a < 2.6999999999999999e-211Initial program 73.3%
Taylor expanded in b around 0 55.6%
Taylor expanded in a around 0 55.6%
associate-/l*61.0%
associate-/r/62.9%
Simplified62.9%
if 9.50000000000000007e-135 < a < 6.60000000000000031e-106 or 1.59999999999999988e-64 < a < 8.6000000000000006e45Initial program 59.3%
Taylor expanded in y around inf 58.0%
if 6.60000000000000031e-106 < a < 1.59999999999999988e-64Initial program 90.9%
Taylor expanded in x around inf 82.4%
Taylor expanded in a around 0 82.4%
associate-*r/82.4%
Simplified82.4%
if 8.6000000000000006e45 < a Initial program 83.2%
associate-/l*75.8%
associate-/r/83.1%
Applied egg-rr83.1%
Taylor expanded in a around inf 74.7%
associate-/l*70.9%
associate-/r/76.7%
Simplified76.7%
Final simplification67.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3e-174) (not (<= t 3.2e-207))) (/ (+ x (* z (/ y t))) (+ 1.0 (+ a (* y (/ b t))))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3e-174) || !(t <= 3.2e-207)) {
tmp = (x + (z * (y / t))) / (1.0 + (a + (y * (b / t))));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-3d-174)) .or. (.not. (t <= 3.2d-207))) then
tmp = (x + (z * (y / t))) / (1.0d0 + (a + (y * (b / t))))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3e-174) || !(t <= 3.2e-207)) {
tmp = (x + (z * (y / t))) / (1.0 + (a + (y * (b / t))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3e-174) or not (t <= 3.2e-207): tmp = (x + (z * (y / t))) / (1.0 + (a + (y * (b / t)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3e-174) || !(t <= 3.2e-207)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3e-174) || ~((t <= 3.2e-207))) tmp = (x + (z * (y / t))) / (1.0 + (a + (y * (b / t)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3e-174], N[Not[LessEqual[t, 3.2e-207]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-174} \lor \neg \left(t \leq 3.2 \cdot 10^{-207}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -3.00000000000000021e-174 or 3.2000000000000003e-207 < t Initial program 82.3%
*-commutative82.3%
associate-/l*83.2%
+-commutative83.2%
associate-+l+83.2%
associate-*r/85.3%
*-commutative85.3%
Simplified85.3%
div-inv84.8%
clear-num84.9%
Applied egg-rr84.9%
if -3.00000000000000021e-174 < t < 3.2000000000000003e-207Initial program 61.9%
Taylor expanded in y around inf 61.6%
Final simplification80.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ 1.0 (+ a (* y (/ b t))))))
(if (<= t -1.05e-173)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t 7.5e-229) (/ z b) (/ (+ x (* y (/ z t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 + (a + (y * (b / t)));
double tmp;
if (t <= -1.05e-173) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t <= 7.5e-229) {
tmp = z / 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 = 1.0d0 + (a + (y * (b / t)))
if (t <= (-1.05d-173)) then
tmp = (x + (z * (y / t))) / t_1
else if (t <= 7.5d-229) then
tmp = z / 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 = 1.0 + (a + (y * (b / t)));
double tmp;
if (t <= -1.05e-173) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t <= 7.5e-229) {
tmp = z / b;
} else {
tmp = (x + (y * (z / t))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 + (a + (y * (b / t))) tmp = 0 if t <= -1.05e-173: tmp = (x + (z * (y / t))) / t_1 elif t <= 7.5e-229: tmp = z / b else: tmp = (x + (y * (z / t))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 + Float64(a + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -1.05e-173) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t <= 7.5e-229) tmp = Float64(z / 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 = 1.0 + (a + (y * (b / t))); tmp = 0.0; if (t <= -1.05e-173) tmp = (x + (z * (y / t))) / t_1; elseif (t <= 7.5e-229) tmp = z / 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[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e-173], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 7.5e-229], N[(z / 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 := 1 + \left(a + y \cdot \frac{b}{t}\right)\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{-173}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-229}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t_1}\\
\end{array}
\end{array}
if t < -1.05000000000000001e-173Initial program 80.2%
*-commutative80.2%
associate-/l*81.0%
+-commutative81.0%
associate-+l+81.0%
associate-*r/82.5%
*-commutative82.5%
Simplified82.5%
div-inv82.6%
clear-num82.6%
Applied egg-rr82.6%
if -1.05000000000000001e-173 < t < 7.4999999999999999e-229Initial program 60.3%
Taylor expanded in y around inf 62.0%
if 7.4999999999999999e-229 < t Initial program 85.0%
*-commutative85.0%
associate-/l*84.9%
+-commutative84.9%
associate-+l+84.9%
associate-*r/87.7%
*-commutative87.7%
Simplified87.7%
associate-/r/88.5%
Applied egg-rr88.5%
Final simplification81.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ a 1.0))))
(if (<= z -6.4e+221)
t_1
(if (<= z -7.5e+176)
(/ z b)
(if (<= z -1.05e+36)
(/ (+ x (/ 1.0 (/ (/ t z) y))) (+ a 1.0))
(if (<= z 3.7e-84) (/ x (+ 1.0 (+ a (/ (* y b) t)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (a + 1.0);
double tmp;
if (z <= -6.4e+221) {
tmp = t_1;
} else if (z <= -7.5e+176) {
tmp = z / b;
} else if (z <= -1.05e+36) {
tmp = (x + (1.0 / ((t / z) / y))) / (a + 1.0);
} else if (z <= 3.7e-84) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / (a + 1.0d0)
if (z <= (-6.4d+221)) then
tmp = t_1
else if (z <= (-7.5d+176)) then
tmp = z / b
else if (z <= (-1.05d+36)) then
tmp = (x + (1.0d0 / ((t / z) / y))) / (a + 1.0d0)
else if (z <= 3.7d-84) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (a + 1.0);
double tmp;
if (z <= -6.4e+221) {
tmp = t_1;
} else if (z <= -7.5e+176) {
tmp = z / b;
} else if (z <= -1.05e+36) {
tmp = (x + (1.0 / ((t / z) / y))) / (a + 1.0);
} else if (z <= 3.7e-84) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (a + 1.0) tmp = 0 if z <= -6.4e+221: tmp = t_1 elif z <= -7.5e+176: tmp = z / b elif z <= -1.05e+36: tmp = (x + (1.0 / ((t / z) / y))) / (a + 1.0) elif z <= 3.7e-84: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)) tmp = 0.0 if (z <= -6.4e+221) tmp = t_1; elseif (z <= -7.5e+176) tmp = Float64(z / b); elseif (z <= -1.05e+36) tmp = Float64(Float64(x + Float64(1.0 / Float64(Float64(t / z) / y))) / Float64(a + 1.0)); elseif (z <= 3.7e-84) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (a + 1.0); tmp = 0.0; if (z <= -6.4e+221) tmp = t_1; elseif (z <= -7.5e+176) tmp = z / b; elseif (z <= -1.05e+36) tmp = (x + (1.0 / ((t / z) / y))) / (a + 1.0); elseif (z <= 3.7e-84) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.4e+221], t$95$1, If[LessEqual[z, -7.5e+176], N[(z / b), $MachinePrecision], If[LessEqual[z, -1.05e+36], N[(N[(x + N[(1.0 / N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-84], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{if}\;z \leq -6.4 \cdot 10^{+221}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+176}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+36}:\\
\;\;\;\;\frac{x + \frac{1}{\frac{\frac{t}{z}}{y}}}{a + 1}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-84}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.4e221 or 3.6999999999999999e-84 < z Initial program 78.1%
Taylor expanded in b around 0 65.7%
if -6.4e221 < z < -7.499999999999999e176Initial program 3.5%
Taylor expanded in y around inf 100.0%
if -7.499999999999999e176 < z < -1.05000000000000002e36Initial program 63.0%
Taylor expanded in b around 0 52.8%
associate-/l*62.8%
clear-num62.8%
inv-pow62.8%
Applied egg-rr62.8%
unpow-162.8%
Simplified62.8%
if -1.05000000000000002e36 < z < 3.6999999999999999e-84Initial program 86.7%
Taylor expanded in x around inf 78.7%
Final simplification72.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ 1.0 (+ a (/ (* y b) t)))))
(if (or (<= x -2.3e+23) (not (<= x 2.6e-29)))
(/ x t_1)
(/ (* y z) (* t t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 + (a + ((y * b) / t));
double tmp;
if ((x <= -2.3e+23) || !(x <= 2.6e-29)) {
tmp = x / t_1;
} else {
tmp = (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 = 1.0d0 + (a + ((y * b) / t))
if ((x <= (-2.3d+23)) .or. (.not. (x <= 2.6d-29))) then
tmp = x / t_1
else
tmp = (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 = 1.0 + (a + ((y * b) / t));
double tmp;
if ((x <= -2.3e+23) || !(x <= 2.6e-29)) {
tmp = x / t_1;
} else {
tmp = (y * z) / (t * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 + (a + ((y * b) / t)) tmp = 0 if (x <= -2.3e+23) or not (x <= 2.6e-29): tmp = x / t_1 else: tmp = (y * z) / (t * t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))) tmp = 0.0 if ((x <= -2.3e+23) || !(x <= 2.6e-29)) tmp = Float64(x / t_1); else tmp = Float64(Float64(y * z) / Float64(t * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 + (a + ((y * b) / t)); tmp = 0.0; if ((x <= -2.3e+23) || ~((x <= 2.6e-29))) tmp = x / t_1; else tmp = (y * z) / (t * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -2.3e+23], N[Not[LessEqual[x, 2.6e-29]], $MachinePrecision]], N[(x / t$95$1), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \left(a + \frac{y \cdot b}{t}\right)\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+23} \lor \neg \left(x \leq 2.6 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{x}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot t_1}\\
\end{array}
\end{array}
if x < -2.3e23 or 2.6000000000000002e-29 < x Initial program 81.5%
Taylor expanded in x around inf 74.0%
if -2.3e23 < x < 2.6000000000000002e-29Initial program 75.5%
Taylor expanded in x around 0 64.8%
Final simplification69.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.05e+182)
(/ z b)
(if (<= b 2.3e+64)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= b 3.8e+258) (/ z b) (/ x (+ 1.0 (+ a (/ (* y b) t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05e+182) {
tmp = z / b;
} else if (b <= 2.3e+64) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (b <= 3.8e+258) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.05d+182)) then
tmp = z / b
else if (b <= 2.3d+64) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (b <= 3.8d+258) then
tmp = z / b
else
tmp = x / (1.0d0 + (a + ((y * b) / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.05e+182) {
tmp = z / b;
} else if (b <= 2.3e+64) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (b <= 3.8e+258) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.05e+182: tmp = z / b elif b <= 2.3e+64: tmp = (x + ((y * z) / t)) / (a + 1.0) elif b <= 3.8e+258: tmp = z / b else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.05e+182) tmp = Float64(z / b); elseif (b <= 2.3e+64) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (b <= 3.8e+258) tmp = Float64(z / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.05e+182) tmp = z / b; elseif (b <= 2.3e+64) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (b <= 3.8e+258) tmp = z / b; else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.05e+182], N[(z / b), $MachinePrecision], If[LessEqual[b, 2.3e+64], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.8e+258], N[(z / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{+182}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{+64}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{+258}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if b < -1.0499999999999999e182 or 2.3e64 < b < 3.80000000000000009e258Initial program 59.2%
Taylor expanded in y around inf 66.0%
if -1.0499999999999999e182 < b < 2.3e64Initial program 84.9%
Taylor expanded in b around 0 71.7%
if 3.80000000000000009e258 < b Initial program 80.2%
Taylor expanded in x around inf 80.6%
Final simplification70.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.2e+176)
(/ z b)
(if (<= z 1.5e+95)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(* (/ y t) (/ z (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.2e+176) {
tmp = z / b;
} else if (z <= 1.5e+95) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (y / t) * (z / (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.2d+176)) then
tmp = z / b
else if (z <= 1.5d+95) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = (y / t) * (z / (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.2e+176) {
tmp = z / b;
} else if (z <= 1.5e+95) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (y / t) * (z / (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.2e+176: tmp = z / b elif z <= 1.5e+95: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = (y / t) * (z / (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.2e+176) tmp = Float64(z / b); elseif (z <= 1.5e+95) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.2e+176) tmp = z / b; elseif (z <= 1.5e+95) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = (y / t) * (z / (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.2e+176], N[(z / b), $MachinePrecision], If[LessEqual[z, 1.5e+95], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+176}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+95}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\end{array}
\end{array}
if z < -3.1999999999999998e176Initial program 68.2%
Taylor expanded in y around inf 48.3%
if -3.1999999999999998e176 < z < 1.49999999999999996e95Initial program 82.8%
Taylor expanded in x around inf 70.9%
if 1.49999999999999996e95 < z Initial program 68.3%
Taylor expanded in b around 0 58.3%
Taylor expanded in x around 0 44.7%
times-frac52.5%
Simplified52.5%
Final simplification65.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -2.15e+201)
t_1
(if (<= t -1.3e+167)
(* (/ z t) (/ y (+ a 1.0)))
(if (or (<= t -7.4e-115) (not (<= t 5.8e-17))) t_1 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -2.15e+201) {
tmp = t_1;
} else if (t <= -1.3e+167) {
tmp = (z / t) * (y / (a + 1.0));
} else if ((t <= -7.4e-115) || !(t <= 5.8e-17)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-2.15d+201)) then
tmp = t_1
else if (t <= (-1.3d+167)) then
tmp = (z / t) * (y / (a + 1.0d0))
else if ((t <= (-7.4d-115)) .or. (.not. (t <= 5.8d-17))) then
tmp = t_1
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -2.15e+201) {
tmp = t_1;
} else if (t <= -1.3e+167) {
tmp = (z / t) * (y / (a + 1.0));
} else if ((t <= -7.4e-115) || !(t <= 5.8e-17)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -2.15e+201: tmp = t_1 elif t <= -1.3e+167: tmp = (z / t) * (y / (a + 1.0)) elif (t <= -7.4e-115) or not (t <= 5.8e-17): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -2.15e+201) tmp = t_1; elseif (t <= -1.3e+167) tmp = Float64(Float64(z / t) * Float64(y / Float64(a + 1.0))); elseif ((t <= -7.4e-115) || !(t <= 5.8e-17)) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -2.15e+201) tmp = t_1; elseif (t <= -1.3e+167) tmp = (z / t) * (y / (a + 1.0)); elseif ((t <= -7.4e-115) || ~((t <= 5.8e-17))) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.15e+201], t$95$1, If[LessEqual[t, -1.3e+167], N[(N[(z / t), $MachinePrecision] * N[(y / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -7.4e-115], N[Not[LessEqual[t, 5.8e-17]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.15 \cdot 10^{+201}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{+167}:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{a + 1}\\
\mathbf{elif}\;t \leq -7.4 \cdot 10^{-115} \lor \neg \left(t \leq 5.8 \cdot 10^{-17}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.14999999999999995e201 or -1.3000000000000001e167 < t < -7.4e-115 or 5.8000000000000006e-17 < t Initial program 84.4%
Taylor expanded in y around 0 59.0%
if -2.14999999999999995e201 < t < -1.3000000000000001e167Initial program 82.9%
Taylor expanded in b around 0 74.2%
Taylor expanded in x around 0 57.0%
*-commutative57.0%
times-frac82.7%
Applied egg-rr82.7%
if -7.4e-115 < t < 5.8000000000000006e-17Initial program 68.6%
Taylor expanded in y around inf 55.1%
Final simplification58.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.02e+125)
(/ x a)
(if (<= a -2.173e-296)
(/ z b)
(if (<= a 1.1e-134) x (if (<= a 6.6e+95) (/ z b) (/ x a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.02e+125) {
tmp = x / a;
} else if (a <= -2.173e-296) {
tmp = z / b;
} else if (a <= 1.1e-134) {
tmp = x;
} else if (a <= 6.6e+95) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.02d+125)) then
tmp = x / a
else if (a <= (-2.173d-296)) then
tmp = z / b
else if (a <= 1.1d-134) then
tmp = x
else if (a <= 6.6d+95) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.02e+125) {
tmp = x / a;
} else if (a <= -2.173e-296) {
tmp = z / b;
} else if (a <= 1.1e-134) {
tmp = x;
} else if (a <= 6.6e+95) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.02e+125: tmp = x / a elif a <= -2.173e-296: tmp = z / b elif a <= 1.1e-134: tmp = x elif a <= 6.6e+95: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.02e+125) tmp = Float64(x / a); elseif (a <= -2.173e-296) tmp = Float64(z / b); elseif (a <= 1.1e-134) tmp = x; elseif (a <= 6.6e+95) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.02e+125) tmp = x / a; elseif (a <= -2.173e-296) tmp = z / b; elseif (a <= 1.1e-134) tmp = x; elseif (a <= 6.6e+95) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.02e+125], N[(x / a), $MachinePrecision], If[LessEqual[a, -2.173e-296], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.1e-134], x, If[LessEqual[a, 6.6e+95], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{+125}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -2.173 \cdot 10^{-296}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-134}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{+95}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1.02e125 or 6.5999999999999997e95 < a Initial program 83.5%
Taylor expanded in y around 0 61.5%
Taylor expanded in a around inf 61.5%
if -1.02e125 < a < -2.173e-296 or 1.1e-134 < a < 6.5999999999999997e95Initial program 73.5%
Taylor expanded in y around inf 44.2%
if -2.173e-296 < a < 1.1e-134Initial program 83.0%
Taylor expanded in y around 0 43.3%
Taylor expanded in a around 0 43.3%
Final simplification49.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7.1e-115) (not (<= t 2.15e-15))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.1e-115) || !(t <= 2.15e-15)) {
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 <= (-7.1d-115)) .or. (.not. (t <= 2.15d-15))) 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 <= -7.1e-115) || !(t <= 2.15e-15)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7.1e-115) or not (t <= 2.15e-15): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7.1e-115) || !(t <= 2.15e-15)) 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 <= -7.1e-115) || ~((t <= 2.15e-15))) 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, -7.1e-115], N[Not[LessEqual[t, 2.15e-15]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.1 \cdot 10^{-115} \lor \neg \left(t \leq 2.15 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -7.0999999999999998e-115 or 2.1499999999999998e-15 < t Initial program 84.3%
Taylor expanded in y around 0 57.0%
if -7.0999999999999998e-115 < t < 2.1499999999999998e-15Initial program 68.6%
Taylor expanded in y around inf 55.1%
Final simplification56.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -0.12) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.12) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-0.12d0)) .or. (.not. (a <= 1.0d0))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.12) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -0.12) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -0.12) || !(a <= 1.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -0.12) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -0.12], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.12 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -0.12 or 1 < a Initial program 80.2%
Taylor expanded in y around 0 51.1%
Taylor expanded in a around inf 50.1%
if -0.12 < a < 1Initial program 76.9%
Taylor expanded in y around 0 33.9%
Taylor expanded in a around 0 33.9%
Final simplification41.7%
(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 78.5%
Taylor expanded in y around 0 42.2%
Taylor expanded in a around 0 19.3%
Final simplification19.3%
(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 2023334
(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))))