
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * 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 = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * 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 = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0)))
(t_2 (+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) t_1)))
(if (<= t_2 INFINITY) t_2 (+ x t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1;
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = x + t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1;
double tmp;
if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((y + t) - 2.0) t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1 tmp = 0 if t_2 <= math.inf: tmp = t_2 else: tmp = x + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) t_2 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + t_1) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * ((y + t) - 2.0); t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1; tmp = 0.0; if (t_2 <= Inf) tmp = t_2; else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(x + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_2 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + t_1\\
\mathbf{if}\;t_2 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) Initial program 0.0%
Taylor expanded in a around 0 33.3%
Taylor expanded in z around 0 66.7%
Final simplification98.8%
(FPCore (x y z t a b) :precision binary64 (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b) return fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Initial program 96.5%
+-commutative96.5%
fma-def97.2%
associate--l+97.2%
sub-neg97.2%
metadata-eval97.2%
sub-neg97.2%
associate-+l-97.2%
fma-neg97.2%
sub-neg97.2%
metadata-eval97.2%
remove-double-neg97.2%
sub-neg97.2%
metadata-eval97.2%
Simplified97.2%
Final simplification97.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- (+ y t) 2.0))))
(t_2 (+ x (- a (* t a))))
(t_3 (* z (- 1.0 y))))
(if (<= b -1.36e+75)
t_1
(if (<= b -4.7e-92)
t_2
(if (<= b -4.2e-205)
(- x (* y z))
(if (<= b -1.82e-234)
t_2
(if (<= b -2.5e-269)
t_3
(if (<= b 3.35e-186)
t_2
(if (or (<= b 1.26e-85)
(and (not (<= b 1.46e+40)) (<= b 6e+85)))
t_3
t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((y + t) - 2.0));
double t_2 = x + (a - (t * a));
double t_3 = z * (1.0 - y);
double tmp;
if (b <= -1.36e+75) {
tmp = t_1;
} else if (b <= -4.7e-92) {
tmp = t_2;
} else if (b <= -4.2e-205) {
tmp = x - (y * z);
} else if (b <= -1.82e-234) {
tmp = t_2;
} else if (b <= -2.5e-269) {
tmp = t_3;
} else if (b <= 3.35e-186) {
tmp = t_2;
} else if ((b <= 1.26e-85) || (!(b <= 1.46e+40) && (b <= 6e+85))) {
tmp = t_3;
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x + (b * ((y + t) - 2.0d0))
t_2 = x + (a - (t * a))
t_3 = z * (1.0d0 - y)
if (b <= (-1.36d+75)) then
tmp = t_1
else if (b <= (-4.7d-92)) then
tmp = t_2
else if (b <= (-4.2d-205)) then
tmp = x - (y * z)
else if (b <= (-1.82d-234)) then
tmp = t_2
else if (b <= (-2.5d-269)) then
tmp = t_3
else if (b <= 3.35d-186) then
tmp = t_2
else if ((b <= 1.26d-85) .or. (.not. (b <= 1.46d+40)) .and. (b <= 6d+85)) then
tmp = t_3
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 + (b * ((y + t) - 2.0));
double t_2 = x + (a - (t * a));
double t_3 = z * (1.0 - y);
double tmp;
if (b <= -1.36e+75) {
tmp = t_1;
} else if (b <= -4.7e-92) {
tmp = t_2;
} else if (b <= -4.2e-205) {
tmp = x - (y * z);
} else if (b <= -1.82e-234) {
tmp = t_2;
} else if (b <= -2.5e-269) {
tmp = t_3;
} else if (b <= 3.35e-186) {
tmp = t_2;
} else if ((b <= 1.26e-85) || (!(b <= 1.46e+40) && (b <= 6e+85))) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * ((y + t) - 2.0)) t_2 = x + (a - (t * a)) t_3 = z * (1.0 - y) tmp = 0 if b <= -1.36e+75: tmp = t_1 elif b <= -4.7e-92: tmp = t_2 elif b <= -4.2e-205: tmp = x - (y * z) elif b <= -1.82e-234: tmp = t_2 elif b <= -2.5e-269: tmp = t_3 elif b <= 3.35e-186: tmp = t_2 elif (b <= 1.26e-85) or (not (b <= 1.46e+40) and (b <= 6e+85)): tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) t_2 = Float64(x + Float64(a - Float64(t * a))) t_3 = Float64(z * Float64(1.0 - y)) tmp = 0.0 if (b <= -1.36e+75) tmp = t_1; elseif (b <= -4.7e-92) tmp = t_2; elseif (b <= -4.2e-205) tmp = Float64(x - Float64(y * z)); elseif (b <= -1.82e-234) tmp = t_2; elseif (b <= -2.5e-269) tmp = t_3; elseif (b <= 3.35e-186) tmp = t_2; elseif ((b <= 1.26e-85) || (!(b <= 1.46e+40) && (b <= 6e+85))) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * ((y + t) - 2.0)); t_2 = x + (a - (t * a)); t_3 = z * (1.0 - y); tmp = 0.0; if (b <= -1.36e+75) tmp = t_1; elseif (b <= -4.7e-92) tmp = t_2; elseif (b <= -4.2e-205) tmp = x - (y * z); elseif (b <= -1.82e-234) tmp = t_2; elseif (b <= -2.5e-269) tmp = t_3; elseif (b <= 3.35e-186) tmp = t_2; elseif ((b <= 1.26e-85) || (~((b <= 1.46e+40)) && (b <= 6e+85))) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.36e+75], t$95$1, If[LessEqual[b, -4.7e-92], t$95$2, If[LessEqual[b, -4.2e-205], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.82e-234], t$95$2, If[LessEqual[b, -2.5e-269], t$95$3, If[LessEqual[b, 3.35e-186], t$95$2, If[Or[LessEqual[b, 1.26e-85], And[N[Not[LessEqual[b, 1.46e+40]], $MachinePrecision], LessEqual[b, 6e+85]]], t$95$3, t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
t_2 := x + \left(a - t \cdot a\right)\\
t_3 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -1.36 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -4.7 \cdot 10^{-92}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-205}:\\
\;\;\;\;x - y \cdot z\\
\mathbf{elif}\;b \leq -1.82 \cdot 10^{-234}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2.5 \cdot 10^{-269}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{-186}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 1.26 \cdot 10^{-85} \lor \neg \left(b \leq 1.46 \cdot 10^{+40}\right) \land b \leq 6 \cdot 10^{+85}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -1.36e75 or 1.26e-85 < b < 1.46e40 or 6.0000000000000001e85 < b Initial program 92.9%
Taylor expanded in a around 0 87.1%
Taylor expanded in z around 0 82.1%
if -1.36e75 < b < -4.69999999999999993e-92 or -4.19999999999999965e-205 < b < -1.8200000000000001e-234 or -2.49999999999999989e-269 < b < 3.35000000000000017e-186Initial program 100.0%
Taylor expanded in b around 0 91.2%
Taylor expanded in a around inf 70.6%
sub-neg70.6%
metadata-eval70.6%
distribute-rgt-in70.6%
*-commutative70.6%
neg-mul-170.6%
unsub-neg70.6%
Simplified70.6%
if -4.69999999999999993e-92 < b < -4.19999999999999965e-205Initial program 100.0%
Taylor expanded in b around 0 93.4%
Taylor expanded in y around inf 63.3%
if -1.8200000000000001e-234 < b < -2.49999999999999989e-269 or 3.35000000000000017e-186 < b < 1.26e-85 or 1.46e40 < b < 6.0000000000000001e85Initial program 97.6%
Taylor expanded in z around inf 68.3%
Final simplification74.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (* y z)))
(t_2 (* z (- 1.0 y)))
(t_3 (* b (- (+ y t) 2.0)))
(t_4 (* t (- b a))))
(if (<= b -2.9e+123)
t_3
(if (<= b -0.0095)
t_1
(if (<= b -7e-53)
t_4
(if (<= b -2e-90)
(* a (- 1.0 t))
(if (<= b 2.8e-306)
t_1
(if (<= b 1.8e-248)
(- x (* t a))
(if (<= b 1.65e-85)
t_2
(if (<= b 4e-7) t_4 (if (<= b 1.8e+87) t_2 t_3)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (y * z);
double t_2 = z * (1.0 - y);
double t_3 = b * ((y + t) - 2.0);
double t_4 = t * (b - a);
double tmp;
if (b <= -2.9e+123) {
tmp = t_3;
} else if (b <= -0.0095) {
tmp = t_1;
} else if (b <= -7e-53) {
tmp = t_4;
} else if (b <= -2e-90) {
tmp = a * (1.0 - t);
} else if (b <= 2.8e-306) {
tmp = t_1;
} else if (b <= 1.8e-248) {
tmp = x - (t * a);
} else if (b <= 1.65e-85) {
tmp = t_2;
} else if (b <= 4e-7) {
tmp = t_4;
} else if (b <= 1.8e+87) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = x - (y * z)
t_2 = z * (1.0d0 - y)
t_3 = b * ((y + t) - 2.0d0)
t_4 = t * (b - a)
if (b <= (-2.9d+123)) then
tmp = t_3
else if (b <= (-0.0095d0)) then
tmp = t_1
else if (b <= (-7d-53)) then
tmp = t_4
else if (b <= (-2d-90)) then
tmp = a * (1.0d0 - t)
else if (b <= 2.8d-306) then
tmp = t_1
else if (b <= 1.8d-248) then
tmp = x - (t * a)
else if (b <= 1.65d-85) then
tmp = t_2
else if (b <= 4d-7) then
tmp = t_4
else if (b <= 1.8d+87) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (y * z);
double t_2 = z * (1.0 - y);
double t_3 = b * ((y + t) - 2.0);
double t_4 = t * (b - a);
double tmp;
if (b <= -2.9e+123) {
tmp = t_3;
} else if (b <= -0.0095) {
tmp = t_1;
} else if (b <= -7e-53) {
tmp = t_4;
} else if (b <= -2e-90) {
tmp = a * (1.0 - t);
} else if (b <= 2.8e-306) {
tmp = t_1;
} else if (b <= 1.8e-248) {
tmp = x - (t * a);
} else if (b <= 1.65e-85) {
tmp = t_2;
} else if (b <= 4e-7) {
tmp = t_4;
} else if (b <= 1.8e+87) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (y * z) t_2 = z * (1.0 - y) t_3 = b * ((y + t) - 2.0) t_4 = t * (b - a) tmp = 0 if b <= -2.9e+123: tmp = t_3 elif b <= -0.0095: tmp = t_1 elif b <= -7e-53: tmp = t_4 elif b <= -2e-90: tmp = a * (1.0 - t) elif b <= 2.8e-306: tmp = t_1 elif b <= 1.8e-248: tmp = x - (t * a) elif b <= 1.65e-85: tmp = t_2 elif b <= 4e-7: tmp = t_4 elif b <= 1.8e+87: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(y * z)) t_2 = Float64(z * Float64(1.0 - y)) t_3 = Float64(b * Float64(Float64(y + t) - 2.0)) t_4 = Float64(t * Float64(b - a)) tmp = 0.0 if (b <= -2.9e+123) tmp = t_3; elseif (b <= -0.0095) tmp = t_1; elseif (b <= -7e-53) tmp = t_4; elseif (b <= -2e-90) tmp = Float64(a * Float64(1.0 - t)); elseif (b <= 2.8e-306) tmp = t_1; elseif (b <= 1.8e-248) tmp = Float64(x - Float64(t * a)); elseif (b <= 1.65e-85) tmp = t_2; elseif (b <= 4e-7) tmp = t_4; elseif (b <= 1.8e+87) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - (y * z); t_2 = z * (1.0 - y); t_3 = b * ((y + t) - 2.0); t_4 = t * (b - a); tmp = 0.0; if (b <= -2.9e+123) tmp = t_3; elseif (b <= -0.0095) tmp = t_1; elseif (b <= -7e-53) tmp = t_4; elseif (b <= -2e-90) tmp = a * (1.0 - t); elseif (b <= 2.8e-306) tmp = t_1; elseif (b <= 1.8e-248) tmp = x - (t * a); elseif (b <= 1.65e-85) tmp = t_2; elseif (b <= 4e-7) tmp = t_4; elseif (b <= 1.8e+87) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.9e+123], t$95$3, If[LessEqual[b, -0.0095], t$95$1, If[LessEqual[b, -7e-53], t$95$4, If[LessEqual[b, -2e-90], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e-306], t$95$1, If[LessEqual[b, 1.8e-248], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.65e-85], t$95$2, If[LessEqual[b, 4e-7], t$95$4, If[LessEqual[b, 1.8e+87], t$95$2, t$95$3]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := z \cdot \left(1 - y\right)\\
t_3 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_4 := t \cdot \left(b - a\right)\\
\mathbf{if}\;b \leq -2.9 \cdot 10^{+123}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -0.0095:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-53}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \leq -2 \cdot 10^{-90}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{-306}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{-248}:\\
\;\;\;\;x - t \cdot a\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{-85}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 4 \cdot 10^{-7}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{+87}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if b < -2.9000000000000001e123 or 1.79999999999999997e87 < b Initial program 90.7%
Taylor expanded in b around inf 80.6%
if -2.9000000000000001e123 < b < -0.00949999999999999976 or -1.99999999999999999e-90 < b < 2.8000000000000001e-306Initial program 100.0%
Taylor expanded in b around 0 90.5%
Taylor expanded in y around inf 61.2%
if -0.00949999999999999976 < b < -6.99999999999999987e-53 or 1.64999999999999986e-85 < b < 3.9999999999999998e-7Initial program 99.8%
Taylor expanded in t around inf 59.2%
if -6.99999999999999987e-53 < b < -1.99999999999999999e-90Initial program 100.0%
Taylor expanded in a around inf 61.6%
if 2.8000000000000001e-306 < b < 1.79999999999999992e-248Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in t around inf 69.9%
if 1.79999999999999992e-248 < b < 1.64999999999999986e-85 or 3.9999999999999998e-7 < b < 1.79999999999999997e87Initial program 98.1%
Taylor expanded in z around inf 56.0%
Final simplification67.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (- a (* t a))))
(t_2 (* z (- 1.0 y)))
(t_3 (* b (- (+ y t) 2.0))))
(if (<= b -1.4e+103)
t_3
(if (<= b -3.4e-91)
t_1
(if (<= b -3.1e-204)
(- x (* y z))
(if (<= b -5.3e-236)
t_1
(if (<= b -5.2e-274)
t_2
(if (<= b 3.35e-186)
t_1
(if (<= b 5e-81)
t_2
(if (<= b 5.8e+44)
(+ x (* b (- t 2.0)))
(if (<= b 6e+85) t_2 t_3)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a - (t * a));
double t_2 = z * (1.0 - y);
double t_3 = b * ((y + t) - 2.0);
double tmp;
if (b <= -1.4e+103) {
tmp = t_3;
} else if (b <= -3.4e-91) {
tmp = t_1;
} else if (b <= -3.1e-204) {
tmp = x - (y * z);
} else if (b <= -5.3e-236) {
tmp = t_1;
} else if (b <= -5.2e-274) {
tmp = t_2;
} else if (b <= 3.35e-186) {
tmp = t_1;
} else if (b <= 5e-81) {
tmp = t_2;
} else if (b <= 5.8e+44) {
tmp = x + (b * (t - 2.0));
} else if (b <= 6e+85) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x + (a - (t * a))
t_2 = z * (1.0d0 - y)
t_3 = b * ((y + t) - 2.0d0)
if (b <= (-1.4d+103)) then
tmp = t_3
else if (b <= (-3.4d-91)) then
tmp = t_1
else if (b <= (-3.1d-204)) then
tmp = x - (y * z)
else if (b <= (-5.3d-236)) then
tmp = t_1
else if (b <= (-5.2d-274)) then
tmp = t_2
else if (b <= 3.35d-186) then
tmp = t_1
else if (b <= 5d-81) then
tmp = t_2
else if (b <= 5.8d+44) then
tmp = x + (b * (t - 2.0d0))
else if (b <= 6d+85) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a - (t * a));
double t_2 = z * (1.0 - y);
double t_3 = b * ((y + t) - 2.0);
double tmp;
if (b <= -1.4e+103) {
tmp = t_3;
} else if (b <= -3.4e-91) {
tmp = t_1;
} else if (b <= -3.1e-204) {
tmp = x - (y * z);
} else if (b <= -5.3e-236) {
tmp = t_1;
} else if (b <= -5.2e-274) {
tmp = t_2;
} else if (b <= 3.35e-186) {
tmp = t_1;
} else if (b <= 5e-81) {
tmp = t_2;
} else if (b <= 5.8e+44) {
tmp = x + (b * (t - 2.0));
} else if (b <= 6e+85) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a - (t * a)) t_2 = z * (1.0 - y) t_3 = b * ((y + t) - 2.0) tmp = 0 if b <= -1.4e+103: tmp = t_3 elif b <= -3.4e-91: tmp = t_1 elif b <= -3.1e-204: tmp = x - (y * z) elif b <= -5.3e-236: tmp = t_1 elif b <= -5.2e-274: tmp = t_2 elif b <= 3.35e-186: tmp = t_1 elif b <= 5e-81: tmp = t_2 elif b <= 5.8e+44: tmp = x + (b * (t - 2.0)) elif b <= 6e+85: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a - Float64(t * a))) t_2 = Float64(z * Float64(1.0 - y)) t_3 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -1.4e+103) tmp = t_3; elseif (b <= -3.4e-91) tmp = t_1; elseif (b <= -3.1e-204) tmp = Float64(x - Float64(y * z)); elseif (b <= -5.3e-236) tmp = t_1; elseif (b <= -5.2e-274) tmp = t_2; elseif (b <= 3.35e-186) tmp = t_1; elseif (b <= 5e-81) tmp = t_2; elseif (b <= 5.8e+44) tmp = Float64(x + Float64(b * Float64(t - 2.0))); elseif (b <= 6e+85) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a - (t * a)); t_2 = z * (1.0 - y); t_3 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -1.4e+103) tmp = t_3; elseif (b <= -3.4e-91) tmp = t_1; elseif (b <= -3.1e-204) tmp = x - (y * z); elseif (b <= -5.3e-236) tmp = t_1; elseif (b <= -5.2e-274) tmp = t_2; elseif (b <= 3.35e-186) tmp = t_1; elseif (b <= 5e-81) tmp = t_2; elseif (b <= 5.8e+44) tmp = x + (b * (t - 2.0)); elseif (b <= 6e+85) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.4e+103], t$95$3, If[LessEqual[b, -3.4e-91], t$95$1, If[LessEqual[b, -3.1e-204], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.3e-236], t$95$1, If[LessEqual[b, -5.2e-274], t$95$2, If[LessEqual[b, 3.35e-186], t$95$1, If[LessEqual[b, 5e-81], t$95$2, If[LessEqual[b, 5.8e+44], N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e+85], t$95$2, t$95$3]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(a - t \cdot a\right)\\
t_2 := z \cdot \left(1 - y\right)\\
t_3 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.4 \cdot 10^{+103}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -3.4 \cdot 10^{-91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -3.1 \cdot 10^{-204}:\\
\;\;\;\;x - y \cdot z\\
\mathbf{elif}\;b \leq -5.3 \cdot 10^{-236}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -5.2 \cdot 10^{-274}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{-186}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-81}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 5.8 \cdot 10^{+44}:\\
\;\;\;\;x + b \cdot \left(t - 2\right)\\
\mathbf{elif}\;b \leq 6 \cdot 10^{+85}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if b < -1.40000000000000004e103 or 6.0000000000000001e85 < b Initial program 91.1%
Taylor expanded in b around inf 79.2%
if -1.40000000000000004e103 < b < -3.40000000000000027e-91 or -3.0999999999999999e-204 < b < -5.3000000000000002e-236 or -5.2e-274 < b < 3.35000000000000017e-186Initial program 100.0%
Taylor expanded in b around 0 90.5%
Taylor expanded in a around inf 71.3%
sub-neg71.3%
metadata-eval71.3%
distribute-rgt-in71.3%
*-commutative71.3%
neg-mul-171.3%
unsub-neg71.3%
Simplified71.3%
if -3.40000000000000027e-91 < b < -3.0999999999999999e-204Initial program 100.0%
Taylor expanded in b around 0 93.4%
Taylor expanded in y around inf 63.3%
if -5.3000000000000002e-236 < b < -5.2e-274 or 3.35000000000000017e-186 < b < 4.99999999999999981e-81 or 5.8000000000000004e44 < b < 6.0000000000000001e85Initial program 97.5%
Taylor expanded in z around inf 70.0%
if 4.99999999999999981e-81 < b < 5.8000000000000004e44Initial program 99.8%
Taylor expanded in a around 0 70.7%
Taylor expanded in z around 0 55.8%
Taylor expanded in y around 0 50.8%
Final simplification71.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ z (- a (* t a))))) (t_2 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -1.72e+75)
t_2
(if (<= b 4.9e-53)
t_1
(if (<= b 5.5e+34)
t_2
(if (<= b 3.2e+56)
t_1
(if (<= b 1.2e+91)
(* y (- b z))
(if (<= b 1.15e+104) (* a (- 1.0 t)) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z + (a - (t * a)));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.72e+75) {
tmp = t_2;
} else if (b <= 4.9e-53) {
tmp = t_1;
} else if (b <= 5.5e+34) {
tmp = t_2;
} else if (b <= 3.2e+56) {
tmp = t_1;
} else if (b <= 1.2e+91) {
tmp = y * (b - z);
} else if (b <= 1.15e+104) {
tmp = a * (1.0 - t);
} else {
tmp = 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 + (z + (a - (t * a)))
t_2 = x + (b * ((y + t) - 2.0d0))
if (b <= (-1.72d+75)) then
tmp = t_2
else if (b <= 4.9d-53) then
tmp = t_1
else if (b <= 5.5d+34) then
tmp = t_2
else if (b <= 3.2d+56) then
tmp = t_1
else if (b <= 1.2d+91) then
tmp = y * (b - z)
else if (b <= 1.15d+104) then
tmp = a * (1.0d0 - t)
else
tmp = 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 + (z + (a - (t * a)));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.72e+75) {
tmp = t_2;
} else if (b <= 4.9e-53) {
tmp = t_1;
} else if (b <= 5.5e+34) {
tmp = t_2;
} else if (b <= 3.2e+56) {
tmp = t_1;
} else if (b <= 1.2e+91) {
tmp = y * (b - z);
} else if (b <= 1.15e+104) {
tmp = a * (1.0 - t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z + (a - (t * a))) t_2 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -1.72e+75: tmp = t_2 elif b <= 4.9e-53: tmp = t_1 elif b <= 5.5e+34: tmp = t_2 elif b <= 3.2e+56: tmp = t_1 elif b <= 1.2e+91: tmp = y * (b - z) elif b <= 1.15e+104: tmp = a * (1.0 - t) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z + Float64(a - Float64(t * a)))) t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -1.72e+75) tmp = t_2; elseif (b <= 4.9e-53) tmp = t_1; elseif (b <= 5.5e+34) tmp = t_2; elseif (b <= 3.2e+56) tmp = t_1; elseif (b <= 1.2e+91) tmp = Float64(y * Float64(b - z)); elseif (b <= 1.15e+104) tmp = Float64(a * Float64(1.0 - t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z + (a - (t * a))); t_2 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -1.72e+75) tmp = t_2; elseif (b <= 4.9e-53) tmp = t_1; elseif (b <= 5.5e+34) tmp = t_2; elseif (b <= 3.2e+56) tmp = t_1; elseif (b <= 1.2e+91) tmp = y * (b - z); elseif (b <= 1.15e+104) tmp = a * (1.0 - t); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.72e+75], t$95$2, If[LessEqual[b, 4.9e-53], t$95$1, If[LessEqual[b, 5.5e+34], t$95$2, If[LessEqual[b, 3.2e+56], t$95$1, If[LessEqual[b, 1.2e+91], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.15e+104], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z + \left(a - t \cdot a\right)\right)\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.72 \cdot 10^{+75}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 4.9 \cdot 10^{-53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+34}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{+91}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+104}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -1.72e75 or 4.89999999999999963e-53 < b < 5.4999999999999996e34 or 1.14999999999999992e104 < b Initial program 93.3%
Taylor expanded in a around 0 90.7%
Taylor expanded in z around 0 85.2%
if -1.72e75 < b < 4.89999999999999963e-53 or 5.4999999999999996e34 < b < 3.20000000000000003e56Initial program 100.0%
Taylor expanded in b around 0 93.9%
Taylor expanded in y around 0 70.2%
+-commutative70.2%
sub-neg70.2%
metadata-eval70.2%
mul-1-neg70.2%
unsub-neg70.2%
distribute-rgt-in70.2%
*-commutative70.2%
neg-mul-170.2%
unsub-neg70.2%
Simplified70.2%
if 3.20000000000000003e56 < b < 1.19999999999999991e91Initial program 88.9%
Taylor expanded in y around inf 78.3%
if 1.19999999999999991e91 < b < 1.14999999999999992e104Initial program 75.0%
Taylor expanded in a around inf 100.0%
Final simplification77.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
(if (<= y -9e+25)
t_1
(if (<= y -1e-79)
(* b (- t 2.0))
(if (<= y -4.6e-255)
(* a (- 1.0 t))
(if (<= y -3.2e-289)
t_2
(if (<= y 9.5e-296)
(* z (- 1.0 y))
(if (<= y 1.42e-247)
(- x (* t a))
(if (<= y 3.7e+73) t_2 t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (y <= -9e+25) {
tmp = t_1;
} else if (y <= -1e-79) {
tmp = b * (t - 2.0);
} else if (y <= -4.6e-255) {
tmp = a * (1.0 - t);
} else if (y <= -3.2e-289) {
tmp = t_2;
} else if (y <= 9.5e-296) {
tmp = z * (1.0 - y);
} else if (y <= 1.42e-247) {
tmp = x - (t * a);
} else if (y <= 3.7e+73) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = y * (b - z)
t_2 = t * (b - a)
if (y <= (-9d+25)) then
tmp = t_1
else if (y <= (-1d-79)) then
tmp = b * (t - 2.0d0)
else if (y <= (-4.6d-255)) then
tmp = a * (1.0d0 - t)
else if (y <= (-3.2d-289)) then
tmp = t_2
else if (y <= 9.5d-296) then
tmp = z * (1.0d0 - y)
else if (y <= 1.42d-247) then
tmp = x - (t * a)
else if (y <= 3.7d+73) then
tmp = t_2
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 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (y <= -9e+25) {
tmp = t_1;
} else if (y <= -1e-79) {
tmp = b * (t - 2.0);
} else if (y <= -4.6e-255) {
tmp = a * (1.0 - t);
} else if (y <= -3.2e-289) {
tmp = t_2;
} else if (y <= 9.5e-296) {
tmp = z * (1.0 - y);
} else if (y <= 1.42e-247) {
tmp = x - (t * a);
} else if (y <= 3.7e+73) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = t * (b - a) tmp = 0 if y <= -9e+25: tmp = t_1 elif y <= -1e-79: tmp = b * (t - 2.0) elif y <= -4.6e-255: tmp = a * (1.0 - t) elif y <= -3.2e-289: tmp = t_2 elif y <= 9.5e-296: tmp = z * (1.0 - y) elif y <= 1.42e-247: tmp = x - (t * a) elif y <= 3.7e+73: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (y <= -9e+25) tmp = t_1; elseif (y <= -1e-79) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= -4.6e-255) tmp = Float64(a * Float64(1.0 - t)); elseif (y <= -3.2e-289) tmp = t_2; elseif (y <= 9.5e-296) tmp = Float64(z * Float64(1.0 - y)); elseif (y <= 1.42e-247) tmp = Float64(x - Float64(t * a)); elseif (y <= 3.7e+73) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); t_2 = t * (b - a); tmp = 0.0; if (y <= -9e+25) tmp = t_1; elseif (y <= -1e-79) tmp = b * (t - 2.0); elseif (y <= -4.6e-255) tmp = a * (1.0 - t); elseif (y <= -3.2e-289) tmp = t_2; elseif (y <= 9.5e-296) tmp = z * (1.0 - y); elseif (y <= 1.42e-247) tmp = x - (t * a); elseif (y <= 3.7e+73) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+25], t$95$1, If[LessEqual[y, -1e-79], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.6e-255], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.2e-289], t$95$2, If[LessEqual[y, 9.5e-296], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.42e-247], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+73], t$95$2, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;y \leq -9 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-79}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-255}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-289}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-296}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{elif}\;y \leq 1.42 \cdot 10^{-247}:\\
\;\;\;\;x - t \cdot a\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+73}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -9.0000000000000006e25 or 3.69999999999999973e73 < y Initial program 93.7%
Taylor expanded in y around inf 71.4%
if -9.0000000000000006e25 < y < -1e-79Initial program 100.0%
Taylor expanded in b around inf 56.3%
Taylor expanded in y around 0 53.6%
if -1e-79 < y < -4.5999999999999997e-255Initial program 97.4%
Taylor expanded in a around inf 44.8%
if -4.5999999999999997e-255 < y < -3.2000000000000002e-289 or 1.42000000000000001e-247 < y < 3.69999999999999973e73Initial program 98.5%
Taylor expanded in t around inf 46.4%
if -3.2000000000000002e-289 < y < 9.50000000000000046e-296Initial program 100.0%
Taylor expanded in z around inf 72.9%
if 9.50000000000000046e-296 < y < 1.42000000000000001e-247Initial program 100.0%
Taylor expanded in b around 0 88.6%
Taylor expanded in t around inf 74.2%
Final simplification59.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (or (<= b -2.2e-50) (not (<= b 2.5e-79)))
(+ (+ x (* b (- (+ y t) 2.0))) t_1)
(+ x (+ t_1 (* z (- 1.0 y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if ((b <= -2.2e-50) || !(b <= 2.5e-79)) {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
} else {
tmp = x + (t_1 + (z * (1.0 - y)));
}
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 - t)
if ((b <= (-2.2d-50)) .or. (.not. (b <= 2.5d-79))) then
tmp = (x + (b * ((y + t) - 2.0d0))) + t_1
else
tmp = x + (t_1 + (z * (1.0d0 - y)))
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 - t);
double tmp;
if ((b <= -2.2e-50) || !(b <= 2.5e-79)) {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
} else {
tmp = x + (t_1 + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if (b <= -2.2e-50) or not (b <= 2.5e-79): tmp = (x + (b * ((y + t) - 2.0))) + t_1 else: tmp = x + (t_1 + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if ((b <= -2.2e-50) || !(b <= 2.5e-79)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + t_1); else tmp = Float64(x + Float64(t_1 + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if ((b <= -2.2e-50) || ~((b <= 2.5e-79))) tmp = (x + (b * ((y + t) - 2.0))) + t_1; else tmp = x + (t_1 + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -2.2e-50], N[Not[LessEqual[b, 2.5e-79]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x + N[(t$95$1 + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{-50} \lor \neg \left(b \leq 2.5 \cdot 10^{-79}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(t_1 + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if b < -2.1999999999999999e-50 or 2.5e-79 < b Initial program 93.8%
Taylor expanded in z around 0 83.9%
if -2.1999999999999999e-50 < b < 2.5e-79Initial program 100.0%
Taylor expanded in b around 0 97.2%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t)))
(t_2 (+ x (* b (- (+ y t) 2.0))))
(t_3 (* z (- 1.0 y))))
(if (<= b -1.5e-52)
(+ t_2 t_1)
(if (<= b 2.3e-53) (+ x (+ t_1 t_3)) (+ t_2 t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = x + (b * ((y + t) - 2.0));
double t_3 = z * (1.0 - y);
double tmp;
if (b <= -1.5e-52) {
tmp = t_2 + t_1;
} else if (b <= 2.3e-53) {
tmp = x + (t_1 + t_3);
} else {
tmp = t_2 + t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = a * (1.0d0 - t)
t_2 = x + (b * ((y + t) - 2.0d0))
t_3 = z * (1.0d0 - y)
if (b <= (-1.5d-52)) then
tmp = t_2 + t_1
else if (b <= 2.3d-53) then
tmp = x + (t_1 + t_3)
else
tmp = t_2 + t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = x + (b * ((y + t) - 2.0));
double t_3 = z * (1.0 - y);
double tmp;
if (b <= -1.5e-52) {
tmp = t_2 + t_1;
} else if (b <= 2.3e-53) {
tmp = x + (t_1 + t_3);
} else {
tmp = t_2 + t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = x + (b * ((y + t) - 2.0)) t_3 = z * (1.0 - y) tmp = 0 if b <= -1.5e-52: tmp = t_2 + t_1 elif b <= 2.3e-53: tmp = x + (t_1 + t_3) else: tmp = t_2 + t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) t_3 = Float64(z * Float64(1.0 - y)) tmp = 0.0 if (b <= -1.5e-52) tmp = Float64(t_2 + t_1); elseif (b <= 2.3e-53) tmp = Float64(x + Float64(t_1 + t_3)); else tmp = Float64(t_2 + t_3); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = x + (b * ((y + t) - 2.0)); t_3 = z * (1.0 - y); tmp = 0.0; if (b <= -1.5e-52) tmp = t_2 + t_1; elseif (b <= 2.3e-53) tmp = x + (t_1 + t_3); else tmp = t_2 + t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.5e-52], N[(t$95$2 + t$95$1), $MachinePrecision], If[LessEqual[b, 2.3e-53], N[(x + N[(t$95$1 + t$95$3), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + t$95$3), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
t_3 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{-52}:\\
\;\;\;\;t_2 + t_1\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{-53}:\\
\;\;\;\;x + \left(t_1 + t_3\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 + t_3\\
\end{array}
\end{array}
if b < -1.5e-52Initial program 95.7%
Taylor expanded in z around 0 88.7%
if -1.5e-52 < b < 2.3000000000000001e-53Initial program 100.0%
Taylor expanded in b around 0 97.2%
if 2.3000000000000001e-53 < b Initial program 92.0%
Taylor expanded in a around 0 81.8%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
(if (<= y -1.15e+25)
t_1
(if (<= y -1.5e-87)
(* b (- t 2.0))
(if (<= y -5.6e-254)
(* a (- 1.0 t))
(if (<= y -7e-289)
t_2
(if (<= y 3.2e-234)
(* z (- 1.0 y))
(if (<= y 1.45e+75) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (y <= -1.15e+25) {
tmp = t_1;
} else if (y <= -1.5e-87) {
tmp = b * (t - 2.0);
} else if (y <= -5.6e-254) {
tmp = a * (1.0 - t);
} else if (y <= -7e-289) {
tmp = t_2;
} else if (y <= 3.2e-234) {
tmp = z * (1.0 - y);
} else if (y <= 1.45e+75) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = y * (b - z)
t_2 = t * (b - a)
if (y <= (-1.15d+25)) then
tmp = t_1
else if (y <= (-1.5d-87)) then
tmp = b * (t - 2.0d0)
else if (y <= (-5.6d-254)) then
tmp = a * (1.0d0 - t)
else if (y <= (-7d-289)) then
tmp = t_2
else if (y <= 3.2d-234) then
tmp = z * (1.0d0 - y)
else if (y <= 1.45d+75) then
tmp = t_2
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 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (y <= -1.15e+25) {
tmp = t_1;
} else if (y <= -1.5e-87) {
tmp = b * (t - 2.0);
} else if (y <= -5.6e-254) {
tmp = a * (1.0 - t);
} else if (y <= -7e-289) {
tmp = t_2;
} else if (y <= 3.2e-234) {
tmp = z * (1.0 - y);
} else if (y <= 1.45e+75) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = t * (b - a) tmp = 0 if y <= -1.15e+25: tmp = t_1 elif y <= -1.5e-87: tmp = b * (t - 2.0) elif y <= -5.6e-254: tmp = a * (1.0 - t) elif y <= -7e-289: tmp = t_2 elif y <= 3.2e-234: tmp = z * (1.0 - y) elif y <= 1.45e+75: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (y <= -1.15e+25) tmp = t_1; elseif (y <= -1.5e-87) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= -5.6e-254) tmp = Float64(a * Float64(1.0 - t)); elseif (y <= -7e-289) tmp = t_2; elseif (y <= 3.2e-234) tmp = Float64(z * Float64(1.0 - y)); elseif (y <= 1.45e+75) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); t_2 = t * (b - a); tmp = 0.0; if (y <= -1.15e+25) tmp = t_1; elseif (y <= -1.5e-87) tmp = b * (t - 2.0); elseif (y <= -5.6e-254) tmp = a * (1.0 - t); elseif (y <= -7e-289) tmp = t_2; elseif (y <= 3.2e-234) tmp = z * (1.0 - y); elseif (y <= 1.45e+75) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e+25], t$95$1, If[LessEqual[y, -1.5e-87], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.6e-254], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7e-289], t$95$2, If[LessEqual[y, 3.2e-234], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+75], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-87}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-254}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-289}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-234}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+75}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.1499999999999999e25 or 1.4499999999999999e75 < y Initial program 93.7%
Taylor expanded in y around inf 71.4%
if -1.1499999999999999e25 < y < -1.50000000000000008e-87Initial program 100.0%
Taylor expanded in b around inf 56.3%
Taylor expanded in y around 0 53.6%
if -1.50000000000000008e-87 < y < -5.59999999999999966e-254Initial program 97.4%
Taylor expanded in a around inf 44.8%
if -5.59999999999999966e-254 < y < -6.9999999999999999e-289 or 3.1999999999999999e-234 < y < 1.4499999999999999e75Initial program 98.4%
Taylor expanded in t around inf 47.0%
if -6.9999999999999999e-289 < y < 3.1999999999999999e-234Initial program 100.0%
Taylor expanded in z around inf 46.0%
Final simplification57.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.2e+76) (not (<= b 1.9e+129))) (+ x (* b (- (+ y t) 2.0))) (+ x (+ (* a (- 1.0 t)) (* z (- 1.0 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.2e+76) || !(b <= 1.9e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-3.2d+76)) .or. (.not. (b <= 1.9d+129))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x + ((a * (1.0d0 - t)) + (z * (1.0d0 - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.2e+76) || !(b <= 1.9e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.2e+76) or not (b <= 1.9e+129): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.2e+76) || !(b <= 1.9e+129)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.2e+76) || ~((b <= 1.9e+129))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.2e+76], N[Not[LessEqual[b, 1.9e+129]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.2 \cdot 10^{+76} \lor \neg \left(b \leq 1.9 \cdot 10^{+129}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if b < -3.19999999999999976e76 or 1.90000000000000003e129 < b Initial program 91.8%
Taylor expanded in a around 0 91.8%
Taylor expanded in z around 0 90.7%
if -3.19999999999999976e76 < b < 1.90000000000000003e129Initial program 98.8%
Taylor expanded in b around 0 86.8%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- y 2.0))) (t_2 (* b (- t 2.0))) (t_3 (* a (- 1.0 t))))
(if (<= a -2.85e-11)
t_3
(if (<= a -1.2e-159)
t_1
(if (<= a 1.4e-220)
t_2
(if (<= a 9.6e-37) t_1 (if (<= a 1.68e+72) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y - 2.0);
double t_2 = b * (t - 2.0);
double t_3 = a * (1.0 - t);
double tmp;
if (a <= -2.85e-11) {
tmp = t_3;
} else if (a <= -1.2e-159) {
tmp = t_1;
} else if (a <= 1.4e-220) {
tmp = t_2;
} else if (a <= 9.6e-37) {
tmp = t_1;
} else if (a <= 1.68e+72) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = b * (y - 2.0d0)
t_2 = b * (t - 2.0d0)
t_3 = a * (1.0d0 - t)
if (a <= (-2.85d-11)) then
tmp = t_3
else if (a <= (-1.2d-159)) then
tmp = t_1
else if (a <= 1.4d-220) then
tmp = t_2
else if (a <= 9.6d-37) then
tmp = t_1
else if (a <= 1.68d+72) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y - 2.0);
double t_2 = b * (t - 2.0);
double t_3 = a * (1.0 - t);
double tmp;
if (a <= -2.85e-11) {
tmp = t_3;
} else if (a <= -1.2e-159) {
tmp = t_1;
} else if (a <= 1.4e-220) {
tmp = t_2;
} else if (a <= 9.6e-37) {
tmp = t_1;
} else if (a <= 1.68e+72) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (y - 2.0) t_2 = b * (t - 2.0) t_3 = a * (1.0 - t) tmp = 0 if a <= -2.85e-11: tmp = t_3 elif a <= -1.2e-159: tmp = t_1 elif a <= 1.4e-220: tmp = t_2 elif a <= 9.6e-37: tmp = t_1 elif a <= 1.68e+72: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y - 2.0)) t_2 = Float64(b * Float64(t - 2.0)) t_3 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (a <= -2.85e-11) tmp = t_3; elseif (a <= -1.2e-159) tmp = t_1; elseif (a <= 1.4e-220) tmp = t_2; elseif (a <= 9.6e-37) tmp = t_1; elseif (a <= 1.68e+72) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (y - 2.0); t_2 = b * (t - 2.0); t_3 = a * (1.0 - t); tmp = 0.0; if (a <= -2.85e-11) tmp = t_3; elseif (a <= -1.2e-159) tmp = t_1; elseif (a <= 1.4e-220) tmp = t_2; elseif (a <= 9.6e-37) tmp = t_1; elseif (a <= 1.68e+72) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.85e-11], t$95$3, If[LessEqual[a, -1.2e-159], t$95$1, If[LessEqual[a, 1.4e-220], t$95$2, If[LessEqual[a, 9.6e-37], t$95$1, If[LessEqual[a, 1.68e+72], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y - 2\right)\\
t_2 := b \cdot \left(t - 2\right)\\
t_3 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -2.85 \cdot 10^{-11}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-220}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.68 \cdot 10^{+72}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if a < -2.8499999999999999e-11 or 1.67999999999999991e72 < a Initial program 93.4%
Taylor expanded in a around inf 58.0%
if -2.8499999999999999e-11 < a < -1.19999999999999999e-159 or 1.4e-220 < a < 9.59999999999999963e-37Initial program 96.9%
Taylor expanded in b around inf 45.1%
Taylor expanded in t around 0 35.8%
if -1.19999999999999999e-159 < a < 1.4e-220 or 9.59999999999999963e-37 < a < 1.67999999999999991e72Initial program 100.0%
Taylor expanded in b around inf 45.8%
Taylor expanded in y around 0 34.9%
Final simplification44.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- t 2.0)))) (t_2 (* y (- b z))))
(if (<= y -1.7e+31)
t_2
(if (<= y -1.25e-228)
t_1
(if (<= y -5.8e-287) (* a (- 1.0 t)) (if (<= y 2.5e+87) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * (t - 2.0));
double t_2 = y * (b - z);
double tmp;
if (y <= -1.7e+31) {
tmp = t_2;
} else if (y <= -1.25e-228) {
tmp = t_1;
} else if (y <= -5.8e-287) {
tmp = a * (1.0 - t);
} else if (y <= 2.5e+87) {
tmp = t_1;
} else {
tmp = 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 + (b * (t - 2.0d0))
t_2 = y * (b - z)
if (y <= (-1.7d+31)) then
tmp = t_2
else if (y <= (-1.25d-228)) then
tmp = t_1
else if (y <= (-5.8d-287)) then
tmp = a * (1.0d0 - t)
else if (y <= 2.5d+87) then
tmp = t_1
else
tmp = 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 + (b * (t - 2.0));
double t_2 = y * (b - z);
double tmp;
if (y <= -1.7e+31) {
tmp = t_2;
} else if (y <= -1.25e-228) {
tmp = t_1;
} else if (y <= -5.8e-287) {
tmp = a * (1.0 - t);
} else if (y <= 2.5e+87) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * (t - 2.0)) t_2 = y * (b - z) tmp = 0 if y <= -1.7e+31: tmp = t_2 elif y <= -1.25e-228: tmp = t_1 elif y <= -5.8e-287: tmp = a * (1.0 - t) elif y <= 2.5e+87: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * Float64(t - 2.0))) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -1.7e+31) tmp = t_2; elseif (y <= -1.25e-228) tmp = t_1; elseif (y <= -5.8e-287) tmp = Float64(a * Float64(1.0 - t)); elseif (y <= 2.5e+87) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * (t - 2.0)); t_2 = y * (b - z); tmp = 0.0; if (y <= -1.7e+31) tmp = t_2; elseif (y <= -1.25e-228) tmp = t_1; elseif (y <= -5.8e-287) tmp = a * (1.0 - t); elseif (y <= 2.5e+87) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+31], t$95$2, If[LessEqual[y, -1.25e-228], t$95$1, If[LessEqual[y, -5.8e-287], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+87], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(t - 2\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{-287}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.6999999999999999e31 or 2.4999999999999999e87 < y Initial program 93.4%
Taylor expanded in y around inf 73.0%
if -1.6999999999999999e31 < y < -1.24999999999999993e-228 or -5.7999999999999996e-287 < y < 2.4999999999999999e87Initial program 98.5%
Taylor expanded in a around 0 72.4%
Taylor expanded in z around 0 53.3%
Taylor expanded in y around 0 52.8%
if -1.24999999999999993e-228 < y < -5.7999999999999996e-287Initial program 100.0%
Taylor expanded in a around inf 64.1%
Final simplification61.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- y 2.0))) (t_2 (* t (- b a))))
(if (<= t -1.45e+48)
t_2
(if (<= t 2.25e-269)
t_1
(if (<= t 1.55e-142) x (if (<= t 6000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y - 2.0);
double t_2 = t * (b - a);
double tmp;
if (t <= -1.45e+48) {
tmp = t_2;
} else if (t <= 2.25e-269) {
tmp = t_1;
} else if (t <= 1.55e-142) {
tmp = x;
} else if (t <= 6000.0) {
tmp = t_1;
} else {
tmp = 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 = b * (y - 2.0d0)
t_2 = t * (b - a)
if (t <= (-1.45d+48)) then
tmp = t_2
else if (t <= 2.25d-269) then
tmp = t_1
else if (t <= 1.55d-142) then
tmp = x
else if (t <= 6000.0d0) then
tmp = t_1
else
tmp = 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 = b * (y - 2.0);
double t_2 = t * (b - a);
double tmp;
if (t <= -1.45e+48) {
tmp = t_2;
} else if (t <= 2.25e-269) {
tmp = t_1;
} else if (t <= 1.55e-142) {
tmp = x;
} else if (t <= 6000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (y - 2.0) t_2 = t * (b - a) tmp = 0 if t <= -1.45e+48: tmp = t_2 elif t <= 2.25e-269: tmp = t_1 elif t <= 1.55e-142: tmp = x elif t <= 6000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y - 2.0)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1.45e+48) tmp = t_2; elseif (t <= 2.25e-269) tmp = t_1; elseif (t <= 1.55e-142) tmp = x; elseif (t <= 6000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (y - 2.0); t_2 = t * (b - a); tmp = 0.0; if (t <= -1.45e+48) tmp = t_2; elseif (t <= 2.25e-269) tmp = t_1; elseif (t <= 1.55e-142) tmp = x; elseif (t <= 6000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e+48], t$95$2, If[LessEqual[t, 2.25e-269], t$95$1, If[LessEqual[t, 1.55e-142], x, If[LessEqual[t, 6000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y - 2\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+48}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-269}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 6000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.4499999999999999e48 or 6e3 < t Initial program 94.4%
Taylor expanded in t around inf 62.1%
if -1.4499999999999999e48 < t < 2.2500000000000001e-269 or 1.55e-142 < t < 6e3Initial program 98.1%
Taylor expanded in b around inf 32.8%
Taylor expanded in t around 0 32.6%
if 2.2500000000000001e-269 < t < 1.55e-142Initial program 100.0%
Taylor expanded in x around inf 41.1%
Final simplification47.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -6.8e+25)
t_1
(if (<= y -6.8e-82)
(* b (- t 2.0))
(if (<= y -4.5e-254)
(* a (- 1.0 t))
(if (<= y 3.3e+73) (* t (- b a)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -6.8e+25) {
tmp = t_1;
} else if (y <= -6.8e-82) {
tmp = b * (t - 2.0);
} else if (y <= -4.5e-254) {
tmp = a * (1.0 - t);
} else if (y <= 3.3e+73) {
tmp = t * (b - a);
} 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 = y * (b - z)
if (y <= (-6.8d+25)) then
tmp = t_1
else if (y <= (-6.8d-82)) then
tmp = b * (t - 2.0d0)
else if (y <= (-4.5d-254)) then
tmp = a * (1.0d0 - t)
else if (y <= 3.3d+73) then
tmp = t * (b - a)
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 = y * (b - z);
double tmp;
if (y <= -6.8e+25) {
tmp = t_1;
} else if (y <= -6.8e-82) {
tmp = b * (t - 2.0);
} else if (y <= -4.5e-254) {
tmp = a * (1.0 - t);
} else if (y <= 3.3e+73) {
tmp = t * (b - a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -6.8e+25: tmp = t_1 elif y <= -6.8e-82: tmp = b * (t - 2.0) elif y <= -4.5e-254: tmp = a * (1.0 - t) elif y <= 3.3e+73: tmp = t * (b - a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -6.8e+25) tmp = t_1; elseif (y <= -6.8e-82) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= -4.5e-254) tmp = Float64(a * Float64(1.0 - t)); elseif (y <= 3.3e+73) tmp = Float64(t * Float64(b - a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -6.8e+25) tmp = t_1; elseif (y <= -6.8e-82) tmp = b * (t - 2.0); elseif (y <= -4.5e-254) tmp = a * (1.0 - t); elseif (y <= 3.3e+73) tmp = t * (b - a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.8e+25], t$95$1, If[LessEqual[y, -6.8e-82], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.5e-254], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+73], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -6.8 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{-82}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-254}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+73}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -6.79999999999999967e25 or 3.3000000000000003e73 < y Initial program 93.7%
Taylor expanded in y around inf 71.4%
if -6.79999999999999967e25 < y < -6.7999999999999995e-82Initial program 100.0%
Taylor expanded in b around inf 56.3%
Taylor expanded in y around 0 53.6%
if -6.7999999999999995e-82 < y < -4.5e-254Initial program 97.4%
Taylor expanded in a around inf 44.8%
if -4.5e-254 < y < 3.3000000000000003e73Initial program 98.7%
Taylor expanded in t around inf 40.7%
Final simplification55.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* t (- a)))) (if (<= t -1.52e-9) t_1 (if (<= t -9.5e-140) a (if (<= t 1700.0) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * -a;
double tmp;
if (t <= -1.52e-9) {
tmp = t_1;
} else if (t <= -9.5e-140) {
tmp = a;
} else if (t <= 1700.0) {
tmp = x;
} 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 = t * -a
if (t <= (-1.52d-9)) then
tmp = t_1
else if (t <= (-9.5d-140)) then
tmp = a
else if (t <= 1700.0d0) then
tmp = x
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 = t * -a;
double tmp;
if (t <= -1.52e-9) {
tmp = t_1;
} else if (t <= -9.5e-140) {
tmp = a;
} else if (t <= 1700.0) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * -a tmp = 0 if t <= -1.52e-9: tmp = t_1 elif t <= -9.5e-140: tmp = a elif t <= 1700.0: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(-a)) tmp = 0.0 if (t <= -1.52e-9) tmp = t_1; elseif (t <= -9.5e-140) tmp = a; elseif (t <= 1700.0) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * -a; tmp = 0.0; if (t <= -1.52e-9) tmp = t_1; elseif (t <= -9.5e-140) tmp = a; elseif (t <= 1700.0) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[t, -1.52e-9], t$95$1, If[LessEqual[t, -9.5e-140], a, If[LessEqual[t, 1700.0], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-a\right)\\
\mathbf{if}\;t \leq -1.52 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-140}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 1700:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.51999999999999992e-9 or 1700 < t Initial program 94.6%
Taylor expanded in a around inf 36.9%
Taylor expanded in t around inf 36.6%
associate-*r*36.6%
neg-mul-136.6%
Simplified36.6%
if -1.51999999999999992e-9 < t < -9.50000000000000019e-140Initial program 96.9%
Taylor expanded in a around inf 33.1%
Taylor expanded in t around 0 32.8%
if -9.50000000000000019e-140 < t < 1700Initial program 98.9%
Taylor expanded in x around inf 26.5%
Final simplification32.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5e+68) (* t b) (if (<= t -2e-139) a (if (<= t 2.35e+28) x (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5e+68) {
tmp = t * b;
} else if (t <= -2e-139) {
tmp = a;
} else if (t <= 2.35e+28) {
tmp = x;
} else {
tmp = t * 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 <= (-5d+68)) then
tmp = t * b
else if (t <= (-2d-139)) then
tmp = a
else if (t <= 2.35d+28) then
tmp = x
else
tmp = t * 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 <= -5e+68) {
tmp = t * b;
} else if (t <= -2e-139) {
tmp = a;
} else if (t <= 2.35e+28) {
tmp = x;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5e+68: tmp = t * b elif t <= -2e-139: tmp = a elif t <= 2.35e+28: tmp = x else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5e+68) tmp = Float64(t * b); elseif (t <= -2e-139) tmp = a; elseif (t <= 2.35e+28) tmp = x; else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5e+68) tmp = t * b; elseif (t <= -2e-139) tmp = a; elseif (t <= 2.35e+28) tmp = x; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5e+68], N[(t * b), $MachinePrecision], If[LessEqual[t, -2e-139], a, If[LessEqual[t, 2.35e+28], x, N[(t * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+68}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-139}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -5.0000000000000004e68 or 2.34999999999999983e28 < t Initial program 93.8%
add-cube-cbrt93.6%
pow393.6%
sub-neg93.6%
metadata-eval93.6%
Applied egg-rr93.6%
Taylor expanded in t around inf 35.3%
*-commutative35.3%
Simplified35.3%
if -5.0000000000000004e68 < t < -2.00000000000000006e-139Initial program 97.6%
Taylor expanded in a around inf 33.5%
Taylor expanded in t around 0 26.6%
if -2.00000000000000006e-139 < t < 2.34999999999999983e28Initial program 99.0%
Taylor expanded in x around inf 24.8%
Final simplification29.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.5e-9) (not (<= a 8.4e+71))) (* a (- 1.0 t)) (* b (- t 2.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.5e-9) || !(a <= 8.4e+71)) {
tmp = a * (1.0 - t);
} else {
tmp = b * (t - 2.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 ((a <= (-2.5d-9)) .or. (.not. (a <= 8.4d+71))) then
tmp = a * (1.0d0 - t)
else
tmp = b * (t - 2.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 ((a <= -2.5e-9) || !(a <= 8.4e+71)) {
tmp = a * (1.0 - t);
} else {
tmp = b * (t - 2.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.5e-9) or not (a <= 8.4e+71): tmp = a * (1.0 - t) else: tmp = b * (t - 2.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.5e-9) || !(a <= 8.4e+71)) tmp = Float64(a * Float64(1.0 - t)); else tmp = Float64(b * Float64(t - 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.5e-9) || ~((a <= 8.4e+71))) tmp = a * (1.0 - t); else tmp = b * (t - 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.5e-9], N[Not[LessEqual[a, 8.4e+71]], $MachinePrecision]], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-9} \lor \neg \left(a \leq 8.4 \cdot 10^{+71}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\end{array}
\end{array}
if a < -2.5000000000000001e-9 or 8.39999999999999957e71 < a Initial program 93.2%
Taylor expanded in a around inf 59.5%
if -2.5000000000000001e-9 < a < 8.39999999999999957e71Initial program 98.7%
Taylor expanded in b around inf 44.9%
Taylor expanded in y around 0 28.8%
Final simplification41.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -5.6e+125) (* y b) (if (<= y 1.22e+160) (* a (- 1.0 t)) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.6e+125) {
tmp = y * b;
} else if (y <= 1.22e+160) {
tmp = a * (1.0 - t);
} else {
tmp = 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 <= (-5.6d+125)) then
tmp = y * b
else if (y <= 1.22d+160) then
tmp = a * (1.0d0 - t)
else
tmp = 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 <= -5.6e+125) {
tmp = y * b;
} else if (y <= 1.22e+160) {
tmp = a * (1.0 - t);
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.6e+125: tmp = y * b elif y <= 1.22e+160: tmp = a * (1.0 - t) else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.6e+125) tmp = Float64(y * b); elseif (y <= 1.22e+160) tmp = Float64(a * Float64(1.0 - t)); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.6e+125) tmp = y * b; elseif (y <= 1.22e+160) tmp = a * (1.0 - t); else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.6e+125], N[(y * b), $MachinePrecision], If[LessEqual[y, 1.22e+160], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+125}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{+160}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -5.6000000000000002e125 or 1.22e160 < y Initial program 93.1%
Taylor expanded in y around inf 83.4%
Taylor expanded in b around inf 45.6%
if -5.6000000000000002e125 < y < 1.22e160Initial program 97.8%
Taylor expanded in a around inf 34.0%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6e+171) (* y b) (if (<= b 51.0) x (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6e+171) {
tmp = y * b;
} else if (b <= 51.0) {
tmp = x;
} else {
tmp = 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 (b <= (-6d+171)) then
tmp = y * b
else if (b <= 51.0d0) then
tmp = x
else
tmp = 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 (b <= -6e+171) {
tmp = y * b;
} else if (b <= 51.0) {
tmp = x;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6e+171: tmp = y * b elif b <= 51.0: tmp = x else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6e+171) tmp = Float64(y * b); elseif (b <= 51.0) tmp = x; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6e+171) tmp = y * b; elseif (b <= 51.0) tmp = x; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6e+171], N[(y * b), $MachinePrecision], If[LessEqual[b, 51.0], x, N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{+171}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;b \leq 51:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -6.0000000000000002e171 or 51 < b Initial program 90.1%
Taylor expanded in y around inf 42.2%
Taylor expanded in b around inf 35.8%
if -6.0000000000000002e171 < b < 51Initial program 100.0%
Taylor expanded in x around inf 22.0%
Final simplification26.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.55e+54) x (if (<= x 1.7e+52) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.55e+54) {
tmp = x;
} else if (x <= 1.7e+52) {
tmp = 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 (x <= (-1.55d+54)) then
tmp = x
else if (x <= 1.7d+52) then
tmp = 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 (x <= -1.55e+54) {
tmp = x;
} else if (x <= 1.7e+52) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.55e+54: tmp = x elif x <= 1.7e+52: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.55e+54) tmp = x; elseif (x <= 1.7e+52) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.55e+54) tmp = x; elseif (x <= 1.7e+52) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.55e+54], x, If[LessEqual[x, 1.7e+52], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+54}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+52}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.55e54 or 1.7e52 < x Initial program 96.4%
Taylor expanded in x around inf 31.5%
if -1.55e54 < x < 1.7e52Initial program 96.5%
Taylor expanded in a around inf 32.9%
Taylor expanded in t around 0 16.6%
Final simplification23.0%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 96.5%
Taylor expanded in a around inf 28.5%
Taylor expanded in t around 0 11.0%
Final simplification11.0%
herbie shell --seed 2023275
(FPCore (x y z t a b)
:name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
:precision binary64
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))