
(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 16 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)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (* (/ y t) (/ z (+ (+ a 1.0) (/ y (/ t b)))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 2e+288) t_1 (if (<= t_1 INFINITY) t_2 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = (y / t) * (z / ((a + 1.0) + (y / (t / b))));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 2e+288) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = (y / t) * (z / ((a + 1.0) + (y / (t / b))));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_1 <= 2e+288) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) t_2 = (y / t) * (z / ((a + 1.0) + (y / (t / b)))) tmp = 0 if t_1 <= -math.inf: tmp = t_2 elif t_1 <= 2e+288: tmp = t_1 elif t_1 <= math.inf: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_2 = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 2e+288) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); t_2 = (y / t) * (z / ((a + 1.0) + (y / (t / b)))); tmp = 0.0; if (t_1 <= -Inf) tmp = t_2; elseif (t_1 <= 2e+288) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 2e+288], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_2 := \frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+288}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 2e288 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 34.4%
associate-/l*64.2%
associate-/l*64.2%
Simplified64.2%
Taylor expanded in x around 0 59.8%
times-frac76.8%
associate-+r+76.8%
associate-*r/65.8%
*-commutative65.8%
associate-/r/76.7%
Simplified76.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e288Initial program 93.4%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.6%
associate-/l*16.1%
Simplified16.1%
Taylor expanded in y around inf 95.2%
Final simplification91.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.2e+19)
(/ (+ z (/ (* x t) y)) b)
(if (<= y 1.5e+16)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= y 4.6e+165)
(/ (+ x (* y (/ z t))) (+ 1.0 (* y (/ b t))))
(/ (* x (+ (/ z x) (/ t y))) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.2e+19) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 1.5e+16) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 4.6e+165) {
tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t)));
} else {
tmp = (x * ((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 (y <= (-2.2d+19)) then
tmp = (z + ((x * t) / y)) / b
else if (y <= 1.5d+16) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (y <= 4.6d+165) then
tmp = (x + (y * (z / t))) / (1.0d0 + (y * (b / t)))
else
tmp = (x * ((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 (y <= -2.2e+19) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 1.5e+16) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 4.6e+165) {
tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t)));
} else {
tmp = (x * ((z / x) + (t / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.2e+19: tmp = (z + ((x * t) / y)) / b elif y <= 1.5e+16: tmp = (x + ((y * z) / t)) / (a + 1.0) elif y <= 4.6e+165: tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t))) else: tmp = (x * ((z / x) + (t / y))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.2e+19) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (y <= 1.5e+16) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (y <= 4.6e+165) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(1.0 + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(x * Float64(Float64(z / x) + Float64(t / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.2e+19) tmp = (z + ((x * t) / y)) / b; elseif (y <= 1.5e+16) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (y <= 4.6e+165) tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t))); else tmp = (x * ((z / x) + (t / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.2e+19], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 1.5e+16], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+165], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(z / x), $MachinePrecision] + N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+19}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+165}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{1 + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{z}{x} + \frac{t}{y}\right)}{b}\\
\end{array}
\end{array}
if y < -2.2e19Initial program 51.5%
associate-/l*57.3%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in x around inf 55.0%
associate-+r+55.0%
associate-*r/56.8%
*-commutative56.8%
associate-/r/56.9%
*-commutative56.9%
associate-+r+56.9%
associate-*r/51.2%
*-commutative51.2%
associate-/r/58.8%
Simplified58.8%
Taylor expanded in b around inf 52.0%
+-commutative52.0%
Simplified52.0%
Taylor expanded in x around 0 59.5%
if -2.2e19 < y < 1.5e16Initial program 97.2%
associate-/l*90.6%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in b around 0 85.6%
if 1.5e16 < y < 4.60000000000000032e165Initial program 73.6%
associate-/l*85.2%
associate-/l*88.1%
Simplified88.1%
Taylor expanded in a around 0 70.6%
if 4.60000000000000032e165 < y Initial program 48.8%
associate-/l*56.1%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in x around inf 44.9%
associate-+r+44.9%
associate-*r/48.5%
*-commutative48.5%
associate-/r/48.5%
*-commutative48.5%
associate-+r+48.5%
associate-*r/38.0%
*-commutative38.0%
associate-/r/48.5%
Simplified48.5%
Taylor expanded in b around inf 71.1%
+-commutative71.1%
Simplified71.1%
Final simplification76.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))) (t_2 (* y (/ b t))))
(if (or (<= (+ a 1.0) -1e+16) (not (<= (+ a 1.0) 2.0)))
(/ t_1 (+ a t_2))
(/ t_1 (+ 1.0 t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double t_2 = y * (b / t);
double tmp;
if (((a + 1.0) <= -1e+16) || !((a + 1.0) <= 2.0)) {
tmp = t_1 / (a + t_2);
} else {
tmp = t_1 / (1.0 + t_2);
}
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 + (y * (z / t))
t_2 = y * (b / t)
if (((a + 1.0d0) <= (-1d+16)) .or. (.not. ((a + 1.0d0) <= 2.0d0))) then
tmp = t_1 / (a + t_2)
else
tmp = t_1 / (1.0d0 + t_2)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double t_2 = y * (b / t);
double tmp;
if (((a + 1.0) <= -1e+16) || !((a + 1.0) <= 2.0)) {
tmp = t_1 / (a + t_2);
} else {
tmp = t_1 / (1.0 + t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) t_2 = y * (b / t) tmp = 0 if ((a + 1.0) <= -1e+16) or not ((a + 1.0) <= 2.0): tmp = t_1 / (a + t_2) else: tmp = t_1 / (1.0 + t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) t_2 = Float64(y * Float64(b / t)) tmp = 0.0 if ((Float64(a + 1.0) <= -1e+16) || !(Float64(a + 1.0) <= 2.0)) tmp = Float64(t_1 / Float64(a + t_2)); else tmp = Float64(t_1 / Float64(1.0 + t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); t_2 = y * (b / t); tmp = 0.0; if (((a + 1.0) <= -1e+16) || ~(((a + 1.0) <= 2.0))) tmp = t_1 / (a + t_2); else tmp = t_1 / (1.0 + t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a + 1.0), $MachinePrecision], -1e+16], N[Not[LessEqual[N[(a + 1.0), $MachinePrecision], 2.0]], $MachinePrecision]], N[(t$95$1 / N[(a + t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
t_2 := y \cdot \frac{b}{t}\\
\mathbf{if}\;a + 1 \leq -1 \cdot 10^{+16} \lor \neg \left(a + 1 \leq 2\right):\\
\;\;\;\;\frac{t\_1}{a + t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{1 + t\_2}\\
\end{array}
\end{array}
if (+.f64 a #s(literal 1 binary64)) < -1e16 or 2 < (+.f64 a #s(literal 1 binary64)) Initial program 79.3%
associate-/l*80.9%
associate-/l*80.8%
Simplified80.8%
Taylor expanded in a around inf 80.4%
if -1e16 < (+.f64 a #s(literal 1 binary64)) < 2Initial program 80.3%
associate-/l*78.1%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in a around 0 77.5%
Final simplification78.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2e-166) (not (<= t 7.6e-93))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2e-166) || !(t <= 7.6e-93)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2d-166)) .or. (.not. (t <= 7.6d-93))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2e-166) || !(t <= 7.6e-93)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2e-166) or not (t <= 7.6e-93): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2e-166) || !(t <= 7.6e-93)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2e-166) || ~((t <= 7.6e-93))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2e-166], N[Not[LessEqual[t, 7.6e-93]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-166} \lor \neg \left(t \leq 7.6 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -2.00000000000000008e-166 or 7.5999999999999998e-93 < t Initial program 85.3%
associate-/l*90.2%
associate-/l*92.4%
Simplified92.4%
if -2.00000000000000008e-166 < t < 7.5999999999999998e-93Initial program 66.6%
associate-/l*54.0%
associate-/l*50.2%
Simplified50.2%
Taylor expanded in x around 0 60.6%
Taylor expanded in t around 0 69.6%
Final simplification85.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* y (/ b t)))))
(if (<= t -4.2e-165)
(/ (+ x (* y (/ z t))) t_1)
(if (<= t 3.3e-152)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (/ y (/ t z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (y * (b / t));
double tmp;
if (t <= -4.2e-165) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= 3.3e-152) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} 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) + (y * (b / t))
if (t <= (-4.2d-165)) then
tmp = (x + (y * (z / t))) / t_1
else if (t <= 3.3d-152) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y / (t / z))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (y * (b / t));
double tmp;
if (t <= -4.2e-165) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= 3.3e-152) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (y * (b / t)) tmp = 0 if t <= -4.2e-165: tmp = (x + (y * (z / t))) / t_1 elif t <= 3.3e-152: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y / (t / z))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))) tmp = 0.0 if (t <= -4.2e-165) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / t_1); elseif (t <= 3.3e-152) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (y * (b / t)); tmp = 0.0; if (t <= -4.2e-165) tmp = (x + (y * (z / t))) / t_1; elseif (t <= 3.3e-152) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y / (t / z))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e-165], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 3.3e-152], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + y \cdot \frac{b}{t}\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{-165}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t\_1}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-152}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t\_1}\\
\end{array}
\end{array}
if t < -4.1999999999999999e-165Initial program 84.7%
associate-/l*88.8%
associate-/l*91.8%
Simplified91.8%
if -4.1999999999999999e-165 < t < 3.29999999999999998e-152Initial program 65.9%
associate-/l*52.2%
associate-/l*49.1%
Simplified49.1%
Taylor expanded in x around 0 61.6%
Taylor expanded in t around 0 72.5%
if 3.29999999999999998e-152 < t Initial program 83.9%
associate-/l*87.9%
associate-/l*88.0%
Simplified88.0%
clear-num87.9%
un-div-inv88.0%
Applied egg-rr88.0%
Final simplification85.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b t))) (t_2 (+ a t_1)) (t_3 (+ x (* y (/ z t)))))
(if (<= a -2.6e+14)
(/ (+ x (/ y (/ t z))) t_2)
(if (<= a 1.0) (/ t_3 (+ 1.0 t_1)) (/ t_3 t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / t);
double t_2 = a + t_1;
double t_3 = x + (y * (z / t));
double tmp;
if (a <= -2.6e+14) {
tmp = (x + (y / (t / z))) / t_2;
} else if (a <= 1.0) {
tmp = t_3 / (1.0 + t_1);
} else {
tmp = t_3 / t_2;
}
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 = y * (b / t)
t_2 = a + t_1
t_3 = x + (y * (z / t))
if (a <= (-2.6d+14)) then
tmp = (x + (y / (t / z))) / t_2
else if (a <= 1.0d0) then
tmp = t_3 / (1.0d0 + t_1)
else
tmp = t_3 / t_2
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 = y * (b / t);
double t_2 = a + t_1;
double t_3 = x + (y * (z / t));
double tmp;
if (a <= -2.6e+14) {
tmp = (x + (y / (t / z))) / t_2;
} else if (a <= 1.0) {
tmp = t_3 / (1.0 + t_1);
} else {
tmp = t_3 / t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / t) t_2 = a + t_1 t_3 = x + (y * (z / t)) tmp = 0 if a <= -2.6e+14: tmp = (x + (y / (t / z))) / t_2 elif a <= 1.0: tmp = t_3 / (1.0 + t_1) else: tmp = t_3 / t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / t)) t_2 = Float64(a + t_1) t_3 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (a <= -2.6e+14) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_2); elseif (a <= 1.0) tmp = Float64(t_3 / Float64(1.0 + t_1)); else tmp = Float64(t_3 / t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / t); t_2 = a + t_1; t_3 = x + (y * (z / t)); tmp = 0.0; if (a <= -2.6e+14) tmp = (x + (y / (t / z))) / t_2; elseif (a <= 1.0) tmp = t_3 / (1.0 + t_1); else tmp = t_3 / t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.6e+14], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[a, 1.0], N[(t$95$3 / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$3 / t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{t}\\
t_2 := a + t\_1\\
t_3 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;a \leq -2.6 \cdot 10^{+14}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t\_2}\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;\frac{t\_3}{1 + t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_3}{t\_2}\\
\end{array}
\end{array}
if a < -2.6e14Initial program 71.7%
associate-/l*73.4%
associate-/l*74.9%
Simplified74.9%
clear-num74.9%
un-div-inv74.9%
Applied egg-rr74.9%
Taylor expanded in a around inf 74.9%
if -2.6e14 < a < 1Initial program 80.3%
associate-/l*78.1%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in a around 0 77.5%
if 1 < a Initial program 86.5%
associate-/l*88.0%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in a around inf 85.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) a)))
(if (<= a -1.1e+45)
t_1
(if (<= a 1.35e-99)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= a 1.26) (+ x (/ (* y z) t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / a;
double tmp;
if (a <= -1.1e+45) {
tmp = t_1;
} else if (a <= 1.35e-99) {
tmp = x / (1.0 + ((y * b) / t));
} else if (a <= 1.26) {
tmp = x + ((y * z) / 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 / (t / z))) / a
if (a <= (-1.1d+45)) then
tmp = t_1
else if (a <= 1.35d-99) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (a <= 1.26d0) then
tmp = x + ((y * z) / 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 / (t / z))) / a;
double tmp;
if (a <= -1.1e+45) {
tmp = t_1;
} else if (a <= 1.35e-99) {
tmp = x / (1.0 + ((y * b) / t));
} else if (a <= 1.26) {
tmp = x + ((y * z) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y / (t / z))) / a tmp = 0 if a <= -1.1e+45: tmp = t_1 elif a <= 1.35e-99: tmp = x / (1.0 + ((y * b) / t)) elif a <= 1.26: tmp = x + ((y * z) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / a) tmp = 0.0 if (a <= -1.1e+45) tmp = t_1; elseif (a <= 1.35e-99) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (a <= 1.26) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y / (t / z))) / a; tmp = 0.0; if (a <= -1.1e+45) tmp = t_1; elseif (a <= 1.35e-99) tmp = x / (1.0 + ((y * b) / t)); elseif (a <= 1.26) tmp = x + ((y * z) / 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[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -1.1e+45], t$95$1, If[LessEqual[a, 1.35e-99], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.26], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-99}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;a \leq 1.26:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.1e45 or 1.26000000000000001 < a Initial program 80.4%
associate-/l*81.3%
associate-/l*82.9%
Simplified82.9%
clear-num82.8%
un-div-inv82.9%
Applied egg-rr82.9%
Taylor expanded in a around inf 69.5%
if -1.1e45 < a < 1.35e-99Initial program 77.4%
associate-/l*75.8%
associate-/l*75.1%
Simplified75.1%
Taylor expanded in x around inf 57.5%
Taylor expanded in a around 0 59.4%
if 1.35e-99 < a < 1.26000000000000001Initial program 90.1%
associate-/l*89.9%
associate-/l*89.9%
Simplified89.9%
clear-num89.8%
un-div-inv90.0%
Applied egg-rr90.0%
Taylor expanded in y around 0 70.8%
Taylor expanded in a around 0 65.8%
Final simplification64.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.8e-97) (not (<= t 3.2e-115))) (/ x (+ (+ a 1.0) (* y (/ b t)))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.8e-97) || !(t <= 3.2e-115)) {
tmp = x / ((a + 1.0) + (y * (b / 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 <= (-4.8d-97)) .or. (.not. (t <= 3.2d-115))) then
tmp = x / ((a + 1.0d0) + (y * (b / 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 <= -4.8e-97) || !(t <= 3.2e-115)) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.8e-97) or not (t <= 3.2e-115): tmp = x / ((a + 1.0) + (y * (b / t))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.8e-97) || !(t <= 3.2e-115)) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / 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 <= -4.8e-97) || ~((t <= 3.2e-115))) tmp = x / ((a + 1.0) + (y * (b / t))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.8e-97], N[Not[LessEqual[t, 3.2e-115]], $MachinePrecision]], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / 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 -4.8 \cdot 10^{-97} \lor \neg \left(t \leq 3.2 \cdot 10^{-115}\right):\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -4.8e-97 or 3.2e-115 < t Initial program 86.0%
associate-/l*90.5%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in x around inf 72.7%
if -4.8e-97 < t < 3.2e-115Initial program 66.0%
associate-/l*55.1%
associate-/l*50.4%
Simplified50.4%
Taylor expanded in x around inf 63.5%
associate-+r+63.5%
associate-*r/63.4%
*-commutative63.4%
associate-/r/60.1%
*-commutative60.1%
associate-+r+60.1%
associate-*r/51.7%
*-commutative51.7%
associate-/r/57.7%
Simplified57.7%
Taylor expanded in b around inf 62.4%
+-commutative62.4%
Simplified62.4%
Taylor expanded in x around 0 66.1%
Final simplification70.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.7e+19) (not (<= y 3.8e+76))) (/ (+ z (/ (* x t) y)) b) (/ x (+ 1.0 (+ a (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.7e+19) || !(y <= 3.8e+76)) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.7d+19)) .or. (.not. (y <= 3.8d+76))) then
tmp = (z + ((x * t) / y)) / b
else
tmp = x / (1.0d0 + (a + ((y * b) / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.7e+19) || !(y <= 3.8e+76)) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.7e+19) or not (y <= 3.8e+76): tmp = (z + ((x * t) / y)) / b else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.7e+19) || !(y <= 3.8e+76)) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.7e+19) || ~((y <= 3.8e+76))) tmp = (z + ((x * t) / y)) / b; else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.7e+19], N[Not[LessEqual[y, 3.8e+76]], $MachinePrecision]], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+19} \lor \neg \left(y \leq 3.8 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -4.7e19 or 3.80000000000000024e76 < y Initial program 51.8%
associate-/l*60.0%
associate-/l*67.2%
Simplified67.2%
Taylor expanded in x around inf 53.5%
associate-+r+53.5%
associate-*r/56.6%
*-commutative56.6%
associate-/r/56.6%
*-commutative56.6%
associate-+r+56.6%
associate-*r/50.5%
*-commutative50.5%
associate-/r/57.6%
Simplified57.6%
Taylor expanded in b around inf 57.3%
+-commutative57.3%
Simplified57.3%
Taylor expanded in x around 0 60.4%
if -4.7e19 < y < 3.80000000000000024e76Initial program 96.3%
associate-/l*90.9%
associate-/l*87.3%
Simplified87.3%
Taylor expanded in x around inf 75.5%
Final simplification69.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7e+19)
(/ (+ z (/ (* x t) y)) b)
(if (<= y 8.5e+16)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(/ (* x (+ (/ z x) (/ t y))) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7e+19) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 8.5e+16) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (x * ((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 (y <= (-7d+19)) then
tmp = (z + ((x * t) / y)) / b
else if (y <= 8.5d+16) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else
tmp = (x * ((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 (y <= -7e+19) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 8.5e+16) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (x * ((z / x) + (t / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7e+19: tmp = (z + ((x * t) / y)) / b elif y <= 8.5e+16: tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = (x * ((z / x) + (t / y))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7e+19) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (y <= 8.5e+16) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = Float64(Float64(x * Float64(Float64(z / x) + Float64(t / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7e+19) tmp = (z + ((x * t) / y)) / b; elseif (y <= 8.5e+16) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = (x * ((z / x) + (t / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7e+19], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 8.5e+16], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(z / x), $MachinePrecision] + N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+19}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{z}{x} + \frac{t}{y}\right)}{b}\\
\end{array}
\end{array}
if y < -7e19Initial program 51.5%
associate-/l*57.3%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in x around inf 55.0%
associate-+r+55.0%
associate-*r/56.8%
*-commutative56.8%
associate-/r/56.9%
*-commutative56.9%
associate-+r+56.9%
associate-*r/51.2%
*-commutative51.2%
associate-/r/58.8%
Simplified58.8%
Taylor expanded in b around inf 52.0%
+-commutative52.0%
Simplified52.0%
Taylor expanded in x around 0 59.5%
if -7e19 < y < 8.5e16Initial program 97.2%
associate-/l*90.6%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in b around 0 85.6%
if 8.5e16 < y Initial program 62.5%
associate-/l*72.1%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in x around inf 62.1%
associate-+r+62.1%
associate-*r/65.3%
*-commutative65.3%
associate-/r/65.3%
*-commutative65.3%
associate-+r+65.3%
associate-*r/60.6%
*-commutative60.6%
associate-/r/65.3%
Simplified65.3%
Taylor expanded in b around inf 62.7%
+-commutative62.7%
Simplified62.7%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7e+19)
(/ (+ z (/ (* x t) y)) b)
(if (<= y 4e+16)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(/ (* x (+ (/ z x) (/ t y))) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7e+19) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 4e+16) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (x * ((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 (y <= (-7d+19)) then
tmp = (z + ((x * t) / y)) / b
else if (y <= 4d+16) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = (x * ((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 (y <= -7e+19) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 4e+16) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (x * ((z / x) + (t / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7e+19: tmp = (z + ((x * t) / y)) / b elif y <= 4e+16: tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = (x * ((z / x) + (t / y))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7e+19) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (y <= 4e+16) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(x * Float64(Float64(z / x) + Float64(t / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7e+19) tmp = (z + ((x * t) / y)) / b; elseif (y <= 4e+16) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = (x * ((z / x) + (t / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7e+19], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 4e+16], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(z / x), $MachinePrecision] + N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+19}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+16}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{z}{x} + \frac{t}{y}\right)}{b}\\
\end{array}
\end{array}
if y < -7e19Initial program 51.5%
associate-/l*57.3%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in x around inf 55.0%
associate-+r+55.0%
associate-*r/56.8%
*-commutative56.8%
associate-/r/56.9%
*-commutative56.9%
associate-+r+56.9%
associate-*r/51.2%
*-commutative51.2%
associate-/r/58.8%
Simplified58.8%
Taylor expanded in b around inf 52.0%
+-commutative52.0%
Simplified52.0%
Taylor expanded in x around 0 59.5%
if -7e19 < y < 4e16Initial program 97.2%
associate-/l*90.6%
associate-/l*86.5%
Simplified86.5%
clear-num86.5%
un-div-inv86.6%
Applied egg-rr86.6%
Taylor expanded in y around 0 81.0%
associate-/r/83.6%
Applied egg-rr83.6%
if 4e16 < y Initial program 62.5%
associate-/l*72.1%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in x around inf 62.1%
associate-+r+62.1%
associate-*r/65.3%
*-commutative65.3%
associate-/r/65.3%
*-commutative65.3%
associate-+r+65.3%
associate-*r/60.6%
*-commutative60.6%
associate-/r/65.3%
Simplified65.3%
Taylor expanded in b around inf 62.7%
+-commutative62.7%
Simplified62.7%
Final simplification73.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.5e+19) (not (<= y 190000000.0))) (/ (+ z (/ (* x t) y)) b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.5e+19) || !(y <= 190000000.0)) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-2.5d+19)) .or. (.not. (y <= 190000000.0d0))) then
tmp = (z + ((x * t) / y)) / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.5e+19) || !(y <= 190000000.0)) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.5e+19) or not (y <= 190000000.0): tmp = (z + ((x * t) / y)) / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.5e+19) || !(y <= 190000000.0)) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.5e+19) || ~((y <= 190000000.0))) tmp = (z + ((x * t) / y)) / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.5e+19], N[Not[LessEqual[y, 190000000.0]], $MachinePrecision]], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+19} \lor \neg \left(y \leq 190000000\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -2.5e19 or 1.9e8 < y Initial program 57.3%
associate-/l*65.2%
associate-/l*71.2%
Simplified71.2%
Taylor expanded in x around inf 58.8%
associate-+r+58.8%
associate-*r/61.4%
*-commutative61.4%
associate-/r/61.4%
*-commutative61.4%
associate-+r+61.4%
associate-*r/56.2%
*-commutative56.2%
associate-/r/62.3%
Simplified62.3%
Taylor expanded in b around inf 57.8%
+-commutative57.8%
Simplified57.8%
Taylor expanded in x around 0 59.5%
if -2.5e19 < y < 1.9e8Initial program 97.2%
associate-/l*90.6%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in y around 0 68.5%
Final simplification64.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.28e+45) (/ x a) (if (<= a -1.4e-174) (/ z b) (if (<= a 1.0) x (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.28e+45) {
tmp = x / a;
} else if (a <= -1.4e-174) {
tmp = z / b;
} else if (a <= 1.0) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.28d+45)) then
tmp = x / a
else if (a <= (-1.4d-174)) then
tmp = z / b
else if (a <= 1.0d0) then
tmp = x
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.28e+45) {
tmp = x / a;
} else if (a <= -1.4e-174) {
tmp = z / b;
} else if (a <= 1.0) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.28e+45: tmp = x / a elif a <= -1.4e-174: tmp = z / b elif a <= 1.0: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.28e+45) tmp = Float64(x / a); elseif (a <= -1.4e-174) tmp = Float64(z / b); elseif (a <= 1.0) tmp = x; else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.28e+45) tmp = x / a; elseif (a <= -1.4e-174) tmp = z / b; elseif (a <= 1.0) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.28e+45], N[(x / a), $MachinePrecision], If[LessEqual[a, -1.4e-174], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.0], x, N[(x / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.28 \cdot 10^{+45}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -1.4 \cdot 10^{-174}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1.28000000000000002e45 or 1 < a Initial program 80.4%
associate-/l*81.3%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in x around inf 63.1%
Taylor expanded in a around inf 55.4%
if -1.28000000000000002e45 < a < -1.39999999999999999e-174Initial program 69.7%
associate-/l*67.5%
associate-/l*62.9%
Simplified62.9%
Taylor expanded in y around inf 45.4%
if -1.39999999999999999e-174 < a < 1Initial program 83.4%
associate-/l*82.5%
associate-/l*83.6%
Simplified83.6%
Taylor expanded in x around inf 62.2%
Taylor expanded in a around 0 61.4%
Taylor expanded in b around 0 46.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.1e+20) (not (<= y 4.3e+75))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.1e+20) || !(y <= 4.3e+75)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.1d+20)) .or. (.not. (y <= 4.3d+75))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.1e+20) || !(y <= 4.3e+75)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.1e+20) or not (y <= 4.3e+75): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.1e+20) || !(y <= 4.3e+75)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.1e+20) || ~((y <= 4.3e+75))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.1e+20], N[Not[LessEqual[y, 4.3e+75]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+20} \lor \neg \left(y \leq 4.3 \cdot 10^{+75}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -1.1e20 or 4.3000000000000001e75 < y Initial program 51.8%
associate-/l*60.0%
associate-/l*67.2%
Simplified67.2%
Taylor expanded in y around inf 56.7%
if -1.1e20 < y < 4.3000000000000001e75Initial program 96.3%
associate-/l*90.9%
associate-/l*87.3%
Simplified87.3%
Taylor expanded in y around 0 66.1%
Final simplification62.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -5.1e+48) (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 <= -5.1e+48) || !(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 <= (-5.1d+48)) .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 <= -5.1e+48) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -5.1e+48) 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 <= -5.1e+48) || !(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 <= -5.1e+48) || ~((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, -5.1e+48], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{+48} \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.0999999999999998e48 or 1 < a Initial program 81.0%
associate-/l*81.1%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in x around inf 63.6%
Taylor expanded in a around inf 55.8%
if -5.0999999999999998e48 < a < 1Initial program 78.7%
associate-/l*78.1%
associate-/l*77.4%
Simplified77.4%
Taylor expanded in x around inf 54.9%
Taylor expanded in a around 0 56.0%
Taylor expanded in b around 0 40.6%
Final simplification47.6%
(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 79.8%
associate-/l*79.5%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in x around inf 58.9%
Taylor expanded in a around 0 36.5%
Taylor expanded in b around 0 24.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024112
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))