
(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))) (t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_2 (- INFINITY))
(* y (/ z (* t (+ 1.0 (fma y (/ b t) a)))))
(if (<= t_2 1e+308) (/ t_1 (+ (+ a 1.0) (/ y (/ t b)))) (/ 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 * (z / (t * (1.0 + fma(y, (b / t), a))));
} else if (t_2 <= 1e+308) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} 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(y * Float64(z / Float64(t * Float64(1.0 + fma(y, Float64(b / t), a))))); elseif (t_2 <= 1e+308) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); 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[(y * N[(z / N[(t * N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+308], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $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:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)\right)}\\
\mathbf{elif}\;t\_2 \leq 10^{+308}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\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.0Initial program 18.5%
associate-/l*38.8%
associate-/l*38.8%
Simplified38.8%
Taylor expanded in x around 0 52.5%
associate-/l*99.4%
+-commutative99.4%
*-commutative99.4%
associate-/l*99.2%
fma-define99.2%
Simplified99.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e308Initial program 90.2%
associate-/l*88.3%
associate-/l*88.8%
Simplified88.8%
clear-num88.8%
un-div-inv88.8%
Applied egg-rr88.8%
Taylor expanded in y around 0 91.2%
if 1e308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 1.9%
associate-/l*15.5%
associate-/l*18.2%
Simplified18.2%
Taylor expanded in y around inf 87.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 (+ (+ a 1.0) t_1)))
(t_4 (+ 1.0 (+ a t_1))))
(if (<= t_3 (- INFINITY))
(* z (+ (/ x (* z t_4)) (/ y (* t t_4))))
(if (<= t_3 1e+308) (/ t_2 (+ (+ a 1.0) (/ y (/ t b)))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / ((a + 1.0) + t_1);
double t_4 = 1.0 + (a + t_1);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_4)) + (y / (t * t_4)));
} else if (t_3 <= 1e+308) {
tmp = t_2 / ((a + 1.0) + (y / (t / b)));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / ((a + 1.0) + t_1);
double t_4 = 1.0 + (a + t_1);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_4)) + (y / (t * t_4)));
} else if (t_3 <= 1e+308) {
tmp = t_2 / ((a + 1.0) + (y / (t / b)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = x + ((y * z) / t) t_3 = t_2 / ((a + 1.0) + t_1) t_4 = 1.0 + (a + t_1) tmp = 0 if t_3 <= -math.inf: tmp = z * ((x / (z * t_4)) + (y / (t * t_4))) elif t_3 <= 1e+308: tmp = t_2 / ((a + 1.0) + (y / (t / b))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / Float64(Float64(a + 1.0) + t_1)) t_4 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_4)) + Float64(y / Float64(t * t_4)))); elseif (t_3 <= 1e+308) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = x + ((y * z) / t); t_3 = t_2 / ((a + 1.0) + t_1); t_4 = 1.0 + (a + t_1); tmp = 0.0; if (t_3 <= -Inf) tmp = z * ((x / (z * t_4)) + (y / (t * t_4))); elseif (t_3 <= 1e+308) tmp = t_2 / ((a + 1.0) + (y / (t / b))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+308], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{\left(a + 1\right) + t\_1}\\
t_4 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\
\mathbf{elif}\;t\_3 \leq 10^{+308}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\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.0Initial program 18.5%
associate-/l*38.8%
associate-/l*38.8%
Simplified38.8%
Taylor expanded in z around inf 99.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e308Initial program 90.2%
associate-/l*88.3%
associate-/l*88.8%
Simplified88.8%
clear-num88.8%
un-div-inv88.8%
Applied egg-rr88.8%
Taylor expanded in y around 0 91.2%
if 1e308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 1.9%
associate-/l*15.5%
associate-/l*18.2%
Simplified18.2%
Taylor expanded in y around inf 87.5%
Final simplification91.1%
(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 (+ 1.0 (+ a (* y (/ b t))))))
(if (<= t_2 1e+308) (/ t_1 (+ (+ a 1.0) (/ y (/ t b)))) (/ 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 / (1.0 + (a + (y * (b / t)))));
} else if (t_2 <= 1e+308) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} else if (t_2 <= 1e+308) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} 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 = (y / t) * (z / (1.0 + (a + (y * (b / t))))) elif t_2 <= 1e+308: tmp = t_1 / ((a + 1.0) + (y / (t / b))) 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 / Float64(1.0 + Float64(a + Float64(y * Float64(b / t)))))); elseif (t_2 <= 1e+308) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_2 <= -Inf) tmp = (y / t) * (z / (1.0 + (a + (y * (b / t))))); elseif (t_2 <= 1e+308) tmp = t_1 / ((a + 1.0) + (y / (t / b))); 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[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+308], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $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}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t\_2 \leq 10^{+308}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\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.0Initial program 18.5%
associate-/l*38.8%
associate-/l*38.8%
Simplified38.8%
Taylor expanded in x around 0 52.5%
times-frac92.0%
*-commutative92.0%
associate-/l*92.1%
Simplified92.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e308Initial program 90.2%
associate-/l*88.3%
associate-/l*88.8%
Simplified88.8%
clear-num88.8%
un-div-inv88.8%
Applied egg-rr88.8%
Taylor expanded in y around 0 91.2%
if 1e308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 1.9%
associate-/l*15.5%
associate-/l*18.2%
Simplified18.2%
Taylor expanded in y around inf 87.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ (/ 1.0 b) (* (/ t b) (/ x (* y z)))))))
(if (<= y -1.5e+127)
t_1
(if (<= y -7.2e+14)
(* y (/ z (* t (+ 1.0 (+ a (* b (/ y t)))))))
(if (<= y 880000000.0)
(/ (+ x (* (* y z) (/ 1.0 t))) (+ a 1.0))
(if (or (<= y 2.8e+69) (not (<= y 2.55e+121)))
t_1
(/ (+ x (/ (* y z) t)) (+ a 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * ((1.0 / b) + ((t / b) * (x / (y * z))));
double tmp;
if (y <= -1.5e+127) {
tmp = t_1;
} else if (y <= -7.2e+14) {
tmp = y * (z / (t * (1.0 + (a + (b * (y / t))))));
} else if (y <= 880000000.0) {
tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0);
} else if ((y <= 2.8e+69) || !(y <= 2.55e+121)) {
tmp = t_1;
} else {
tmp = (x + ((y * z) / 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) :: t_1
real(8) :: tmp
t_1 = z * ((1.0d0 / b) + ((t / b) * (x / (y * z))))
if (y <= (-1.5d+127)) then
tmp = t_1
else if (y <= (-7.2d+14)) then
tmp = y * (z / (t * (1.0d0 + (a + (b * (y / t))))))
else if (y <= 880000000.0d0) then
tmp = (x + ((y * z) * (1.0d0 / t))) / (a + 1.0d0)
else if ((y <= 2.8d+69) .or. (.not. (y <= 2.55d+121))) then
tmp = t_1
else
tmp = (x + ((y * z) / 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 t_1 = z * ((1.0 / b) + ((t / b) * (x / (y * z))));
double tmp;
if (y <= -1.5e+127) {
tmp = t_1;
} else if (y <= -7.2e+14) {
tmp = y * (z / (t * (1.0 + (a + (b * (y / t))))));
} else if (y <= 880000000.0) {
tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0);
} else if ((y <= 2.8e+69) || !(y <= 2.55e+121)) {
tmp = t_1;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * ((1.0 / b) + ((t / b) * (x / (y * z)))) tmp = 0 if y <= -1.5e+127: tmp = t_1 elif y <= -7.2e+14: tmp = y * (z / (t * (1.0 + (a + (b * (y / t)))))) elif y <= 880000000.0: tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0) elif (y <= 2.8e+69) or not (y <= 2.55e+121): tmp = t_1 else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(Float64(1.0 / b) + Float64(Float64(t / b) * Float64(x / Float64(y * z))))) tmp = 0.0 if (y <= -1.5e+127) tmp = t_1; elseif (y <= -7.2e+14) tmp = Float64(y * Float64(z / Float64(t * Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))))); elseif (y <= 880000000.0) tmp = Float64(Float64(x + Float64(Float64(y * z) * Float64(1.0 / t))) / Float64(a + 1.0)); elseif ((y <= 2.8e+69) || !(y <= 2.55e+121)) tmp = t_1; else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * ((1.0 / b) + ((t / b) * (x / (y * z)))); tmp = 0.0; if (y <= -1.5e+127) tmp = t_1; elseif (y <= -7.2e+14) tmp = y * (z / (t * (1.0 + (a + (b * (y / t)))))); elseif (y <= 880000000.0) tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0); elseif ((y <= 2.8e+69) || ~((y <= 2.55e+121))) tmp = t_1; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(N[(1.0 / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+127], t$95$1, If[LessEqual[y, -7.2e+14], N[(y * N[(z / N[(t * N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 880000000.0], N[(N[(x + N[(N[(y * z), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.8e+69], N[Not[LessEqual[y, 2.55e+121]], $MachinePrecision]], t$95$1, N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(\frac{1}{b} + \frac{t}{b} \cdot \frac{x}{y \cdot z}\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{+14}:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(1 + \left(a + b \cdot \frac{y}{t}\right)\right)}\\
\mathbf{elif}\;y \leq 880000000:\\
\;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+69} \lor \neg \left(y \leq 2.55 \cdot 10^{+121}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -1.5000000000000001e127 or 8.8e8 < y < 2.79999999999999982e69 or 2.5500000000000002e121 < y Initial program 41.6%
associate-/l*47.2%
associate-/l*55.0%
Simplified55.0%
Taylor expanded in b around inf 34.8%
Taylor expanded in z around inf 70.9%
times-frac80.7%
*-commutative80.7%
Simplified80.7%
if -1.5000000000000001e127 < y < -7.2e14Initial program 60.2%
associate-/l*75.0%
associate-/l*74.9%
Simplified74.9%
clear-num75.0%
un-div-inv75.0%
Applied egg-rr75.0%
Taylor expanded in x around 0 45.0%
associate-/l*74.2%
associate-/l*74.1%
Simplified74.1%
if -7.2e14 < y < 8.8e8Initial program 95.8%
associate-/l*92.9%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in b around 0 82.0%
clear-num82.0%
associate-/r/82.0%
Applied egg-rr82.0%
if 2.79999999999999982e69 < y < 2.5500000000000002e121Initial program 80.4%
associate-/l*80.4%
associate-/l*86.6%
Simplified86.6%
Taylor expanded in b around 0 74.1%
Final simplification80.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* t (/ x (* y b))))))
(if (<= y -1.6e+127)
t_1
(if (<= y -15000000000.0)
(* y (/ z (* t (+ 1.0 (+ a (* b (/ y t)))))))
(if (<= y 14200000.0)
(/ (+ x (* (* y z) (/ 1.0 t))) (+ a 1.0))
(if (<= y 2.1e+72)
(/ z b)
(if (<= y 3.2e+121) (/ (+ x (/ (* y z) t)) (+ a 1.0)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + (t * (x / (y * b)));
double tmp;
if (y <= -1.6e+127) {
tmp = t_1;
} else if (y <= -15000000000.0) {
tmp = y * (z / (t * (1.0 + (a + (b * (y / t))))));
} else if (y <= 14200000.0) {
tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0);
} else if (y <= 2.1e+72) {
tmp = z / b;
} else if (y <= 3.2e+121) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} 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 = (z / b) + (t * (x / (y * b)))
if (y <= (-1.6d+127)) then
tmp = t_1
else if (y <= (-15000000000.0d0)) then
tmp = y * (z / (t * (1.0d0 + (a + (b * (y / t))))))
else if (y <= 14200000.0d0) then
tmp = (x + ((y * z) * (1.0d0 / t))) / (a + 1.0d0)
else if (y <= 2.1d+72) then
tmp = z / b
else if (y <= 3.2d+121) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
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 = (z / b) + (t * (x / (y * b)));
double tmp;
if (y <= -1.6e+127) {
tmp = t_1;
} else if (y <= -15000000000.0) {
tmp = y * (z / (t * (1.0 + (a + (b * (y / t))))));
} else if (y <= 14200000.0) {
tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0);
} else if (y <= 2.1e+72) {
tmp = z / b;
} else if (y <= 3.2e+121) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + (t * (x / (y * b))) tmp = 0 if y <= -1.6e+127: tmp = t_1 elif y <= -15000000000.0: tmp = y * (z / (t * (1.0 + (a + (b * (y / t)))))) elif y <= 14200000.0: tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0) elif y <= 2.1e+72: tmp = z / b elif y <= 3.2e+121: tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))) tmp = 0.0 if (y <= -1.6e+127) tmp = t_1; elseif (y <= -15000000000.0) tmp = Float64(y * Float64(z / Float64(t * Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))))); elseif (y <= 14200000.0) tmp = Float64(Float64(x + Float64(Float64(y * z) * Float64(1.0 / t))) / Float64(a + 1.0)); elseif (y <= 2.1e+72) tmp = Float64(z / b); elseif (y <= 3.2e+121) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + (t * (x / (y * b))); tmp = 0.0; if (y <= -1.6e+127) tmp = t_1; elseif (y <= -15000000000.0) tmp = y * (z / (t * (1.0 + (a + (b * (y / t)))))); elseif (y <= 14200000.0) tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0); elseif (y <= 2.1e+72) tmp = z / b; elseif (y <= 3.2e+121) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+127], t$95$1, If[LessEqual[y, -15000000000.0], N[(y * N[(z / N[(t * N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 14200000.0], N[(N[(x + N[(N[(y * z), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+72], N[(z / b), $MachinePrecision], If[LessEqual[y, 3.2e+121], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -15000000000:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(1 + \left(a + b \cdot \frac{y}{t}\right)\right)}\\
\mathbf{elif}\;y \leq 14200000:\\
\;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+72}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+121}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.59999999999999988e127 or 3.1999999999999999e121 < y Initial program 34.8%
associate-/l*41.6%
associate-/l*49.8%
Simplified49.8%
Taylor expanded in b around inf 27.7%
Taylor expanded in t around 0 67.6%
associate-/l*69.2%
Simplified69.2%
if -1.59999999999999988e127 < y < -1.5e10Initial program 60.2%
associate-/l*75.0%
associate-/l*74.9%
Simplified74.9%
clear-num75.0%
un-div-inv75.0%
Applied egg-rr75.0%
Taylor expanded in x around 0 45.0%
associate-/l*74.2%
associate-/l*74.1%
Simplified74.1%
if -1.5e10 < y < 1.42e7Initial program 95.8%
associate-/l*92.9%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in b around 0 82.0%
clear-num82.0%
associate-/r/82.0%
Applied egg-rr82.0%
if 1.42e7 < y < 2.1000000000000001e72Initial program 73.5%
associate-/l*73.5%
associate-/l*79.6%
Simplified79.6%
Taylor expanded in y around inf 80.8%
if 2.1000000000000001e72 < y < 3.1999999999999999e121Initial program 80.4%
associate-/l*80.4%
associate-/l*86.6%
Simplified86.6%
Taylor expanded in b around 0 74.1%
Final simplification77.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ (/ 1.0 b) (* (/ t b) (/ x (* y z)))))))
(if (<= y -1e+127)
t_1
(if (<= y -17.0)
(* (/ y t) (/ z (+ 1.0 (+ a (* y (/ b t))))))
(if (<= y 880000000.0)
(/ (+ x (* (* y z) (/ 1.0 t))) (+ a 1.0))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * ((1.0 / b) + ((t / b) * (x / (y * z))));
double tmp;
if (y <= -1e+127) {
tmp = t_1;
} else if (y <= -17.0) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} else if (y <= 880000000.0) {
tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0);
} 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 = z * ((1.0d0 / b) + ((t / b) * (x / (y * z))))
if (y <= (-1d+127)) then
tmp = t_1
else if (y <= (-17.0d0)) then
tmp = (y / t) * (z / (1.0d0 + (a + (y * (b / t)))))
else if (y <= 880000000.0d0) then
tmp = (x + ((y * z) * (1.0d0 / t))) / (a + 1.0d0)
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 = z * ((1.0 / b) + ((t / b) * (x / (y * z))));
double tmp;
if (y <= -1e+127) {
tmp = t_1;
} else if (y <= -17.0) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} else if (y <= 880000000.0) {
tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * ((1.0 / b) + ((t / b) * (x / (y * z)))) tmp = 0 if y <= -1e+127: tmp = t_1 elif y <= -17.0: tmp = (y / t) * (z / (1.0 + (a + (y * (b / t))))) elif y <= 880000000.0: tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(Float64(1.0 / b) + Float64(Float64(t / b) * Float64(x / Float64(y * z))))) tmp = 0.0 if (y <= -1e+127) tmp = t_1; elseif (y <= -17.0) tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + Float64(y * Float64(b / t)))))); elseif (y <= 880000000.0) tmp = Float64(Float64(x + Float64(Float64(y * z) * Float64(1.0 / t))) / Float64(a + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * ((1.0 / b) + ((t / b) * (x / (y * z)))); tmp = 0.0; if (y <= -1e+127) tmp = t_1; elseif (y <= -17.0) tmp = (y / t) * (z / (1.0 + (a + (y * (b / t))))); elseif (y <= 880000000.0) tmp = (x + ((y * z) * (1.0 / t))) / (a + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(N[(1.0 / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+127], t$95$1, If[LessEqual[y, -17.0], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 880000000.0], N[(N[(x + N[(N[(y * z), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(\frac{1}{b} + \frac{t}{b} \cdot \frac{x}{y \cdot z}\right)\\
\mathbf{if}\;y \leq -1 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -17:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;y \leq 880000000:\\
\;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.99999999999999955e126 or 8.8e8 < y Initial program 47.4%
associate-/l*52.2%
associate-/l*59.8%
Simplified59.8%
Taylor expanded in b around inf 32.0%
Taylor expanded in z around inf 64.3%
times-frac73.5%
*-commutative73.5%
Simplified73.5%
if -9.99999999999999955e126 < y < -17Initial program 65.4%
associate-/l*78.3%
associate-/l*78.2%
Simplified78.2%
Taylor expanded in x around 0 43.8%
times-frac73.1%
*-commutative73.1%
associate-/l*73.2%
Simplified73.2%
if -17 < y < 8.8e8Initial program 95.7%
associate-/l*92.8%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in b around 0 82.3%
clear-num82.3%
associate-/r/82.3%
Applied egg-rr82.3%
Final simplification78.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -14.5)
(/ z b)
(if (<= y 3100000.0)
(/ x (+ a 1.0))
(if (or (<= y 1.3e+72) (not (<= y 8e+125)))
(/ z b)
(* (/ y t) (/ z (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -14.5) {
tmp = z / b;
} else if (y <= 3100000.0) {
tmp = x / (a + 1.0);
} else if ((y <= 1.3e+72) || !(y <= 8e+125)) {
tmp = z / b;
} 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 (y <= (-14.5d0)) then
tmp = z / b
else if (y <= 3100000.0d0) then
tmp = x / (a + 1.0d0)
else if ((y <= 1.3d+72) .or. (.not. (y <= 8d+125))) then
tmp = z / b
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 (y <= -14.5) {
tmp = z / b;
} else if (y <= 3100000.0) {
tmp = x / (a + 1.0);
} else if ((y <= 1.3e+72) || !(y <= 8e+125)) {
tmp = z / b;
} else {
tmp = (y / t) * (z / (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -14.5: tmp = z / b elif y <= 3100000.0: tmp = x / (a + 1.0) elif (y <= 1.3e+72) or not (y <= 8e+125): tmp = z / b else: tmp = (y / t) * (z / (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -14.5) tmp = Float64(z / b); elseif (y <= 3100000.0) tmp = Float64(x / Float64(a + 1.0)); elseif ((y <= 1.3e+72) || !(y <= 8e+125)) tmp = Float64(z / b); 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 (y <= -14.5) tmp = z / b; elseif (y <= 3100000.0) tmp = x / (a + 1.0); elseif ((y <= 1.3e+72) || ~((y <= 8e+125))) tmp = z / b; else tmp = (y / t) * (z / (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -14.5], N[(z / b), $MachinePrecision], If[LessEqual[y, 3100000.0], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.3e+72], N[Not[LessEqual[y, 8e+125]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -14.5:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 3100000:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+72} \lor \neg \left(y \leq 8 \cdot 10^{+125}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\end{array}
\end{array}
if y < -14.5 or 3.1e6 < y < 1.29999999999999991e72 or 7.9999999999999994e125 < y Initial program 46.5%
associate-/l*53.6%
associate-/l*59.8%
Simplified59.8%
Taylor expanded in y around inf 61.1%
if -14.5 < y < 3.1e6Initial program 95.7%
associate-/l*92.8%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in y around 0 68.6%
if 1.29999999999999991e72 < y < 7.9999999999999994e125Initial program 80.4%
associate-/l*80.4%
associate-/l*86.6%
Simplified86.6%
Taylor expanded in x around 0 48.9%
Taylor expanded in y around 0 42.5%
times-frac55.1%
*-commutative55.1%
+-commutative55.1%
Applied egg-rr55.1%
Final simplification64.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9e+127) (not (<= y 5.4e+150))) (* z (+ (/ 1.0 b) (* (/ t b) (/ x (* y z))))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ (* y b) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9e+127) || !(y <= 5.4e+150)) {
tmp = z * ((1.0 / b) + ((t / b) * (x / (y * z))));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + ((y * b) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-9d+127)) .or. (.not. (y <= 5.4d+150))) then
tmp = z * ((1.0d0 / b) + ((t / b) * (x / (y * z))))
else
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + ((y * b) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9e+127) || !(y <= 5.4e+150)) {
tmp = z * ((1.0 / b) + ((t / b) * (x / (y * z))));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + ((y * b) / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9e+127) or not (y <= 5.4e+150): tmp = z * ((1.0 / b) + ((t / b) * (x / (y * z)))) else: tmp = (x + (y * (z / t))) / ((a + 1.0) + ((y * b) / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9e+127) || !(y <= 5.4e+150)) tmp = Float64(z * Float64(Float64(1.0 / b) + Float64(Float64(t / b) * Float64(x / Float64(y * z))))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9e+127) || ~((y <= 5.4e+150))) tmp = z * ((1.0 / b) + ((t / b) * (x / (y * z)))); else tmp = (x + (y * (z / t))) / ((a + 1.0) + ((y * b) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9e+127], N[Not[LessEqual[y, 5.4e+150]], $MachinePrecision]], N[(z * N[(N[(1.0 / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+127} \lor \neg \left(y \leq 5.4 \cdot 10^{+150}\right):\\
\;\;\;\;z \cdot \left(\frac{1}{b} + \frac{t}{b} \cdot \frac{x}{y \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\end{array}
\end{array}
if y < -9.00000000000000068e127 or 5.40000000000000015e150 < y Initial program 30.9%
associate-/l*38.0%
associate-/l*46.8%
Simplified46.8%
Taylor expanded in b around inf 24.9%
Taylor expanded in z around inf 67.1%
times-frac79.7%
*-commutative79.7%
Simplified79.7%
if -9.00000000000000068e127 < y < 5.40000000000000015e150Initial program 89.3%
associate-*r/88.7%
*-commutative88.7%
Applied egg-rr88.7%
Final simplification86.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.5e-129) (not (<= t 3.2e-83))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (+ (/ z b) (* t (/ x (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.5e-129) || !(t <= 3.2e-83)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + (t * (x / (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.5d-129)) .or. (.not. (t <= 3.2d-83))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z / b) + (t * (x / (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.5e-129) || !(t <= 3.2e-83)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + (t * (x / (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.5e-129) or not (t <= 3.2e-83): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z / b) + (t * (x / (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.5e-129) || !(t <= 3.2e-83)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.5e-129) || ~((t <= 3.2e-83))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z / b) + (t * (x / (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.5e-129], N[Not[LessEqual[t, 3.2e-83]], $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[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-129} \lor \neg \left(t \leq 3.2 \cdot 10^{-83}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.4999999999999999e-129 or 3.2000000000000001e-83 < t Initial program 83.2%
associate-/l*86.9%
associate-/l*91.2%
Simplified91.2%
if -1.4999999999999999e-129 < t < 3.2000000000000001e-83Initial program 53.8%
associate-/l*49.9%
associate-/l*42.6%
Simplified42.6%
Taylor expanded in b around inf 43.6%
Taylor expanded in t around 0 76.2%
associate-/l*73.7%
Simplified73.7%
Final simplification85.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -5.5)
(not (or (<= y 430.0) (and (not (<= y 3.3e+70)) (<= y 2.8e+94)))))
(/ z b)
(/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.5) || !((y <= 430.0) || (!(y <= 3.3e+70) && (y <= 2.8e+94)))) {
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 <= (-5.5d0)) .or. (.not. (y <= 430.0d0) .or. (.not. (y <= 3.3d+70)) .and. (y <= 2.8d+94))) 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 <= -5.5) || !((y <= 430.0) || (!(y <= 3.3e+70) && (y <= 2.8e+94)))) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.5) or not ((y <= 430.0) or (not (y <= 3.3e+70) and (y <= 2.8e+94))): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.5) || !((y <= 430.0) || (!(y <= 3.3e+70) && (y <= 2.8e+94)))) 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 <= -5.5) || ~(((y <= 430.0) || (~((y <= 3.3e+70)) && (y <= 2.8e+94))))) 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, -5.5], N[Not[Or[LessEqual[y, 430.0], And[N[Not[LessEqual[y, 3.3e+70]], $MachinePrecision], LessEqual[y, 2.8e+94]]]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \lor \neg \left(y \leq 430 \lor \neg \left(y \leq 3.3 \cdot 10^{+70}\right) \land y \leq 2.8 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -5.5 or 430 < y < 3.30000000000000016e70 or 2.79999999999999998e94 < y Initial program 48.5%
associate-/l*55.1%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in y around inf 59.6%
if -5.5 < y < 430 or 3.30000000000000016e70 < y < 2.79999999999999998e94Initial program 95.2%
associate-/l*92.4%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in y around 0 68.8%
Final simplification64.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7.5e-117) (not (<= t 1.3e-15))) (/ (+ x (/ (* y z) t)) (+ a 1.0)) (+ (/ z b) (* t (/ x (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.5e-117) || !(t <= 1.3e-15)) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (z / b) + (t * (x / (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 <= (-7.5d-117)) .or. (.not. (t <= 1.3d-15))) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else
tmp = (z / b) + (t * (x / (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 <= -7.5e-117) || !(t <= 1.3e-15)) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (z / b) + (t * (x / (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7.5e-117) or not (t <= 1.3e-15): tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = (z / b) + (t * (x / (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7.5e-117) || !(t <= 1.3e-15)) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -7.5e-117) || ~((t <= 1.3e-15))) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = (z / b) + (t * (x / (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7.5e-117], N[Not[LessEqual[t, 1.3e-15]], $MachinePrecision]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{-117} \lor \neg \left(t \leq 1.3 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\end{array}
\end{array}
if t < -7.50000000000000066e-117 or 1.30000000000000002e-15 < t Initial program 82.9%
associate-/l*87.0%
associate-/l*91.6%
Simplified91.6%
Taylor expanded in b around 0 74.2%
if -7.50000000000000066e-117 < t < 1.30000000000000002e-15Initial program 59.1%
associate-/l*55.8%
associate-/l*49.7%
Simplified49.7%
Taylor expanded in b around inf 44.4%
Taylor expanded in t around 0 72.8%
associate-/l*70.7%
Simplified70.7%
Final simplification73.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.55e-124) (not (<= t 3.3e-15))) (/ x (+ 1.0 (+ a (* y (/ b t))))) (+ (/ z b) (* t (/ x (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.55e-124) || !(t <= 3.3e-15)) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else {
tmp = (z / b) + (t * (x / (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.55d-124)) .or. (.not. (t <= 3.3d-15))) then
tmp = x / (1.0d0 + (a + (y * (b / t))))
else
tmp = (z / b) + (t * (x / (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.55e-124) || !(t <= 3.3e-15)) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else {
tmp = (z / b) + (t * (x / (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.55e-124) or not (t <= 3.3e-15): tmp = x / (1.0 + (a + (y * (b / t)))) else: tmp = (z / b) + (t * (x / (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.55e-124) || !(t <= 3.3e-15)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); else tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.55e-124) || ~((t <= 3.3e-15))) tmp = x / (1.0 + (a + (y * (b / t)))); else tmp = (z / b) + (t * (x / (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.55e-124], N[Not[LessEqual[t, 3.3e-15]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-124} \lor \neg \left(t \leq 3.3 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.5499999999999999e-124 or 3.3e-15 < t Initial program 83.1%
associate-/l*87.1%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in x around inf 64.5%
*-commutative64.5%
associate-/l*68.6%
Simplified68.6%
if -1.5499999999999999e-124 < t < 3.3e-15Initial program 58.2%
associate-/l*54.9%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in b around inf 44.2%
Taylor expanded in t around 0 73.3%
associate-/l*71.2%
Simplified71.2%
Final simplification69.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.2e-126) (not (<= t 7.4e-16))) (/ x (+ 1.0 (+ a (* b (/ y t))))) (+ (/ z b) (* t (/ x (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.2e-126) || !(t <= 7.4e-16)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = (z / b) + (t * (x / (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.2d-126)) .or. (.not. (t <= 7.4d-16))) then
tmp = x / (1.0d0 + (a + (b * (y / t))))
else
tmp = (z / b) + (t * (x / (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.2e-126) || !(t <= 7.4e-16)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = (z / b) + (t * (x / (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.2e-126) or not (t <= 7.4e-16): tmp = x / (1.0 + (a + (b * (y / t)))) else: tmp = (z / b) + (t * (x / (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.2e-126) || !(t <= 7.4e-16)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); else tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.2e-126) || ~((t <= 7.4e-16))) tmp = x / (1.0 + (a + (b * (y / t)))); else tmp = (z / b) + (t * (x / (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.2e-126], N[Not[LessEqual[t, 7.4e-16]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-126} \lor \neg \left(t \leq 7.4 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\end{array}
\end{array}
if t < -4.1999999999999997e-126 or 7.3999999999999999e-16 < t Initial program 83.1%
associate-/l*87.1%
associate-/l*91.7%
Simplified91.7%
clear-num91.7%
un-div-inv91.8%
Applied egg-rr91.8%
Taylor expanded in x around inf 64.5%
associate-/l*68.5%
Simplified68.5%
if -4.1999999999999997e-126 < t < 7.3999999999999999e-16Initial program 58.2%
associate-/l*54.9%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in b around inf 44.2%
Taylor expanded in t around 0 73.3%
associate-/l*71.2%
Simplified71.2%
Final simplification69.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.85e-16) (not (<= t 3.2e-14))) (/ x (+ a 1.0)) (+ (/ z b) (* t (/ x (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.85e-16) || !(t <= 3.2e-14)) {
tmp = x / (a + 1.0);
} else {
tmp = (z / b) + (t * (x / (y * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.85d-16)) .or. (.not. (t <= 3.2d-14))) then
tmp = x / (a + 1.0d0)
else
tmp = (z / b) + (t * (x / (y * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.85e-16) || !(t <= 3.2e-14)) {
tmp = x / (a + 1.0);
} else {
tmp = (z / b) + (t * (x / (y * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.85e-16) or not (t <= 3.2e-14): tmp = x / (a + 1.0) else: tmp = (z / b) + (t * (x / (y * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.85e-16) || !(t <= 3.2e-14)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.85e-16) || ~((t <= 3.2e-14))) tmp = x / (a + 1.0); else tmp = (z / b) + (t * (x / (y * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.85e-16], N[Not[LessEqual[t, 3.2e-14]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-16} \lor \neg \left(t \leq 3.2 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.85e-16 or 3.2000000000000002e-14 < t Initial program 83.0%
associate-/l*88.4%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in y around 0 64.0%
if -1.85e-16 < t < 3.2000000000000002e-14Initial program 63.5%
associate-/l*60.1%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in b around inf 41.6%
Taylor expanded in t around 0 67.1%
associate-/l*65.4%
Simplified65.4%
Final simplification64.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t 3.3e+32) (/ z b) (* y (/ z t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 3.3e+32) {
tmp = z / b;
} else {
tmp = y * (z / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 3.3d+32) then
tmp = z / b
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 3.3e+32) {
tmp = z / b;
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 3.3e+32: tmp = z / b else: tmp = y * (z / t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 3.3e+32) tmp = Float64(z / b); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 3.3e+32) tmp = z / b; else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 3.3e+32], N[(z / b), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.3 \cdot 10^{+32}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if t < 3.3000000000000002e32Initial program 70.2%
associate-/l*70.7%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in y around inf 39.5%
if 3.3000000000000002e32 < t Initial program 88.2%
associate-/l*93.1%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in x around 0 26.0%
Taylor expanded in y around 0 25.9%
Taylor expanded in a around 0 17.3%
associate-*r/19.4%
Simplified19.4%
(FPCore (x y z t a b) :precision binary64 (/ z b))
double code(double x, double y, double z, double t, double a, double b) {
return z / b;
}
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 = z / b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return z / b;
}
def code(x, y, z, t, a, b): return z / b
function code(x, y, z, t, a, b) return Float64(z / b) end
function tmp = code(x, y, z, t, a, b) tmp = z / b; end
code[x_, y_, z_, t_, a_, b_] := N[(z / b), $MachinePrecision]
\begin{array}{l}
\\
\frac{z}{b}
\end{array}
Initial program 74.2%
associate-/l*75.7%
associate-/l*76.4%
Simplified76.4%
Taylor expanded in y around inf 31.8%
(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 2024111
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(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))))