
(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 24 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 (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t)))))
(if (<= (+ t_1 (* b (- (+ y t) 2.0))) INFINITY)
(+ t_1 (+ (* b (+ y t)) (* -2.0 b)))
(* t (- b a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (1.0 - y))) + (a * (1.0 - t));
double tmp;
if ((t_1 + (b * ((y + t) - 2.0))) <= ((double) INFINITY)) {
tmp = t_1 + ((b * (y + t)) + (-2.0 * b));
} else {
tmp = t * (b - a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (1.0 - y))) + (a * (1.0 - t));
double tmp;
if ((t_1 + (b * ((y + t) - 2.0))) <= Double.POSITIVE_INFINITY) {
tmp = t_1 + ((b * (y + t)) + (-2.0 * b));
} else {
tmp = t * (b - a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (1.0 - y))) + (a * (1.0 - t)) tmp = 0 if (t_1 + (b * ((y + t) - 2.0))) <= math.inf: tmp = t_1 + ((b * (y + t)) + (-2.0 * b)) else: tmp = t * (b - a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) tmp = 0.0 if (Float64(t_1 + Float64(b * Float64(Float64(y + t) - 2.0))) <= Inf) tmp = Float64(t_1 + Float64(Float64(b * Float64(y + t)) + Float64(-2.0 * b))); else tmp = Float64(t * Float64(b - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z * (1.0 - y))) + (a * (1.0 - t)); tmp = 0.0; if ((t_1 + (b * ((y + t) - 2.0))) <= Inf) tmp = t_1 + ((b * (y + t)) + (-2.0 * b)); else tmp = t * (b - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 + N[(N[(b * N[(y + t), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\\
\mathbf{if}\;t\_1 + b \cdot \left(\left(y + t\right) - 2\right) \leq \infty:\\
\;\;\;\;t\_1 + \left(b \cdot \left(y + t\right) + -2 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
sub-neg100.0%
metadata-eval100.0%
associate-+r+100.0%
*-commutative100.0%
associate-+r+100.0%
distribute-rgt-in100.0%
Applied egg-rr100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in t around inf 67.1%
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-define97.6%
associate--l+97.6%
sub-neg97.6%
metadata-eval97.6%
sub-neg97.6%
associate-+l-97.6%
fma-neg98.4%
sub-neg98.4%
metadata-eval98.4%
remove-double-neg98.4%
sub-neg98.4%
metadata-eval98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
(if (<= t -3.8e+39)
t_2
(if (<= t -1.25e-103)
t_1
(if (<= t -1.35e-133)
(+ x a)
(if (<= t -2.6e-157)
(* z (- 1.0 y))
(if (<= t -5.5e-168)
(+ x a)
(if (<= t -1.05e-219)
t_1
(if (<= t 2.6e-224)
(+ x a)
(if (<= t 2.35e-39)
t_1
(if (<= t 5600.0) (+ x z) t_2)))))))))))
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 (t <= -3.8e+39) {
tmp = t_2;
} else if (t <= -1.25e-103) {
tmp = t_1;
} else if (t <= -1.35e-133) {
tmp = x + a;
} else if (t <= -2.6e-157) {
tmp = z * (1.0 - y);
} else if (t <= -5.5e-168) {
tmp = x + a;
} else if (t <= -1.05e-219) {
tmp = t_1;
} else if (t <= 2.6e-224) {
tmp = x + a;
} else if (t <= 2.35e-39) {
tmp = t_1;
} else if (t <= 5600.0) {
tmp = x + z;
} 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 = y * (b - z)
t_2 = t * (b - a)
if (t <= (-3.8d+39)) then
tmp = t_2
else if (t <= (-1.25d-103)) then
tmp = t_1
else if (t <= (-1.35d-133)) then
tmp = x + a
else if (t <= (-2.6d-157)) then
tmp = z * (1.0d0 - y)
else if (t <= (-5.5d-168)) then
tmp = x + a
else if (t <= (-1.05d-219)) then
tmp = t_1
else if (t <= 2.6d-224) then
tmp = x + a
else if (t <= 2.35d-39) then
tmp = t_1
else if (t <= 5600.0d0) then
tmp = x + z
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 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (t <= -3.8e+39) {
tmp = t_2;
} else if (t <= -1.25e-103) {
tmp = t_1;
} else if (t <= -1.35e-133) {
tmp = x + a;
} else if (t <= -2.6e-157) {
tmp = z * (1.0 - y);
} else if (t <= -5.5e-168) {
tmp = x + a;
} else if (t <= -1.05e-219) {
tmp = t_1;
} else if (t <= 2.6e-224) {
tmp = x + a;
} else if (t <= 2.35e-39) {
tmp = t_1;
} else if (t <= 5600.0) {
tmp = x + z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = t * (b - a) tmp = 0 if t <= -3.8e+39: tmp = t_2 elif t <= -1.25e-103: tmp = t_1 elif t <= -1.35e-133: tmp = x + a elif t <= -2.6e-157: tmp = z * (1.0 - y) elif t <= -5.5e-168: tmp = x + a elif t <= -1.05e-219: tmp = t_1 elif t <= 2.6e-224: tmp = x + a elif t <= 2.35e-39: tmp = t_1 elif t <= 5600.0: tmp = x + z else: tmp = t_2 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 (t <= -3.8e+39) tmp = t_2; elseif (t <= -1.25e-103) tmp = t_1; elseif (t <= -1.35e-133) tmp = Float64(x + a); elseif (t <= -2.6e-157) tmp = Float64(z * Float64(1.0 - y)); elseif (t <= -5.5e-168) tmp = Float64(x + a); elseif (t <= -1.05e-219) tmp = t_1; elseif (t <= 2.6e-224) tmp = Float64(x + a); elseif (t <= 2.35e-39) tmp = t_1; elseif (t <= 5600.0) tmp = Float64(x + z); else tmp = t_2; 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 (t <= -3.8e+39) tmp = t_2; elseif (t <= -1.25e-103) tmp = t_1; elseif (t <= -1.35e-133) tmp = x + a; elseif (t <= -2.6e-157) tmp = z * (1.0 - y); elseif (t <= -5.5e-168) tmp = x + a; elseif (t <= -1.05e-219) tmp = t_1; elseif (t <= 2.6e-224) tmp = x + a; elseif (t <= 2.35e-39) tmp = t_1; elseif (t <= 5600.0) tmp = x + z; else tmp = t_2; 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[t, -3.8e+39], t$95$2, If[LessEqual[t, -1.25e-103], t$95$1, If[LessEqual[t, -1.35e-133], N[(x + a), $MachinePrecision], If[LessEqual[t, -2.6e-157], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-168], N[(x + a), $MachinePrecision], If[LessEqual[t, -1.05e-219], t$95$1, If[LessEqual[t, 2.6e-224], N[(x + a), $MachinePrecision], If[LessEqual[t, 2.35e-39], t$95$1, If[LessEqual[t, 5600.0], N[(x + z), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-133}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-157}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-168}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-224}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5600:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.7999999999999998e39 or 5600 < t Initial program 94.6%
Taylor expanded in t around inf 78.6%
if -3.7999999999999998e39 < t < -1.24999999999999992e-103 or -5.4999999999999999e-168 < t < -1.05e-219 or 2.6000000000000002e-224 < t < 2.3500000000000001e-39Initial program 95.9%
Taylor expanded in y around inf 48.9%
if -1.24999999999999992e-103 < t < -1.3499999999999999e-133 or -2.59999999999999988e-157 < t < -5.4999999999999999e-168 or -1.05e-219 < t < 2.6000000000000002e-224Initial program 100.0%
Taylor expanded in b around 0 78.3%
Taylor expanded in a around inf 61.0%
Taylor expanded in t around 0 61.0%
cancel-sign-sub-inv61.0%
metadata-eval61.0%
*-lft-identity61.0%
Simplified61.0%
if -1.3499999999999999e-133 < t < -2.59999999999999988e-157Initial program 100.0%
Taylor expanded in z around inf 71.3%
if 2.3500000000000001e-39 < t < 5600Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in y around 0 100.0%
associate--r+100.0%
sub-neg100.0%
metadata-eval100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
sub-neg100.0%
mul-1-neg100.0%
remove-double-neg100.0%
*-commutative100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in a around 0 84.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
(if (<= t -4e+40)
t_2
(if (<= t -3.6e-101)
t_1
(if (<= t -1.85e-131)
(+ x a)
(if (<= t -5.1e-155)
t_1
(if (<= t -1.2e-168)
(+ x a)
(if (<= t -1.9e-219)
t_1
(if (<= t 6e-223)
(+ x a)
(if (<= t 1.25e-37)
t_1
(if (<= t 23000.0) (+ x z) t_2)))))))))))
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 (t <= -4e+40) {
tmp = t_2;
} else if (t <= -3.6e-101) {
tmp = t_1;
} else if (t <= -1.85e-131) {
tmp = x + a;
} else if (t <= -5.1e-155) {
tmp = t_1;
} else if (t <= -1.2e-168) {
tmp = x + a;
} else if (t <= -1.9e-219) {
tmp = t_1;
} else if (t <= 6e-223) {
tmp = x + a;
} else if (t <= 1.25e-37) {
tmp = t_1;
} else if (t <= 23000.0) {
tmp = x + z;
} 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 = y * (b - z)
t_2 = t * (b - a)
if (t <= (-4d+40)) then
tmp = t_2
else if (t <= (-3.6d-101)) then
tmp = t_1
else if (t <= (-1.85d-131)) then
tmp = x + a
else if (t <= (-5.1d-155)) then
tmp = t_1
else if (t <= (-1.2d-168)) then
tmp = x + a
else if (t <= (-1.9d-219)) then
tmp = t_1
else if (t <= 6d-223) then
tmp = x + a
else if (t <= 1.25d-37) then
tmp = t_1
else if (t <= 23000.0d0) then
tmp = x + z
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 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (t <= -4e+40) {
tmp = t_2;
} else if (t <= -3.6e-101) {
tmp = t_1;
} else if (t <= -1.85e-131) {
tmp = x + a;
} else if (t <= -5.1e-155) {
tmp = t_1;
} else if (t <= -1.2e-168) {
tmp = x + a;
} else if (t <= -1.9e-219) {
tmp = t_1;
} else if (t <= 6e-223) {
tmp = x + a;
} else if (t <= 1.25e-37) {
tmp = t_1;
} else if (t <= 23000.0) {
tmp = x + z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = t * (b - a) tmp = 0 if t <= -4e+40: tmp = t_2 elif t <= -3.6e-101: tmp = t_1 elif t <= -1.85e-131: tmp = x + a elif t <= -5.1e-155: tmp = t_1 elif t <= -1.2e-168: tmp = x + a elif t <= -1.9e-219: tmp = t_1 elif t <= 6e-223: tmp = x + a elif t <= 1.25e-37: tmp = t_1 elif t <= 23000.0: tmp = x + z else: tmp = t_2 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 (t <= -4e+40) tmp = t_2; elseif (t <= -3.6e-101) tmp = t_1; elseif (t <= -1.85e-131) tmp = Float64(x + a); elseif (t <= -5.1e-155) tmp = t_1; elseif (t <= -1.2e-168) tmp = Float64(x + a); elseif (t <= -1.9e-219) tmp = t_1; elseif (t <= 6e-223) tmp = Float64(x + a); elseif (t <= 1.25e-37) tmp = t_1; elseif (t <= 23000.0) tmp = Float64(x + z); else tmp = t_2; 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 (t <= -4e+40) tmp = t_2; elseif (t <= -3.6e-101) tmp = t_1; elseif (t <= -1.85e-131) tmp = x + a; elseif (t <= -5.1e-155) tmp = t_1; elseif (t <= -1.2e-168) tmp = x + a; elseif (t <= -1.9e-219) tmp = t_1; elseif (t <= 6e-223) tmp = x + a; elseif (t <= 1.25e-37) tmp = t_1; elseif (t <= 23000.0) tmp = x + z; else tmp = t_2; 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[t, -4e+40], t$95$2, If[LessEqual[t, -3.6e-101], t$95$1, If[LessEqual[t, -1.85e-131], N[(x + a), $MachinePrecision], If[LessEqual[t, -5.1e-155], t$95$1, If[LessEqual[t, -1.2e-168], N[(x + a), $MachinePrecision], If[LessEqual[t, -1.9e-219], t$95$1, If[LessEqual[t, 6e-223], N[(x + a), $MachinePrecision], If[LessEqual[t, 1.25e-37], t$95$1, If[LessEqual[t, 23000.0], N[(x + z), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -4 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.85 \cdot 10^{-131}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq -5.1 \cdot 10^{-155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-168}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-223}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 23000:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -4.00000000000000012e40 or 23000 < t Initial program 94.6%
Taylor expanded in t around inf 78.6%
if -4.00000000000000012e40 < t < -3.6e-101 or -1.8500000000000001e-131 < t < -5.0999999999999996e-155 or -1.2e-168 < t < -1.90000000000000012e-219 or 5.99999999999999983e-223 < t < 1.2499999999999999e-37Initial program 96.2%
Taylor expanded in y around inf 51.1%
if -3.6e-101 < t < -1.8500000000000001e-131 or -5.0999999999999996e-155 < t < -1.2e-168 or -1.90000000000000012e-219 < t < 5.99999999999999983e-223Initial program 100.0%
Taylor expanded in b around 0 78.7%
Taylor expanded in a around inf 60.0%
Taylor expanded in t around 0 60.0%
cancel-sign-sub-inv60.0%
metadata-eval60.0%
*-lft-identity60.0%
Simplified60.0%
if 1.2499999999999999e-37 < t < 23000Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in y around 0 100.0%
associate--r+100.0%
sub-neg100.0%
metadata-eval100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
sub-neg100.0%
mul-1-neg100.0%
remove-double-neg100.0%
*-commutative100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in a around 0 84.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* b (- (+ y t) 2.0)))))
(if (<= t_1 INFINITY) t_1 (* t (- b a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * (b - a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(b - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = t * (b - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in t around inf 67.1%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (* a (- 1.0 t))))
(t_2 (* b (- (+ y t) 2.0)))
(t_3 (- x (* y z))))
(if (<= b -2.3e+42)
t_2
(if (<= b 1.9e-209)
t_1
(if (<= b 1.6e+28)
t_3
(if (<= b 7.8e+55) t_1 (if (<= b 1.48e+125) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a * (1.0 - t));
double t_2 = b * ((y + t) - 2.0);
double t_3 = x - (y * z);
double tmp;
if (b <= -2.3e+42) {
tmp = t_2;
} else if (b <= 1.9e-209) {
tmp = t_1;
} else if (b <= 1.6e+28) {
tmp = t_3;
} else if (b <= 7.8e+55) {
tmp = t_1;
} else if (b <= 1.48e+125) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = z + (a * (1.0d0 - t))
t_2 = b * ((y + t) - 2.0d0)
t_3 = x - (y * z)
if (b <= (-2.3d+42)) then
tmp = t_2
else if (b <= 1.9d-209) then
tmp = t_1
else if (b <= 1.6d+28) then
tmp = t_3
else if (b <= 7.8d+55) then
tmp = t_1
else if (b <= 1.48d+125) then
tmp = t_3
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 = z + (a * (1.0 - t));
double t_2 = b * ((y + t) - 2.0);
double t_3 = x - (y * z);
double tmp;
if (b <= -2.3e+42) {
tmp = t_2;
} else if (b <= 1.9e-209) {
tmp = t_1;
} else if (b <= 1.6e+28) {
tmp = t_3;
} else if (b <= 7.8e+55) {
tmp = t_1;
} else if (b <= 1.48e+125) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (a * (1.0 - t)) t_2 = b * ((y + t) - 2.0) t_3 = x - (y * z) tmp = 0 if b <= -2.3e+42: tmp = t_2 elif b <= 1.9e-209: tmp = t_1 elif b <= 1.6e+28: tmp = t_3 elif b <= 7.8e+55: tmp = t_1 elif b <= 1.48e+125: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(a * Float64(1.0 - t))) t_2 = Float64(b * Float64(Float64(y + t) - 2.0)) t_3 = Float64(x - Float64(y * z)) tmp = 0.0 if (b <= -2.3e+42) tmp = t_2; elseif (b <= 1.9e-209) tmp = t_1; elseif (b <= 1.6e+28) tmp = t_3; elseif (b <= 7.8e+55) tmp = t_1; elseif (b <= 1.48e+125) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z + (a * (1.0 - t)); t_2 = b * ((y + t) - 2.0); t_3 = x - (y * z); tmp = 0.0; if (b <= -2.3e+42) tmp = t_2; elseif (b <= 1.9e-209) tmp = t_1; elseif (b <= 1.6e+28) tmp = t_3; elseif (b <= 7.8e+55) tmp = t_1; elseif (b <= 1.48e+125) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.3e+42], t$95$2, If[LessEqual[b, 1.9e-209], t$95$1, If[LessEqual[b, 1.6e+28], t$95$3, If[LessEqual[b, 7.8e+55], t$95$1, If[LessEqual[b, 1.48e+125], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_3 := x - y \cdot z\\
\mathbf{if}\;b \leq -2.3 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{+28}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 7.8 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.48 \cdot 10^{+125}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -2.3e42 or 1.48000000000000003e125 < b Initial program 93.1%
Taylor expanded in b around inf 80.5%
if -2.3e42 < b < 1.8999999999999999e-209 or 1.6e28 < b < 7.80000000000000054e55Initial program 98.0%
Taylor expanded in b around 0 90.4%
Taylor expanded in y around 0 75.0%
associate--r+75.0%
sub-neg75.0%
metadata-eval75.0%
*-commutative75.0%
cancel-sign-sub-inv75.0%
sub-neg75.0%
mul-1-neg75.0%
remove-double-neg75.0%
*-commutative75.0%
+-commutative75.0%
distribute-neg-in75.0%
metadata-eval75.0%
sub-neg75.0%
Simplified75.0%
Taylor expanded in x around 0 56.2%
if 1.8999999999999999e-209 < b < 1.6e28 or 7.80000000000000054e55 < b < 1.48000000000000003e125Initial program 100.0%
Taylor expanded in b around 0 93.4%
Taylor expanded in y around inf 57.8%
Final simplification66.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t)))
(t_2 (+ x (- t_1 (* y z))))
(t_3 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -2.45e+42)
t_3
(if (<= b 1.38e-301)
t_2
(if (<= b 4.8e-210) (+ (+ x z) t_1) (if (<= b 9.2e+127) 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 + (t_1 - (y * z));
double t_3 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -2.45e+42) {
tmp = t_3;
} else if (b <= 1.38e-301) {
tmp = t_2;
} else if (b <= 4.8e-210) {
tmp = (x + z) + t_1;
} else if (b <= 9.2e+127) {
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 = a * (1.0d0 - t)
t_2 = x + (t_1 - (y * z))
t_3 = x + (b * ((y + t) - 2.0d0))
if (b <= (-2.45d+42)) then
tmp = t_3
else if (b <= 1.38d-301) then
tmp = t_2
else if (b <= 4.8d-210) then
tmp = (x + z) + t_1
else if (b <= 9.2d+127) 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 = a * (1.0 - t);
double t_2 = x + (t_1 - (y * z));
double t_3 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -2.45e+42) {
tmp = t_3;
} else if (b <= 1.38e-301) {
tmp = t_2;
} else if (b <= 4.8e-210) {
tmp = (x + z) + t_1;
} else if (b <= 9.2e+127) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = x + (t_1 - (y * z)) t_3 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -2.45e+42: tmp = t_3 elif b <= 1.38e-301: tmp = t_2 elif b <= 4.8e-210: tmp = (x + z) + t_1 elif b <= 9.2e+127: tmp = t_2 else: tmp = 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(t_1 - Float64(y * z))) t_3 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -2.45e+42) tmp = t_3; elseif (b <= 1.38e-301) tmp = t_2; elseif (b <= 4.8e-210) tmp = Float64(Float64(x + z) + t_1); elseif (b <= 9.2e+127) tmp = t_2; else tmp = 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 + (t_1 - (y * z)); t_3 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -2.45e+42) tmp = t_3; elseif (b <= 1.38e-301) tmp = t_2; elseif (b <= 4.8e-210) tmp = (x + z) + t_1; elseif (b <= 9.2e+127) tmp = t_2; else tmp = 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[(t$95$1 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.45e+42], t$95$3, If[LessEqual[b, 1.38e-301], t$95$2, If[LessEqual[b, 4.8e-210], N[(N[(x + z), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 9.2e+127], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := x + \left(t\_1 - y \cdot z\right)\\
t_3 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -2.45 \cdot 10^{+42}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 1.38 \cdot 10^{-301}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{-210}:\\
\;\;\;\;\left(x + z\right) + t\_1\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if b < -2.4500000000000001e42 or 9.2000000000000007e127 < b Initial program 93.0%
Taylor expanded in z around 0 91.1%
Taylor expanded in a around 0 85.9%
if -2.4500000000000001e42 < b < 1.38000000000000006e-301 or 4.80000000000000008e-210 < b < 9.2000000000000007e127Initial program 98.5%
Taylor expanded in b around 0 90.1%
Taylor expanded in y around inf 84.0%
if 1.38000000000000006e-301 < b < 4.80000000000000008e-210Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in y around 0 90.7%
associate--r+90.7%
sub-neg90.7%
metadata-eval90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
sub-neg90.7%
mul-1-neg90.7%
remove-double-neg90.7%
*-commutative90.7%
+-commutative90.7%
distribute-neg-in90.7%
metadata-eval90.7%
sub-neg90.7%
Simplified90.7%
Final simplification85.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a (- 1.0 t)))) (t_2 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -3.1e+42)
t_2
(if (<= b 7e-296)
t_1
(if (<= b 5.2e-174)
(+ x (* z (- 1.0 y)))
(if (<= b 3.8e+92) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * (1.0 - t));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -3.1e+42) {
tmp = t_2;
} else if (b <= 7e-296) {
tmp = t_1;
} else if (b <= 5.2e-174) {
tmp = x + (z * (1.0 - y));
} else if (b <= 3.8e+92) {
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 + (a * (1.0d0 - t))
t_2 = x + (b * ((y + t) - 2.0d0))
if (b <= (-3.1d+42)) then
tmp = t_2
else if (b <= 7d-296) then
tmp = t_1
else if (b <= 5.2d-174) then
tmp = x + (z * (1.0d0 - y))
else if (b <= 3.8d+92) 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 + (a * (1.0 - t));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -3.1e+42) {
tmp = t_2;
} else if (b <= 7e-296) {
tmp = t_1;
} else if (b <= 5.2e-174) {
tmp = x + (z * (1.0 - y));
} else if (b <= 3.8e+92) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * (1.0 - t)) t_2 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -3.1e+42: tmp = t_2 elif b <= 7e-296: tmp = t_1 elif b <= 5.2e-174: tmp = x + (z * (1.0 - y)) elif b <= 3.8e+92: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * Float64(1.0 - t))) t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -3.1e+42) tmp = t_2; elseif (b <= 7e-296) tmp = t_1; elseif (b <= 5.2e-174) tmp = Float64(x + Float64(z * Float64(1.0 - y))); elseif (b <= 3.8e+92) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * (1.0 - t)); t_2 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -3.1e+42) tmp = t_2; elseif (b <= 7e-296) tmp = t_1; elseif (b <= 5.2e-174) tmp = x + (z * (1.0 - y)); elseif (b <= 3.8e+92) 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[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e+42], t$95$2, If[LessEqual[b, 7e-296], t$95$1, If[LessEqual[b, 5.2e-174], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.8e+92], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \left(1 - t\right)\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-296}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-174}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3.1000000000000002e42 or 3.8e92 < b Initial program 93.7%
Taylor expanded in z around 0 90.4%
Taylor expanded in a around 0 83.1%
if -3.1000000000000002e42 < b < 6.9999999999999998e-296 or 5.2000000000000004e-174 < b < 3.8e92Initial program 98.4%
Taylor expanded in b around 0 90.6%
Taylor expanded in a around inf 67.4%
if 6.9999999999999998e-296 < b < 5.2000000000000004e-174Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in a around 0 81.5%
Final simplification75.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -5.8e+30)
(* t b)
(if (<= t -1.6e-95)
(* y b)
(if (<= t 3.4e-296)
x
(if (<= t 9.5e-67) (* y b) (if (<= t 62000.0) x (* t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.8e+30) {
tmp = t * b;
} else if (t <= -1.6e-95) {
tmp = y * b;
} else if (t <= 3.4e-296) {
tmp = x;
} else if (t <= 9.5e-67) {
tmp = y * b;
} else if (t <= 62000.0) {
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 <= (-5.8d+30)) then
tmp = t * b
else if (t <= (-1.6d-95)) then
tmp = y * b
else if (t <= 3.4d-296) then
tmp = x
else if (t <= 9.5d-67) then
tmp = y * b
else if (t <= 62000.0d0) 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 <= -5.8e+30) {
tmp = t * b;
} else if (t <= -1.6e-95) {
tmp = y * b;
} else if (t <= 3.4e-296) {
tmp = x;
} else if (t <= 9.5e-67) {
tmp = y * b;
} else if (t <= 62000.0) {
tmp = x;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5.8e+30: tmp = t * b elif t <= -1.6e-95: tmp = y * b elif t <= 3.4e-296: tmp = x elif t <= 9.5e-67: tmp = y * b elif t <= 62000.0: tmp = x else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5.8e+30) tmp = Float64(t * b); elseif (t <= -1.6e-95) tmp = Float64(y * b); elseif (t <= 3.4e-296) tmp = x; elseif (t <= 9.5e-67) tmp = Float64(y * b); elseif (t <= 62000.0) 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 <= -5.8e+30) tmp = t * b; elseif (t <= -1.6e-95) tmp = y * b; elseif (t <= 3.4e-296) tmp = x; elseif (t <= 9.5e-67) tmp = y * b; elseif (t <= 62000.0) tmp = x; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.8e+30], N[(t * b), $MachinePrecision], If[LessEqual[t, -1.6e-95], N[(y * b), $MachinePrecision], If[LessEqual[t, 3.4e-296], x, If[LessEqual[t, 9.5e-67], N[(y * b), $MachinePrecision], If[LessEqual[t, 62000.0], x, N[(t * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+30}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-95}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-296}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-67}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;t \leq 62000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -5.7999999999999996e30 or 62000 < t Initial program 94.6%
Taylor expanded in t around inf 78.3%
Taylor expanded in b around inf 43.5%
if -5.7999999999999996e30 < t < -1.5999999999999999e-95 or 3.39999999999999997e-296 < t < 9.4999999999999994e-67Initial program 98.6%
Taylor expanded in z around 0 71.2%
Taylor expanded in y around inf 28.7%
if -1.5999999999999999e-95 < t < 3.39999999999999997e-296 or 9.4999999999999994e-67 < t < 62000Initial program 97.2%
Taylor expanded in x around inf 30.4%
Final simplification35.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a (- 1.0 t)))) (t_2 (* b (- (+ y t) 2.0))))
(if (<= b -3.8e+42)
t_2
(if (<= b 9.6e-292)
t_1
(if (<= b 1.8e-177)
(+ x (* z (- 1.0 y)))
(if (<= b 1e+128) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * (1.0 - t));
double t_2 = b * ((y + t) - 2.0);
double tmp;
if (b <= -3.8e+42) {
tmp = t_2;
} else if (b <= 9.6e-292) {
tmp = t_1;
} else if (b <= 1.8e-177) {
tmp = x + (z * (1.0 - y));
} else if (b <= 1e+128) {
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 + (a * (1.0d0 - t))
t_2 = b * ((y + t) - 2.0d0)
if (b <= (-3.8d+42)) then
tmp = t_2
else if (b <= 9.6d-292) then
tmp = t_1
else if (b <= 1.8d-177) then
tmp = x + (z * (1.0d0 - y))
else if (b <= 1d+128) 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 + (a * (1.0 - t));
double t_2 = b * ((y + t) - 2.0);
double tmp;
if (b <= -3.8e+42) {
tmp = t_2;
} else if (b <= 9.6e-292) {
tmp = t_1;
} else if (b <= 1.8e-177) {
tmp = x + (z * (1.0 - y));
} else if (b <= 1e+128) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * (1.0 - t)) t_2 = b * ((y + t) - 2.0) tmp = 0 if b <= -3.8e+42: tmp = t_2 elif b <= 9.6e-292: tmp = t_1 elif b <= 1.8e-177: tmp = x + (z * (1.0 - y)) elif b <= 1e+128: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * Float64(1.0 - t))) t_2 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -3.8e+42) tmp = t_2; elseif (b <= 9.6e-292) tmp = t_1; elseif (b <= 1.8e-177) tmp = Float64(x + Float64(z * Float64(1.0 - y))); elseif (b <= 1e+128) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * (1.0 - t)); t_2 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -3.8e+42) tmp = t_2; elseif (b <= 9.6e-292) tmp = t_1; elseif (b <= 1.8e-177) tmp = x + (z * (1.0 - y)); elseif (b <= 1e+128) 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[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.8e+42], t$95$2, If[LessEqual[b, 9.6e-292], t$95$1, If[LessEqual[b, 1.8e-177], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e+128], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -3.8 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 9.6 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{-177}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3.7999999999999998e42 or 1.0000000000000001e128 < b Initial program 93.0%
Taylor expanded in b around inf 81.3%
if -3.7999999999999998e42 < b < 9.6000000000000005e-292 or 1.79999999999999991e-177 < b < 1.0000000000000001e128Initial program 98.5%
Taylor expanded in b around 0 90.1%
Taylor expanded in a around inf 65.5%
if 9.6000000000000005e-292 < b < 1.79999999999999991e-177Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in a around 0 81.5%
Final simplification73.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (+ x t_1)) (t_3 (* b (- (+ y t) 2.0))))
(if (<= b -4.7e+42)
t_3
(if (<= b 2e-299)
t_2
(if (<= b 2.2e-209) (+ z t_1) (if (<= b 9e+127) 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 + t_1;
double t_3 = b * ((y + t) - 2.0);
double tmp;
if (b <= -4.7e+42) {
tmp = t_3;
} else if (b <= 2e-299) {
tmp = t_2;
} else if (b <= 2.2e-209) {
tmp = z + t_1;
} else if (b <= 9e+127) {
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 = a * (1.0d0 - t)
t_2 = x + t_1
t_3 = b * ((y + t) - 2.0d0)
if (b <= (-4.7d+42)) then
tmp = t_3
else if (b <= 2d-299) then
tmp = t_2
else if (b <= 2.2d-209) then
tmp = z + t_1
else if (b <= 9d+127) 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 = a * (1.0 - t);
double t_2 = x + t_1;
double t_3 = b * ((y + t) - 2.0);
double tmp;
if (b <= -4.7e+42) {
tmp = t_3;
} else if (b <= 2e-299) {
tmp = t_2;
} else if (b <= 2.2e-209) {
tmp = z + t_1;
} else if (b <= 9e+127) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = x + t_1 t_3 = b * ((y + t) - 2.0) tmp = 0 if b <= -4.7e+42: tmp = t_3 elif b <= 2e-299: tmp = t_2 elif b <= 2.2e-209: tmp = z + t_1 elif b <= 9e+127: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(x + t_1) t_3 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -4.7e+42) tmp = t_3; elseif (b <= 2e-299) tmp = t_2; elseif (b <= 2.2e-209) tmp = Float64(z + t_1); elseif (b <= 9e+127) tmp = t_2; else tmp = 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 + t_1; t_3 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -4.7e+42) tmp = t_3; elseif (b <= 2e-299) tmp = t_2; elseif (b <= 2.2e-209) tmp = z + t_1; elseif (b <= 9e+127) tmp = t_2; else tmp = 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 + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.7e+42], t$95$3, If[LessEqual[b, 2e-299], t$95$2, If[LessEqual[b, 2.2e-209], N[(z + t$95$1), $MachinePrecision], If[LessEqual[b, 9e+127], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := x + t\_1\\
t_3 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -4.7 \cdot 10^{+42}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 2 \cdot 10^{-299}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{-209}:\\
\;\;\;\;z + t\_1\\
\mathbf{elif}\;b \leq 9 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if b < -4.69999999999999986e42 or 9.00000000000000068e127 < b Initial program 93.0%
Taylor expanded in b around inf 81.3%
if -4.69999999999999986e42 < b < 1.99999999999999998e-299 or 2.2000000000000001e-209 < b < 9.00000000000000068e127Initial program 98.5%
Taylor expanded in b around 0 90.2%
Taylor expanded in a around inf 65.0%
if 1.99999999999999998e-299 < b < 2.2000000000000001e-209Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in y around 0 85.6%
associate--r+85.6%
sub-neg85.6%
metadata-eval85.6%
*-commutative85.6%
cancel-sign-sub-inv85.6%
sub-neg85.6%
mul-1-neg85.6%
remove-double-neg85.6%
*-commutative85.6%
+-commutative85.6%
distribute-neg-in85.6%
metadata-eval85.6%
sub-neg85.6%
Simplified85.6%
Taylor expanded in x around 0 71.5%
Final simplification72.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (+ x z))) (t_2 (* t (- b a))))
(if (<= t -4.5e+73)
t_2
(if (<= t 6.5e-183)
t_1
(if (<= t 1.15e-63) (* y (- b z)) (if (<= t 29000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (x + z);
double t_2 = t * (b - a);
double tmp;
if (t <= -4.5e+73) {
tmp = t_2;
} else if (t <= 6.5e-183) {
tmp = t_1;
} else if (t <= 1.15e-63) {
tmp = y * (b - z);
} else if (t <= 29000.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 = a + (x + z)
t_2 = t * (b - a)
if (t <= (-4.5d+73)) then
tmp = t_2
else if (t <= 6.5d-183) then
tmp = t_1
else if (t <= 1.15d-63) then
tmp = y * (b - z)
else if (t <= 29000.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 = a + (x + z);
double t_2 = t * (b - a);
double tmp;
if (t <= -4.5e+73) {
tmp = t_2;
} else if (t <= 6.5e-183) {
tmp = t_1;
} else if (t <= 1.15e-63) {
tmp = y * (b - z);
} else if (t <= 29000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (x + z) t_2 = t * (b - a) tmp = 0 if t <= -4.5e+73: tmp = t_2 elif t <= 6.5e-183: tmp = t_1 elif t <= 1.15e-63: tmp = y * (b - z) elif t <= 29000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(x + z)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -4.5e+73) tmp = t_2; elseif (t <= 6.5e-183) tmp = t_1; elseif (t <= 1.15e-63) tmp = Float64(y * Float64(b - z)); elseif (t <= 29000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (x + z); t_2 = t * (b - a); tmp = 0.0; if (t <= -4.5e+73) tmp = t_2; elseif (t <= 6.5e-183) tmp = t_1; elseif (t <= 1.15e-63) tmp = y * (b - z); elseif (t <= 29000.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[(a + N[(x + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e+73], t$95$2, If[LessEqual[t, 6.5e-183], t$95$1, If[LessEqual[t, 1.15e-63], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 29000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(x + z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+73}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-183}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-63}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;t \leq 29000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -4.49999999999999985e73 or 29000 < t Initial program 94.4%
Taylor expanded in t around inf 80.5%
if -4.49999999999999985e73 < t < 6.50000000000000014e-183 or 1.15e-63 < t < 29000Initial program 98.4%
Taylor expanded in b around 0 71.1%
Taylor expanded in y around 0 53.4%
associate--r+53.4%
sub-neg53.4%
metadata-eval53.4%
*-commutative53.4%
cancel-sign-sub-inv53.4%
sub-neg53.4%
mul-1-neg53.4%
remove-double-neg53.4%
*-commutative53.4%
+-commutative53.4%
distribute-neg-in53.4%
metadata-eval53.4%
sub-neg53.4%
Simplified53.4%
Taylor expanded in t around 0 52.5%
if 6.50000000000000014e-183 < t < 1.15e-63Initial program 95.6%
Taylor expanded in y around inf 51.9%
Final simplification64.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -3e+66)
t_1
(if (<= t 2.9e-205)
(+ x a)
(if (<= t 2.45e-64) (* b (- y 2.0)) (if (<= t 41000.0) (+ x a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -3e+66) {
tmp = t_1;
} else if (t <= 2.9e-205) {
tmp = x + a;
} else if (t <= 2.45e-64) {
tmp = b * (y - 2.0);
} else if (t <= 41000.0) {
tmp = x + 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 = t * (b - a)
if (t <= (-3d+66)) then
tmp = t_1
else if (t <= 2.9d-205) then
tmp = x + a
else if (t <= 2.45d-64) then
tmp = b * (y - 2.0d0)
else if (t <= 41000.0d0) then
tmp = x + 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 = t * (b - a);
double tmp;
if (t <= -3e+66) {
tmp = t_1;
} else if (t <= 2.9e-205) {
tmp = x + a;
} else if (t <= 2.45e-64) {
tmp = b * (y - 2.0);
} else if (t <= 41000.0) {
tmp = x + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -3e+66: tmp = t_1 elif t <= 2.9e-205: tmp = x + a elif t <= 2.45e-64: tmp = b * (y - 2.0) elif t <= 41000.0: tmp = x + a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -3e+66) tmp = t_1; elseif (t <= 2.9e-205) tmp = Float64(x + a); elseif (t <= 2.45e-64) tmp = Float64(b * Float64(y - 2.0)); elseif (t <= 41000.0) tmp = Float64(x + a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -3e+66) tmp = t_1; elseif (t <= 2.9e-205) tmp = x + a; elseif (t <= 2.45e-64) tmp = b * (y - 2.0); elseif (t <= 41000.0) tmp = x + a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+66], t$95$1, If[LessEqual[t, 2.9e-205], N[(x + a), $MachinePrecision], If[LessEqual[t, 2.45e-64], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 41000.0], N[(x + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -3 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-205}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-64}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\
\mathbf{elif}\;t \leq 41000:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.00000000000000002e66 or 41000 < t Initial program 94.4%
Taylor expanded in t around inf 79.8%
if -3.00000000000000002e66 < t < 2.90000000000000018e-205 or 2.4500000000000001e-64 < t < 41000Initial program 98.3%
Taylor expanded in b around 0 72.4%
Taylor expanded in a around inf 43.6%
Taylor expanded in t around 0 43.4%
cancel-sign-sub-inv43.4%
metadata-eval43.4%
*-lft-identity43.4%
Simplified43.4%
if 2.90000000000000018e-205 < t < 2.4500000000000001e-64Initial program 96.1%
Taylor expanded in b around inf 46.2%
Taylor expanded in t around 0 46.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (* b (- t 2.0))))
(if (<= b -8.2e+47)
t_2
(if (<= b 2.9e-292)
t_1
(if (<= b 1.32e-116) (+ x z) (if (<= b 9.2e+127) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = b * (t - 2.0);
double tmp;
if (b <= -8.2e+47) {
tmp = t_2;
} else if (b <= 2.9e-292) {
tmp = t_1;
} else if (b <= 1.32e-116) {
tmp = x + z;
} else if (b <= 9.2e+127) {
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 = a * (1.0d0 - t)
t_2 = b * (t - 2.0d0)
if (b <= (-8.2d+47)) then
tmp = t_2
else if (b <= 2.9d-292) then
tmp = t_1
else if (b <= 1.32d-116) then
tmp = x + z
else if (b <= 9.2d+127) 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 = a * (1.0 - t);
double t_2 = b * (t - 2.0);
double tmp;
if (b <= -8.2e+47) {
tmp = t_2;
} else if (b <= 2.9e-292) {
tmp = t_1;
} else if (b <= 1.32e-116) {
tmp = x + z;
} else if (b <= 9.2e+127) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = b * (t - 2.0) tmp = 0 if b <= -8.2e+47: tmp = t_2 elif b <= 2.9e-292: tmp = t_1 elif b <= 1.32e-116: tmp = x + z elif b <= 9.2e+127: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(b * Float64(t - 2.0)) tmp = 0.0 if (b <= -8.2e+47) tmp = t_2; elseif (b <= 2.9e-292) tmp = t_1; elseif (b <= 1.32e-116) tmp = Float64(x + z); elseif (b <= 9.2e+127) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = b * (t - 2.0); tmp = 0.0; if (b <= -8.2e+47) tmp = t_2; elseif (b <= 2.9e-292) tmp = t_1; elseif (b <= 1.32e-116) tmp = x + z; elseif (b <= 9.2e+127) tmp = t_1; else tmp = t_2; 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[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.2e+47], t$95$2, If[LessEqual[b, 2.9e-292], t$95$1, If[LessEqual[b, 1.32e-116], N[(x + z), $MachinePrecision], If[LessEqual[b, 9.2e+127], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(t - 2\right)\\
\mathbf{if}\;b \leq -8.2 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.32 \cdot 10^{-116}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -8.2000000000000002e47 or 9.2000000000000007e127 < b Initial program 93.0%
Taylor expanded in b around inf 81.5%
Taylor expanded in y around 0 57.4%
if -8.2000000000000002e47 < b < 2.89999999999999993e-292 or 1.32000000000000006e-116 < b < 9.2000000000000007e127Initial program 98.3%
Taylor expanded in a around inf 42.6%
if 2.89999999999999993e-292 < b < 1.32000000000000006e-116Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in y around 0 82.4%
associate--r+82.4%
sub-neg82.4%
metadata-eval82.4%
*-commutative82.4%
cancel-sign-sub-inv82.4%
sub-neg82.4%
mul-1-neg82.4%
remove-double-neg82.4%
*-commutative82.4%
+-commutative82.4%
distribute-neg-in82.4%
metadata-eval82.4%
sub-neg82.4%
Simplified82.4%
Taylor expanded in a around 0 58.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (or (<= b -1.16e-51) (not (<= b 9e+127)))
(+ (+ 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 <= -1.16e-51) || !(b <= 9e+127)) {
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 <= (-1.16d-51)) .or. (.not. (b <= 9d+127))) 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 <= -1.16e-51) || !(b <= 9e+127)) {
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 <= -1.16e-51) or not (b <= 9e+127): 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 <= -1.16e-51) || !(b <= 9e+127)) 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 <= -1.16e-51) || ~((b <= 9e+127))) 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, -1.16e-51], N[Not[LessEqual[b, 9e+127]], $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 -1.16 \cdot 10^{-51} \lor \neg \left(b \leq 9 \cdot 10^{+127}\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 < -1.1600000000000001e-51 or 9.00000000000000068e127 < b Initial program 93.3%
Taylor expanded in z around 0 90.1%
if -1.1600000000000001e-51 < b < 9.00000000000000068e127Initial program 99.2%
Taylor expanded in b around 0 95.3%
Final simplification92.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.8e+21) (* y b) (if (<= b 4e-298) x (if (<= b 2.9e-209) z (if (<= b 4.2e+73) x (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.8e+21) {
tmp = y * b;
} else if (b <= 4e-298) {
tmp = x;
} else if (b <= 2.9e-209) {
tmp = z;
} else if (b <= 4.2e+73) {
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 <= (-2.8d+21)) then
tmp = y * b
else if (b <= 4d-298) then
tmp = x
else if (b <= 2.9d-209) then
tmp = z
else if (b <= 4.2d+73) 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 <= -2.8e+21) {
tmp = y * b;
} else if (b <= 4e-298) {
tmp = x;
} else if (b <= 2.9e-209) {
tmp = z;
} else if (b <= 4.2e+73) {
tmp = x;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.8e+21: tmp = y * b elif b <= 4e-298: tmp = x elif b <= 2.9e-209: tmp = z elif b <= 4.2e+73: tmp = x else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.8e+21) tmp = Float64(y * b); elseif (b <= 4e-298) tmp = x; elseif (b <= 2.9e-209) tmp = z; elseif (b <= 4.2e+73) 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 <= -2.8e+21) tmp = y * b; elseif (b <= 4e-298) tmp = x; elseif (b <= 2.9e-209) tmp = z; elseif (b <= 4.2e+73) tmp = x; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.8e+21], N[(y * b), $MachinePrecision], If[LessEqual[b, 4e-298], x, If[LessEqual[b, 2.9e-209], z, If[LessEqual[b, 4.2e+73], x, N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+21}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;b \leq 4 \cdot 10^{-298}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{-209}:\\
\;\;\;\;z\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+73}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -2.8e21 or 4.2000000000000003e73 < b Initial program 94.3%
Taylor expanded in z around 0 89.5%
Taylor expanded in y around inf 31.5%
if -2.8e21 < b < 3.99999999999999965e-298 or 2.90000000000000026e-209 < b < 4.2000000000000003e73Initial program 98.2%
Taylor expanded in x around inf 28.3%
if 3.99999999999999965e-298 < b < 2.90000000000000026e-209Initial program 100.0%
Taylor expanded in z around inf 61.1%
Taylor expanded in y around 0 46.7%
Final simplification31.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.9e+42) (not (<= b 1.05e+128))) (+ 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 <= -4.9e+42) || !(b <= 1.05e+128)) {
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 <= (-4.9d+42)) .or. (.not. (b <= 1.05d+128))) 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 <= -4.9e+42) || !(b <= 1.05e+128)) {
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 <= -4.9e+42) or not (b <= 1.05e+128): 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 <= -4.9e+42) || !(b <= 1.05e+128)) 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 <= -4.9e+42) || ~((b <= 1.05e+128))) 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, -4.9e+42], N[Not[LessEqual[b, 1.05e+128]], $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 -4.9 \cdot 10^{+42} \lor \neg \left(b \leq 1.05 \cdot 10^{+128}\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 < -4.9000000000000002e42 or 1.05e128 < b Initial program 93.0%
Taylor expanded in z around 0 91.1%
Taylor expanded in a around 0 85.9%
if -4.9000000000000002e42 < b < 1.05e128Initial program 98.7%
Taylor expanded in b around 0 91.5%
Final simplification89.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -2.65e+42)
t_1
(if (<= b 1e-209)
(+ a (+ x z))
(if (<= b 1.48e+125) (- x (* y z)) 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 tmp;
if (b <= -2.65e+42) {
tmp = t_1;
} else if (b <= 1e-209) {
tmp = a + (x + z);
} else if (b <= 1.48e+125) {
tmp = x - (y * z);
} 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 = b * ((y + t) - 2.0d0)
if (b <= (-2.65d+42)) then
tmp = t_1
else if (b <= 1d-209) then
tmp = a + (x + z)
else if (b <= 1.48d+125) then
tmp = x - (y * z)
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 = b * ((y + t) - 2.0);
double tmp;
if (b <= -2.65e+42) {
tmp = t_1;
} else if (b <= 1e-209) {
tmp = a + (x + z);
} else if (b <= 1.48e+125) {
tmp = x - (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((y + t) - 2.0) tmp = 0 if b <= -2.65e+42: tmp = t_1 elif b <= 1e-209: tmp = a + (x + z) elif b <= 1.48e+125: tmp = x - (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -2.65e+42) tmp = t_1; elseif (b <= 1e-209) tmp = Float64(a + Float64(x + z)); elseif (b <= 1.48e+125) tmp = Float64(x - Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -2.65e+42) tmp = t_1; elseif (b <= 1e-209) tmp = a + (x + z); elseif (b <= 1.48e+125) tmp = x - (y * z); else tmp = 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]}, If[LessEqual[b, -2.65e+42], t$95$1, If[LessEqual[b, 1e-209], N[(a + N[(x + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.48e+125], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -2.65 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 10^{-209}:\\
\;\;\;\;a + \left(x + z\right)\\
\mathbf{elif}\;b \leq 1.48 \cdot 10^{+125}:\\
\;\;\;\;x - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.65000000000000014e42 or 1.48000000000000003e125 < b Initial program 93.1%
Taylor expanded in b around inf 80.5%
if -2.65000000000000014e42 < b < 1e-209Initial program 97.8%
Taylor expanded in b around 0 89.6%
Taylor expanded in y around 0 73.9%
associate--r+73.9%
sub-neg73.9%
metadata-eval73.9%
*-commutative73.9%
cancel-sign-sub-inv73.9%
sub-neg73.9%
mul-1-neg73.9%
remove-double-neg73.9%
*-commutative73.9%
+-commutative73.9%
distribute-neg-in73.9%
metadata-eval73.9%
sub-neg73.9%
Simplified73.9%
Taylor expanded in t around 0 51.0%
if 1e-209 < b < 1.48000000000000003e125Initial program 100.0%
Taylor expanded in b around 0 94.3%
Taylor expanded in y around inf 53.7%
Final simplification63.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.86e+199) (* t b) (if (or (<= t -3e+66) (not (<= t 51000.0))) (* t (- a)) (+ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.86e+199) {
tmp = t * b;
} else if ((t <= -3e+66) || !(t <= 51000.0)) {
tmp = t * -a;
} else {
tmp = x + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.86d+199)) then
tmp = t * b
else if ((t <= (-3d+66)) .or. (.not. (t <= 51000.0d0))) then
tmp = t * -a
else
tmp = x + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.86e+199) {
tmp = t * b;
} else if ((t <= -3e+66) || !(t <= 51000.0)) {
tmp = t * -a;
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.86e+199: tmp = t * b elif (t <= -3e+66) or not (t <= 51000.0): tmp = t * -a else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.86e+199) tmp = Float64(t * b); elseif ((t <= -3e+66) || !(t <= 51000.0)) tmp = Float64(t * Float64(-a)); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.86e+199) tmp = t * b; elseif ((t <= -3e+66) || ~((t <= 51000.0))) tmp = t * -a; else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.86e+199], N[(t * b), $MachinePrecision], If[Or[LessEqual[t, -3e+66], N[Not[LessEqual[t, 51000.0]], $MachinePrecision]], N[(t * (-a)), $MachinePrecision], N[(x + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.86 \cdot 10^{+199}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq -3 \cdot 10^{+66} \lor \neg \left(t \leq 51000\right):\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if t < -1.85999999999999996e199Initial program 95.0%
Taylor expanded in t around inf 90.0%
Taylor expanded in b around inf 70.5%
if -1.85999999999999996e199 < t < -3.00000000000000002e66 or 51000 < t Initial program 94.3%
Taylor expanded in t around inf 77.5%
Taylor expanded in b around 0 49.9%
mul-1-neg49.9%
*-commutative49.9%
distribute-rgt-neg-in49.9%
Simplified49.9%
if -3.00000000000000002e66 < t < 51000Initial program 97.9%
Taylor expanded in b around 0 69.6%
Taylor expanded in a around inf 39.9%
Taylor expanded in t around 0 39.7%
cancel-sign-sub-inv39.7%
metadata-eval39.7%
*-lft-identity39.7%
Simplified39.7%
Final simplification45.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.65e+42) (not (<= b 3.8e+92))) (+ x (* b (- (+ y t) 2.0))) (+ (+ x z) (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.65e+42) || !(b <= 3.8e+92)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x + z) + (a * (1.0 - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.65d+42)) .or. (.not. (b <= 3.8d+92))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = (x + z) + (a * (1.0d0 - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.65e+42) || !(b <= 3.8e+92)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x + z) + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.65e+42) or not (b <= 3.8e+92): tmp = x + (b * ((y + t) - 2.0)) else: tmp = (x + z) + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.65e+42) || !(b <= 3.8e+92)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(Float64(x + z) + Float64(a * Float64(1.0 - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.65e+42) || ~((b <= 3.8e+92))) tmp = x + (b * ((y + t) - 2.0)); else tmp = (x + z) + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.65e+42], N[Not[LessEqual[b, 3.8e+92]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + z), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.65 \cdot 10^{+42} \lor \neg \left(b \leq 3.8 \cdot 10^{+92}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z\right) + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if b < -1.6499999999999999e42 or 3.8e92 < b Initial program 93.7%
Taylor expanded in z around 0 90.4%
Taylor expanded in a around 0 83.1%
if -1.6499999999999999e42 < b < 3.8e92Initial program 98.6%
Taylor expanded in b around 0 91.9%
Taylor expanded in y around 0 74.7%
associate--r+74.7%
sub-neg74.7%
metadata-eval74.7%
*-commutative74.7%
cancel-sign-sub-inv74.7%
sub-neg74.7%
mul-1-neg74.7%
remove-double-neg74.7%
*-commutative74.7%
+-commutative74.7%
distribute-neg-in74.7%
metadata-eval74.7%
sub-neg74.7%
Simplified74.7%
Final simplification78.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.3e-67) (not (<= a 1.05e+53))) (* a (- 1.0 t)) (+ x z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.3e-67) || !(a <= 1.05e+53)) {
tmp = a * (1.0 - t);
} else {
tmp = x + z;
}
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.3d-67)) .or. (.not. (a <= 1.05d+53))) then
tmp = a * (1.0d0 - t)
else
tmp = x + z
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.3e-67) || !(a <= 1.05e+53)) {
tmp = a * (1.0 - t);
} else {
tmp = x + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.3e-67) or not (a <= 1.05e+53): tmp = a * (1.0 - t) else: tmp = x + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.3e-67) || !(a <= 1.05e+53)) tmp = Float64(a * Float64(1.0 - t)); else tmp = Float64(x + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.3e-67) || ~((a <= 1.05e+53))) tmp = a * (1.0 - t); else tmp = x + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.3e-67], N[Not[LessEqual[a, 1.05e+53]], $MachinePrecision]], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{-67} \lor \neg \left(a \leq 1.05 \cdot 10^{+53}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\end{array}
if a < -2.3e-67 or 1.0500000000000001e53 < a Initial program 93.3%
Taylor expanded in a around inf 54.4%
if -2.3e-67 < a < 1.0500000000000001e53Initial program 100.0%
Taylor expanded in b around 0 58.6%
Taylor expanded in y around 0 36.8%
associate--r+36.8%
sub-neg36.8%
metadata-eval36.8%
*-commutative36.8%
cancel-sign-sub-inv36.8%
sub-neg36.8%
mul-1-neg36.8%
remove-double-neg36.8%
*-commutative36.8%
+-commutative36.8%
distribute-neg-in36.8%
metadata-eval36.8%
sub-neg36.8%
Simplified36.8%
Taylor expanded in a around 0 35.2%
Final simplification45.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.6e+85) (not (<= t 29000.0))) (* t b) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.6e+85) || !(t <= 29000.0)) {
tmp = t * b;
} else {
tmp = x + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-5.6d+85)) .or. (.not. (t <= 29000.0d0))) then
tmp = t * b
else
tmp = x + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.6e+85) || !(t <= 29000.0)) {
tmp = t * b;
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.6e+85) or not (t <= 29000.0): tmp = t * b else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.6e+85) || !(t <= 29000.0)) tmp = Float64(t * b); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.6e+85) || ~((t <= 29000.0))) tmp = t * b; else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.6e+85], N[Not[LessEqual[t, 29000.0]], $MachinePrecision]], N[(t * b), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+85} \lor \neg \left(t \leq 29000\right):\\
\;\;\;\;t \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if t < -5.5999999999999998e85 or 29000 < t Initial program 94.3%
Taylor expanded in t around inf 80.3%
Taylor expanded in b around inf 44.5%
if -5.5999999999999998e85 < t < 29000Initial program 98.0%
Taylor expanded in b around 0 70.0%
Taylor expanded in a around inf 40.0%
Taylor expanded in t around 0 39.2%
cancel-sign-sub-inv39.2%
metadata-eval39.2%
*-lft-identity39.2%
Simplified39.2%
Final simplification41.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -9e+35) x (if (<= x 4.5e+74) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9e+35) {
tmp = x;
} else if (x <= 4.5e+74) {
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 <= (-9d+35)) then
tmp = x
else if (x <= 4.5d+74) 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 <= -9e+35) {
tmp = x;
} else if (x <= 4.5e+74) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -9e+35: tmp = x elif x <= 4.5e+74: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -9e+35) tmp = x; elseif (x <= 4.5e+74) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -9e+35) tmp = x; elseif (x <= 4.5e+74) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9e+35], x, If[LessEqual[x, 4.5e+74], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+35}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+74}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8.9999999999999993e35 or 4.5e74 < x Initial program 96.3%
Taylor expanded in x around inf 34.9%
if -8.9999999999999993e35 < x < 4.5e74Initial program 96.5%
Taylor expanded in a around inf 33.9%
Taylor expanded in t around 0 14.4%
(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 30.3%
Taylor expanded in t around 0 11.1%
herbie shell --seed 2024110
(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)))