
(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 18 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 (if (<= b 2.9e+180) (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))) (- x (* b (- 2.0 (+ y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 2.9e+180) {
tmp = fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
} else {
tmp = x - (b * (2.0 - (y + t)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 2.9e+180) tmp = fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))))); else tmp = Float64(x - Float64(b * Float64(2.0 - Float64(y + t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 2.9e+180], 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], N[(x - N[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.9 \cdot 10^{+180}:\\
\;\;\;\;\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\
\end{array}
\end{array}
if b < 2.90000000000000007e180Initial program 98.1%
+-commutative98.1%
fma-define99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
sub-neg99.5%
associate-+l-99.5%
fma-neg99.5%
sub-neg99.5%
metadata-eval99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
if 2.90000000000000007e180 < b Initial program 85.0%
Taylor expanded in a around 0 92.9%
Taylor expanded in z around 0 95.6%
Final simplification98.9%
(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 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 = 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 = 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 = 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 = 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 = 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, t$95$1]]]
\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}:\\
\;\;\;\;t\_1\\
\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 b around inf 70.0%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (* z (- y))))
(if (<= y -2.5e+129)
(* b y)
(if (<= y -7.2e+48)
t_2
(if (<= y -5.2e+47)
(* b y)
(if (<= y -3e-143)
t_1
(if (<= y 1.8e-218)
(* b t)
(if (<= y 68000000000000.0) 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 = z * -y;
double tmp;
if (y <= -2.5e+129) {
tmp = b * y;
} else if (y <= -7.2e+48) {
tmp = t_2;
} else if (y <= -5.2e+47) {
tmp = b * y;
} else if (y <= -3e-143) {
tmp = t_1;
} else if (y <= 1.8e-218) {
tmp = b * t;
} else if (y <= 68000000000000.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 * (1.0d0 - t)
t_2 = z * -y
if (y <= (-2.5d+129)) then
tmp = b * y
else if (y <= (-7.2d+48)) then
tmp = t_2
else if (y <= (-5.2d+47)) then
tmp = b * y
else if (y <= (-3d-143)) then
tmp = t_1
else if (y <= 1.8d-218) then
tmp = b * t
else if (y <= 68000000000000.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 * (1.0 - t);
double t_2 = z * -y;
double tmp;
if (y <= -2.5e+129) {
tmp = b * y;
} else if (y <= -7.2e+48) {
tmp = t_2;
} else if (y <= -5.2e+47) {
tmp = b * y;
} else if (y <= -3e-143) {
tmp = t_1;
} else if (y <= 1.8e-218) {
tmp = b * t;
} else if (y <= 68000000000000.0) {
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 = z * -y tmp = 0 if y <= -2.5e+129: tmp = b * y elif y <= -7.2e+48: tmp = t_2 elif y <= -5.2e+47: tmp = b * y elif y <= -3e-143: tmp = t_1 elif y <= 1.8e-218: tmp = b * t elif y <= 68000000000000.0: 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(z * Float64(-y)) tmp = 0.0 if (y <= -2.5e+129) tmp = Float64(b * y); elseif (y <= -7.2e+48) tmp = t_2; elseif (y <= -5.2e+47) tmp = Float64(b * y); elseif (y <= -3e-143) tmp = t_1; elseif (y <= 1.8e-218) tmp = Float64(b * t); elseif (y <= 68000000000000.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 * (1.0 - t); t_2 = z * -y; tmp = 0.0; if (y <= -2.5e+129) tmp = b * y; elseif (y <= -7.2e+48) tmp = t_2; elseif (y <= -5.2e+47) tmp = b * y; elseif (y <= -3e-143) tmp = t_1; elseif (y <= 1.8e-218) tmp = b * t; elseif (y <= 68000000000000.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[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -2.5e+129], N[(b * y), $MachinePrecision], If[LessEqual[y, -7.2e+48], t$95$2, If[LessEqual[y, -5.2e+47], N[(b * y), $MachinePrecision], If[LessEqual[y, -3e-143], t$95$1, If[LessEqual[y, 1.8e-218], N[(b * t), $MachinePrecision], If[LessEqual[y, 68000000000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+129}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{+48}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{+47}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-218}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;y \leq 68000000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.5000000000000001e129 or -7.19999999999999967e48 < y < -5.20000000000000007e47Initial program 87.4%
Taylor expanded in z around 0 68.4%
Taylor expanded in y around inf 54.2%
if -2.5000000000000001e129 < y < -7.19999999999999967e48 or 6.8e13 < y Initial program 97.3%
Taylor expanded in z around inf 45.9%
Taylor expanded in y around inf 45.7%
mul-1-neg45.7%
*-commutative45.7%
distribute-rgt-neg-in45.7%
Simplified45.7%
if -5.20000000000000007e47 < y < -2.99999999999999985e-143 or 1.80000000000000006e-218 < y < 6.8e13Initial program 98.9%
Taylor expanded in a around inf 35.4%
if -2.99999999999999985e-143 < y < 1.80000000000000006e-218Initial program 96.4%
Taylor expanded in t around inf 49.1%
Taylor expanded in b around inf 33.0%
*-commutative33.0%
Simplified33.0%
Final simplification40.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a (- 1.0 t)))) (t_2 (- x (* b (- 2.0 (+ y t))))))
(if (<= b -5.1e+36)
t_2
(if (<= b -950.0)
t_1
(if (<= b -1.65e-40)
t_2
(if (<= b 3e-50) t_1 (if (<= b 1e-25) (* z (- 1.0 y)) 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 * (2.0 - (y + t)));
double tmp;
if (b <= -5.1e+36) {
tmp = t_2;
} else if (b <= -950.0) {
tmp = t_1;
} else if (b <= -1.65e-40) {
tmp = t_2;
} else if (b <= 3e-50) {
tmp = t_1;
} else if (b <= 1e-25) {
tmp = z * (1.0 - y);
} 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 * (2.0d0 - (y + t)))
if (b <= (-5.1d+36)) then
tmp = t_2
else if (b <= (-950.0d0)) then
tmp = t_1
else if (b <= (-1.65d-40)) then
tmp = t_2
else if (b <= 3d-50) then
tmp = t_1
else if (b <= 1d-25) then
tmp = z * (1.0d0 - y)
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 * (2.0 - (y + t)));
double tmp;
if (b <= -5.1e+36) {
tmp = t_2;
} else if (b <= -950.0) {
tmp = t_1;
} else if (b <= -1.65e-40) {
tmp = t_2;
} else if (b <= 3e-50) {
tmp = t_1;
} else if (b <= 1e-25) {
tmp = z * (1.0 - y);
} 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 * (2.0 - (y + t))) tmp = 0 if b <= -5.1e+36: tmp = t_2 elif b <= -950.0: tmp = t_1 elif b <= -1.65e-40: tmp = t_2 elif b <= 3e-50: tmp = t_1 elif b <= 1e-25: tmp = z * (1.0 - y) 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(2.0 - Float64(y + t)))) tmp = 0.0 if (b <= -5.1e+36) tmp = t_2; elseif (b <= -950.0) tmp = t_1; elseif (b <= -1.65e-40) tmp = t_2; elseif (b <= 3e-50) tmp = t_1; elseif (b <= 1e-25) tmp = Float64(z * Float64(1.0 - y)); 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 * (2.0 - (y + t))); tmp = 0.0; if (b <= -5.1e+36) tmp = t_2; elseif (b <= -950.0) tmp = t_1; elseif (b <= -1.65e-40) tmp = t_2; elseif (b <= 3e-50) tmp = t_1; elseif (b <= 1e-25) tmp = z * (1.0 - y); 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[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.1e+36], t$95$2, If[LessEqual[b, -950.0], t$95$1, If[LessEqual[b, -1.65e-40], t$95$2, If[LessEqual[b, 3e-50], t$95$1, If[LessEqual[b, 1e-25], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \left(1 - t\right)\\
t_2 := x - b \cdot \left(2 - \left(y + t\right)\right)\\
\mathbf{if}\;b \leq -5.1 \cdot 10^{+36}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -950:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.65 \cdot 10^{-40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 10^{-25}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -5.09999999999999973e36 or -950 < b < -1.64999999999999996e-40 or 1.00000000000000004e-25 < b Initial program 92.7%
Taylor expanded in a around 0 86.2%
Taylor expanded in z around 0 75.5%
if -5.09999999999999973e36 < b < -950 or -1.64999999999999996e-40 < b < 2.9999999999999999e-50Initial program 100.0%
Taylor expanded in z around 0 65.3%
Taylor expanded in b around 0 60.2%
if 2.9999999999999999e-50 < b < 1.00000000000000004e-25Initial program 100.0%
Taylor expanded in z around inf 79.6%
Final simplification69.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ (* z (- 1.0 y)) (* a (- 1.0 t)))))
(t_2 (- x (* b (- 2.0 (+ y t))))))
(if (<= b -9.8e+39)
t_2
(if (<= b 6.6e+31)
t_1
(if (<= b 1.76e+87)
(- (* b (- (+ y t) 2.0)) (* t a))
(if (<= b 4e+101) t_1 t_2))))))
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 t_2 = x - (b * (2.0 - (y + t)));
double tmp;
if (b <= -9.8e+39) {
tmp = t_2;
} else if (b <= 6.6e+31) {
tmp = t_1;
} else if (b <= 1.76e+87) {
tmp = (b * ((y + t) - 2.0)) - (t * a);
} else if (b <= 4e+101) {
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 + ((z * (1.0d0 - y)) + (a * (1.0d0 - t)))
t_2 = x - (b * (2.0d0 - (y + t)))
if (b <= (-9.8d+39)) then
tmp = t_2
else if (b <= 6.6d+31) then
tmp = t_1
else if (b <= 1.76d+87) then
tmp = (b * ((y + t) - 2.0d0)) - (t * a)
else if (b <= 4d+101) 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 + ((z * (1.0 - y)) + (a * (1.0 - t)));
double t_2 = x - (b * (2.0 - (y + t)));
double tmp;
if (b <= -9.8e+39) {
tmp = t_2;
} else if (b <= 6.6e+31) {
tmp = t_1;
} else if (b <= 1.76e+87) {
tmp = (b * ((y + t) - 2.0)) - (t * a);
} else if (b <= 4e+101) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((z * (1.0 - y)) + (a * (1.0 - t))) t_2 = x - (b * (2.0 - (y + t))) tmp = 0 if b <= -9.8e+39: tmp = t_2 elif b <= 6.6e+31: tmp = t_1 elif b <= 1.76e+87: tmp = (b * ((y + t) - 2.0)) - (t * a) elif b <= 4e+101: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(z * Float64(1.0 - y)) + Float64(a * Float64(1.0 - t)))) t_2 = Float64(x - Float64(b * Float64(2.0 - Float64(y + t)))) tmp = 0.0 if (b <= -9.8e+39) tmp = t_2; elseif (b <= 6.6e+31) tmp = t_1; elseif (b <= 1.76e+87) tmp = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) - Float64(t * a)); elseif (b <= 4e+101) tmp = t_1; else tmp = t_2; 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))); t_2 = x - (b * (2.0 - (y + t))); tmp = 0.0; if (b <= -9.8e+39) tmp = t_2; elseif (b <= 6.6e+31) tmp = t_1; elseif (b <= 1.76e+87) tmp = (b * ((y + t) - 2.0)) - (t * a); elseif (b <= 4e+101) 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[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.8e+39], t$95$2, If[LessEqual[b, 6.6e+31], t$95$1, If[LessEqual[b, 1.76e+87], N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4e+101], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\
t_2 := x - b \cdot \left(2 - \left(y + t\right)\right)\\
\mathbf{if}\;b \leq -9.8 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.76 \cdot 10^{+87}:\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -9.79999999999999974e39 or 3.9999999999999999e101 < b Initial program 89.2%
Taylor expanded in a around 0 88.3%
Taylor expanded in z around 0 84.2%
if -9.79999999999999974e39 < b < 6.59999999999999985e31 or 1.76000000000000003e87 < b < 3.9999999999999999e101Initial program 100.0%
Taylor expanded in b around 0 89.2%
if 6.59999999999999985e31 < b < 1.76000000000000003e87Initial program 100.0%
Taylor expanded in t around inf 92.4%
mul-1-neg92.4%
distribute-rgt-neg-in92.4%
Simplified92.4%
Final simplification87.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a (- 1.0 t))))
(t_2 (* b (- (+ y t) 2.0)))
(t_3 (* z (- 1.0 y))))
(if (<= b -1.3e+37)
t_2
(if (<= b -1.06e-250)
t_1
(if (<= b -1.5e-296)
t_3
(if (<= b 3e-50) t_1 (if (<= b 2.5e+32) t_3 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 t_3 = z * (1.0 - y);
double tmp;
if (b <= -1.3e+37) {
tmp = t_2;
} else if (b <= -1.06e-250) {
tmp = t_1;
} else if (b <= -1.5e-296) {
tmp = t_3;
} else if (b <= 3e-50) {
tmp = t_1;
} else if (b <= 2.5e+32) {
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 = x + (a * (1.0d0 - t))
t_2 = b * ((y + t) - 2.0d0)
t_3 = z * (1.0d0 - y)
if (b <= (-1.3d+37)) then
tmp = t_2
else if (b <= (-1.06d-250)) then
tmp = t_1
else if (b <= (-1.5d-296)) then
tmp = t_3
else if (b <= 3d-50) then
tmp = t_1
else if (b <= 2.5d+32) 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 = x + (a * (1.0 - t));
double t_2 = b * ((y + t) - 2.0);
double t_3 = z * (1.0 - y);
double tmp;
if (b <= -1.3e+37) {
tmp = t_2;
} else if (b <= -1.06e-250) {
tmp = t_1;
} else if (b <= -1.5e-296) {
tmp = t_3;
} else if (b <= 3e-50) {
tmp = t_1;
} else if (b <= 2.5e+32) {
tmp = t_3;
} 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) t_3 = z * (1.0 - y) tmp = 0 if b <= -1.3e+37: tmp = t_2 elif b <= -1.06e-250: tmp = t_1 elif b <= -1.5e-296: tmp = t_3 elif b <= 3e-50: tmp = t_1 elif b <= 2.5e+32: tmp = t_3 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)) t_3 = Float64(z * Float64(1.0 - y)) tmp = 0.0 if (b <= -1.3e+37) tmp = t_2; elseif (b <= -1.06e-250) tmp = t_1; elseif (b <= -1.5e-296) tmp = t_3; elseif (b <= 3e-50) tmp = t_1; elseif (b <= 2.5e+32) tmp = t_3; 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); t_3 = z * (1.0 - y); tmp = 0.0; if (b <= -1.3e+37) tmp = t_2; elseif (b <= -1.06e-250) tmp = t_1; elseif (b <= -1.5e-296) tmp = t_3; elseif (b <= 3e-50) tmp = t_1; elseif (b <= 2.5e+32) tmp = t_3; 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]}, Block[{t$95$3 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+37], t$95$2, If[LessEqual[b, -1.06e-250], t$95$1, If[LessEqual[b, -1.5e-296], t$95$3, If[LessEqual[b, 3e-50], t$95$1, If[LessEqual[b, 2.5e+32], t$95$3, 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)\\
t_3 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -1.3 \cdot 10^{+37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.06 \cdot 10^{-250}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.5 \cdot 10^{-296}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+32}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -1.3e37 or 2.4999999999999999e32 < b Initial program 91.4%
Taylor expanded in b around inf 71.5%
if -1.3e37 < b < -1.05999999999999993e-250 or -1.4999999999999999e-296 < b < 2.9999999999999999e-50Initial program 100.0%
Taylor expanded in z around 0 70.0%
Taylor expanded in b around 0 60.4%
if -1.05999999999999993e-250 < b < -1.4999999999999999e-296 or 2.9999999999999999e-50 < b < 2.4999999999999999e32Initial program 99.9%
Taylor expanded in z around inf 60.9%
Final simplification65.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -7.5e+34)
t_1
(if (<= t -1.22e-169)
(* b y)
(if (<= t 4.2e-155)
x
(if (<= t 8.8e-30)
(* a (- 1.0 t))
(if (<= t 5.3e+36) (* z (- y)) 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 <= -7.5e+34) {
tmp = t_1;
} else if (t <= -1.22e-169) {
tmp = b * y;
} else if (t <= 4.2e-155) {
tmp = x;
} else if (t <= 8.8e-30) {
tmp = a * (1.0 - t);
} else if (t <= 5.3e+36) {
tmp = z * -y;
} 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 <= (-7.5d+34)) then
tmp = t_1
else if (t <= (-1.22d-169)) then
tmp = b * y
else if (t <= 4.2d-155) then
tmp = x
else if (t <= 8.8d-30) then
tmp = a * (1.0d0 - t)
else if (t <= 5.3d+36) then
tmp = z * -y
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 <= -7.5e+34) {
tmp = t_1;
} else if (t <= -1.22e-169) {
tmp = b * y;
} else if (t <= 4.2e-155) {
tmp = x;
} else if (t <= 8.8e-30) {
tmp = a * (1.0 - t);
} else if (t <= 5.3e+36) {
tmp = z * -y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -7.5e+34: tmp = t_1 elif t <= -1.22e-169: tmp = b * y elif t <= 4.2e-155: tmp = x elif t <= 8.8e-30: tmp = a * (1.0 - t) elif t <= 5.3e+36: tmp = z * -y 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 <= -7.5e+34) tmp = t_1; elseif (t <= -1.22e-169) tmp = Float64(b * y); elseif (t <= 4.2e-155) tmp = x; elseif (t <= 8.8e-30) tmp = Float64(a * Float64(1.0 - t)); elseif (t <= 5.3e+36) tmp = Float64(z * Float64(-y)); 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 <= -7.5e+34) tmp = t_1; elseif (t <= -1.22e-169) tmp = b * y; elseif (t <= 4.2e-155) tmp = x; elseif (t <= 8.8e-30) tmp = a * (1.0 - t); elseif (t <= 5.3e+36) tmp = z * -y; 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, -7.5e+34], t$95$1, If[LessEqual[t, -1.22e-169], N[(b * y), $MachinePrecision], If[LessEqual[t, 4.2e-155], x, If[LessEqual[t, 8.8e-30], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.3e+36], N[(z * (-y)), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.22 \cdot 10^{-169}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-155}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-30}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;t \leq 5.3 \cdot 10^{+36}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.49999999999999976e34 or 5.3e36 < t Initial program 94.3%
Taylor expanded in t around inf 68.1%
if -7.49999999999999976e34 < t < -1.22e-169Initial program 97.3%
Taylor expanded in z around 0 74.8%
Taylor expanded in y around inf 33.1%
if -1.22e-169 < t < 4.2000000000000003e-155Initial program 96.0%
Taylor expanded in x around inf 37.2%
if 4.2000000000000003e-155 < t < 8.79999999999999933e-30Initial program 100.0%
Taylor expanded in a around inf 31.1%
if 8.79999999999999933e-30 < t < 5.3e36Initial program 100.0%
Taylor expanded in z around inf 64.5%
Taylor expanded in y around inf 46.4%
mul-1-neg46.4%
*-commutative46.4%
distribute-rgt-neg-in46.4%
Simplified46.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t)))
(t_2 (- x (* b (- 2.0 (+ y t)))))
(t_3 (+ t_2 t_1)))
(if (<= b -1.02e-39)
t_3
(if (<= b 4.2e+30)
(+ x (+ (* z (- 1.0 y)) t_1))
(if (<= b 1e+123) t_3 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 = x - (b * (2.0 - (y + t)));
double t_3 = t_2 + t_1;
double tmp;
if (b <= -1.02e-39) {
tmp = t_3;
} else if (b <= 4.2e+30) {
tmp = x + ((z * (1.0 - y)) + t_1);
} else if (b <= 1e+123) {
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 = a * (1.0d0 - t)
t_2 = x - (b * (2.0d0 - (y + t)))
t_3 = t_2 + t_1
if (b <= (-1.02d-39)) then
tmp = t_3
else if (b <= 4.2d+30) then
tmp = x + ((z * (1.0d0 - y)) + t_1)
else if (b <= 1d+123) 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 = a * (1.0 - t);
double t_2 = x - (b * (2.0 - (y + t)));
double t_3 = t_2 + t_1;
double tmp;
if (b <= -1.02e-39) {
tmp = t_3;
} else if (b <= 4.2e+30) {
tmp = x + ((z * (1.0 - y)) + t_1);
} else if (b <= 1e+123) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = x - (b * (2.0 - (y + t))) t_3 = t_2 + t_1 tmp = 0 if b <= -1.02e-39: tmp = t_3 elif b <= 4.2e+30: tmp = x + ((z * (1.0 - y)) + t_1) elif b <= 1e+123: tmp = t_3 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(x - Float64(b * Float64(2.0 - Float64(y + t)))) t_3 = Float64(t_2 + t_1) tmp = 0.0 if (b <= -1.02e-39) tmp = t_3; elseif (b <= 4.2e+30) tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) + t_1)); elseif (b <= 1e+123) tmp = t_3; 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 = x - (b * (2.0 - (y + t))); t_3 = t_2 + t_1; tmp = 0.0; if (b <= -1.02e-39) tmp = t_3; elseif (b <= 4.2e+30) tmp = x + ((z * (1.0 - y)) + t_1); elseif (b <= 1e+123) tmp = t_3; 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[(x - N[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + t$95$1), $MachinePrecision]}, If[LessEqual[b, -1.02e-39], t$95$3, If[LessEqual[b, 4.2e+30], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e+123], t$95$3, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := x - b \cdot \left(2 - \left(y + t\right)\right)\\
t_3 := t\_2 + t\_1\\
\mathbf{if}\;b \leq -1.02 \cdot 10^{-39}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+30}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) + t\_1\right)\\
\mathbf{elif}\;b \leq 10^{+123}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -1.02000000000000007e-39 or 4.2e30 < b < 9.99999999999999978e122Initial program 96.3%
Taylor expanded in z around 0 84.3%
if -1.02000000000000007e-39 < b < 4.2e30Initial program 100.0%
Taylor expanded in b around 0 91.7%
if 9.99999999999999978e122 < b Initial program 86.0%
Taylor expanded in a around 0 92.3%
Taylor expanded in z around 0 92.7%
Final simplification89.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.6e+128)
(* b t)
(if (<= t -1.4e+35)
(* t (- a))
(if (<= t -3.1e-178)
(* b y)
(if (<= t 5.2e-145) x (if (<= t 5.8e+173) (* z (- y)) (* b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.6e+128) {
tmp = b * t;
} else if (t <= -1.4e+35) {
tmp = t * -a;
} else if (t <= -3.1e-178) {
tmp = b * y;
} else if (t <= 5.2e-145) {
tmp = x;
} else if (t <= 5.8e+173) {
tmp = z * -y;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.6d+128)) then
tmp = b * t
else if (t <= (-1.4d+35)) then
tmp = t * -a
else if (t <= (-3.1d-178)) then
tmp = b * y
else if (t <= 5.2d-145) then
tmp = x
else if (t <= 5.8d+173) then
tmp = z * -y
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.6e+128) {
tmp = b * t;
} else if (t <= -1.4e+35) {
tmp = t * -a;
} else if (t <= -3.1e-178) {
tmp = b * y;
} else if (t <= 5.2e-145) {
tmp = x;
} else if (t <= 5.8e+173) {
tmp = z * -y;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.6e+128: tmp = b * t elif t <= -1.4e+35: tmp = t * -a elif t <= -3.1e-178: tmp = b * y elif t <= 5.2e-145: tmp = x elif t <= 5.8e+173: tmp = z * -y else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.6e+128) tmp = Float64(b * t); elseif (t <= -1.4e+35) tmp = Float64(t * Float64(-a)); elseif (t <= -3.1e-178) tmp = Float64(b * y); elseif (t <= 5.2e-145) tmp = x; elseif (t <= 5.8e+173) tmp = Float64(z * Float64(-y)); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.6e+128) tmp = b * t; elseif (t <= -1.4e+35) tmp = t * -a; elseif (t <= -3.1e-178) tmp = b * y; elseif (t <= 5.2e-145) tmp = x; elseif (t <= 5.8e+173) tmp = z * -y; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.6e+128], N[(b * t), $MachinePrecision], If[LessEqual[t, -1.4e+35], N[(t * (-a)), $MachinePrecision], If[LessEqual[t, -3.1e-178], N[(b * y), $MachinePrecision], If[LessEqual[t, 5.2e-145], x, If[LessEqual[t, 5.8e+173], N[(z * (-y)), $MachinePrecision], N[(b * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+128}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{+35}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-178}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-145}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+173}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -2.6e128 or 5.80000000000000014e173 < t Initial program 89.2%
Taylor expanded in t around inf 81.0%
Taylor expanded in b around inf 57.7%
*-commutative57.7%
Simplified57.7%
if -2.6e128 < t < -1.39999999999999999e35Initial program 100.0%
Taylor expanded in t around inf 55.2%
mul-1-neg55.2%
distribute-rgt-neg-in55.2%
Simplified55.2%
Taylor expanded in t around inf 48.6%
Taylor expanded in a around inf 30.6%
associate-*r*30.6%
mul-1-neg30.6%
Simplified30.6%
if -1.39999999999999999e35 < t < -3.1e-178Initial program 97.3%
Taylor expanded in z around 0 74.8%
Taylor expanded in y around inf 33.1%
if -3.1e-178 < t < 5.1999999999999999e-145Initial program 96.2%
Taylor expanded in x around inf 37.8%
if 5.1999999999999999e-145 < t < 5.80000000000000014e173Initial program 100.0%
Taylor expanded in z around inf 40.1%
Taylor expanded in y around inf 29.0%
mul-1-neg29.0%
*-commutative29.0%
distribute-rgt-neg-in29.0%
Simplified29.0%
Final simplification38.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.8e+47)
(* y (- b z))
(if (<= y 8.5e-116)
(+ x (+ z (* b (+ t -2.0))))
(if (<= y 20000.0)
(+ x (* a (- 1.0 t)))
(- (* b (- (+ y t) 2.0)) (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.8e+47) {
tmp = y * (b - z);
} else if (y <= 8.5e-116) {
tmp = x + (z + (b * (t + -2.0)));
} else if (y <= 20000.0) {
tmp = x + (a * (1.0 - t));
} else {
tmp = (b * ((y + t) - 2.0)) - (y * 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 (y <= (-5.8d+47)) then
tmp = y * (b - z)
else if (y <= 8.5d-116) then
tmp = x + (z + (b * (t + (-2.0d0))))
else if (y <= 20000.0d0) then
tmp = x + (a * (1.0d0 - t))
else
tmp = (b * ((y + t) - 2.0d0)) - (y * 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 (y <= -5.8e+47) {
tmp = y * (b - z);
} else if (y <= 8.5e-116) {
tmp = x + (z + (b * (t + -2.0)));
} else if (y <= 20000.0) {
tmp = x + (a * (1.0 - t));
} else {
tmp = (b * ((y + t) - 2.0)) - (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.8e+47: tmp = y * (b - z) elif y <= 8.5e-116: tmp = x + (z + (b * (t + -2.0))) elif y <= 20000.0: tmp = x + (a * (1.0 - t)) else: tmp = (b * ((y + t) - 2.0)) - (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.8e+47) tmp = Float64(y * Float64(b - z)); elseif (y <= 8.5e-116) tmp = Float64(x + Float64(z + Float64(b * Float64(t + -2.0)))); elseif (y <= 20000.0) tmp = Float64(x + Float64(a * Float64(1.0 - t))); else tmp = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) - Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.8e+47) tmp = y * (b - z); elseif (y <= 8.5e-116) tmp = x + (z + (b * (t + -2.0))); elseif (y <= 20000.0) tmp = x + (a * (1.0 - t)); else tmp = (b * ((y + t) - 2.0)) - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.8e+47], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-116], N[(x + N[(z + N[(b * N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 20000.0], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-116}:\\
\;\;\;\;x + \left(z + b \cdot \left(t + -2\right)\right)\\
\mathbf{elif}\;y \leq 20000:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - y \cdot z\\
\end{array}
\end{array}
if y < -5.79999999999999961e47Initial program 88.4%
Taylor expanded in y around inf 76.0%
if -5.79999999999999961e47 < y < 8.4999999999999995e-116Initial program 97.5%
Taylor expanded in a around 0 74.1%
Taylor expanded in y around 0 72.8%
associate--l+72.8%
sub-neg72.8%
metadata-eval72.8%
neg-mul-172.8%
Simplified72.8%
if 8.4999999999999995e-116 < y < 2e4Initial program 100.0%
Taylor expanded in z around 0 94.3%
Taylor expanded in b around 0 81.8%
if 2e4 < y Initial program 98.5%
Taylor expanded in y around inf 74.7%
mul-1-neg74.7%
distribute-rgt-neg-in74.7%
Simplified74.7%
Final simplification74.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t)))
(t_2 (- x (* b (- 2.0 (+ y t)))))
(t_3 (* z (- 1.0 y))))
(if (<= b -1.05e-40)
(+ t_2 t_1)
(if (<= b 5.6e-53) (+ x (+ t_3 t_1)) (+ 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 * (2.0 - (y + t)));
double t_3 = z * (1.0 - y);
double tmp;
if (b <= -1.05e-40) {
tmp = t_2 + t_1;
} else if (b <= 5.6e-53) {
tmp = x + (t_3 + t_1);
} 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 * (2.0d0 - (y + t)))
t_3 = z * (1.0d0 - y)
if (b <= (-1.05d-40)) then
tmp = t_2 + t_1
else if (b <= 5.6d-53) then
tmp = x + (t_3 + t_1)
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 * (2.0 - (y + t)));
double t_3 = z * (1.0 - y);
double tmp;
if (b <= -1.05e-40) {
tmp = t_2 + t_1;
} else if (b <= 5.6e-53) {
tmp = x + (t_3 + t_1);
} 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 * (2.0 - (y + t))) t_3 = z * (1.0 - y) tmp = 0 if b <= -1.05e-40: tmp = t_2 + t_1 elif b <= 5.6e-53: tmp = x + (t_3 + t_1) 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(2.0 - Float64(y + t)))) t_3 = Float64(z * Float64(1.0 - y)) tmp = 0.0 if (b <= -1.05e-40) tmp = Float64(t_2 + t_1); elseif (b <= 5.6e-53) tmp = Float64(x + Float64(t_3 + t_1)); 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 * (2.0 - (y + t))); t_3 = z * (1.0 - y); tmp = 0.0; if (b <= -1.05e-40) tmp = t_2 + t_1; elseif (b <= 5.6e-53) tmp = x + (t_3 + t_1); 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[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.05e-40], N[(t$95$2 + t$95$1), $MachinePrecision], If[LessEqual[b, 5.6e-53], N[(x + N[(t$95$3 + t$95$1), $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(2 - \left(y + t\right)\right)\\
t_3 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -1.05 \cdot 10^{-40}:\\
\;\;\;\;t\_2 + t\_1\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{-53}:\\
\;\;\;\;x + \left(t\_3 + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 + t\_3\\
\end{array}
\end{array}
if b < -1.05000000000000009e-40Initial program 94.4%
Taylor expanded in z around 0 85.2%
if -1.05000000000000009e-40 < b < 5.59999999999999971e-53Initial program 100.0%
Taylor expanded in b around 0 94.7%
if 5.59999999999999971e-53 < b Initial program 93.0%
Taylor expanded in a around 0 86.4%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -8.5e+43)
t_1
(if (<= y 8.1e-116)
(+ x (+ z (* b (+ t -2.0))))
(if (<= y 65000.0) (+ x (* a (- 1.0 t))) 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 <= -8.5e+43) {
tmp = t_1;
} else if (y <= 8.1e-116) {
tmp = x + (z + (b * (t + -2.0)));
} else if (y <= 65000.0) {
tmp = x + (a * (1.0 - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * (b - z)
if (y <= (-8.5d+43)) then
tmp = t_1
else if (y <= 8.1d-116) then
tmp = x + (z + (b * (t + (-2.0d0))))
else if (y <= 65000.0d0) then
tmp = x + (a * (1.0d0 - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -8.5e+43) {
tmp = t_1;
} else if (y <= 8.1e-116) {
tmp = x + (z + (b * (t + -2.0)));
} else if (y <= 65000.0) {
tmp = x + (a * (1.0 - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -8.5e+43: tmp = t_1 elif y <= 8.1e-116: tmp = x + (z + (b * (t + -2.0))) elif y <= 65000.0: tmp = x + (a * (1.0 - t)) 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 <= -8.5e+43) tmp = t_1; elseif (y <= 8.1e-116) tmp = Float64(x + Float64(z + Float64(b * Float64(t + -2.0)))); elseif (y <= 65000.0) tmp = Float64(x + Float64(a * Float64(1.0 - t))); 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 <= -8.5e+43) tmp = t_1; elseif (y <= 8.1e-116) tmp = x + (z + (b * (t + -2.0))); elseif (y <= 65000.0) tmp = x + (a * (1.0 - t)); 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, -8.5e+43], t$95$1, If[LessEqual[y, 8.1e-116], N[(x + N[(z + N[(b * N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 65000.0], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.1 \cdot 10^{-116}:\\
\;\;\;\;x + \left(z + b \cdot \left(t + -2\right)\right)\\
\mathbf{elif}\;y \leq 65000:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.5e43 or 65000 < y Initial program 94.0%
Taylor expanded in y around inf 67.9%
if -8.5e43 < y < 8.1e-116Initial program 97.5%
Taylor expanded in a around 0 74.1%
Taylor expanded in y around 0 72.8%
associate--l+72.8%
sub-neg72.8%
metadata-eval72.8%
neg-mul-172.8%
Simplified72.8%
if 8.1e-116 < y < 65000Initial program 100.0%
Taylor expanded in z around 0 94.3%
Taylor expanded in b around 0 81.8%
Final simplification71.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5.3e+79) (* b t) (if (<= t 4.6e-145) x (if (<= t 6e+173) (* z (- y)) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.3e+79) {
tmp = b * t;
} else if (t <= 4.6e-145) {
tmp = x;
} else if (t <= 6e+173) {
tmp = z * -y;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-5.3d+79)) then
tmp = b * t
else if (t <= 4.6d-145) then
tmp = x
else if (t <= 6d+173) then
tmp = z * -y
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.3e+79) {
tmp = b * t;
} else if (t <= 4.6e-145) {
tmp = x;
} else if (t <= 6e+173) {
tmp = z * -y;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5.3e+79: tmp = b * t elif t <= 4.6e-145: tmp = x elif t <= 6e+173: tmp = z * -y else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5.3e+79) tmp = Float64(b * t); elseif (t <= 4.6e-145) tmp = x; elseif (t <= 6e+173) tmp = Float64(z * Float64(-y)); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5.3e+79) tmp = b * t; elseif (t <= 4.6e-145) tmp = x; elseif (t <= 6e+173) tmp = z * -y; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.3e+79], N[(b * t), $MachinePrecision], If[LessEqual[t, 4.6e-145], x, If[LessEqual[t, 6e+173], N[(z * (-y)), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.3 \cdot 10^{+79}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-145}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+173}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -5.29999999999999978e79 or 5.9999999999999995e173 < t Initial program 91.1%
Taylor expanded in t around inf 75.8%
Taylor expanded in b around inf 51.7%
*-commutative51.7%
Simplified51.7%
if -5.29999999999999978e79 < t < 4.60000000000000014e-145Initial program 97.3%
Taylor expanded in x around inf 28.5%
if 4.60000000000000014e-145 < t < 5.9999999999999995e173Initial program 100.0%
Taylor expanded in z around inf 40.1%
Taylor expanded in y around inf 29.0%
mul-1-neg29.0%
*-commutative29.0%
distribute-rgt-neg-in29.0%
Simplified29.0%
Final simplification35.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.6e+44) (not (<= y 9600000000000.0))) (* y (- b z)) (* t (- b a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.6e+44) || !(y <= 9600000000000.0)) {
tmp = y * (b - z);
} else {
tmp = t * (b - 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 ((y <= (-5.6d+44)) .or. (.not. (y <= 9600000000000.0d0))) then
tmp = y * (b - z)
else
tmp = t * (b - 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 ((y <= -5.6e+44) || !(y <= 9600000000000.0)) {
tmp = y * (b - z);
} else {
tmp = t * (b - a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.6e+44) or not (y <= 9600000000000.0): tmp = y * (b - z) else: tmp = t * (b - a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.6e+44) || !(y <= 9600000000000.0)) tmp = Float64(y * Float64(b - z)); else tmp = Float64(t * Float64(b - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.6e+44) || ~((y <= 9600000000000.0))) tmp = y * (b - z); else tmp = t * (b - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.6e+44], N[Not[LessEqual[y, 9600000000000.0]], $MachinePrecision]], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+44} \lor \neg \left(y \leq 9600000000000\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if y < -5.6000000000000002e44 or 9.6e12 < y Initial program 93.8%
Taylor expanded in y around inf 70.0%
if -5.6000000000000002e44 < y < 9.6e12Initial program 97.9%
Taylor expanded in t around inf 44.3%
Final simplification55.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.3e+80) (not (<= t 3.5e+40))) (* b t) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.3e+80) || !(t <= 3.5e+40)) {
tmp = b * t;
} 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 ((t <= (-3.3d+80)) .or. (.not. (t <= 3.5d+40))) then
tmp = b * t
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 ((t <= -3.3e+80) || !(t <= 3.5e+40)) {
tmp = b * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.3e+80) or not (t <= 3.5e+40): tmp = b * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.3e+80) || !(t <= 3.5e+40)) tmp = Float64(b * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3.3e+80) || ~((t <= 3.5e+40))) tmp = b * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3.3e+80], N[Not[LessEqual[t, 3.5e+40]], $MachinePrecision]], N[(b * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{+80} \lor \neg \left(t \leq 3.5 \cdot 10^{+40}\right):\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -3.29999999999999991e80 or 3.4999999999999999e40 < t Initial program 93.2%
Taylor expanded in t around inf 72.0%
Taylor expanded in b around inf 44.0%
*-commutative44.0%
Simplified44.0%
if -3.29999999999999991e80 < t < 3.4999999999999999e40Initial program 98.0%
Taylor expanded in x around inf 25.0%
Final simplification32.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3e+40) (not (<= b 0.00045))) (* b y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3e+40) || !(b <= 0.00045)) {
tmp = b * y;
} 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 ((b <= (-3d+40)) .or. (.not. (b <= 0.00045d0))) then
tmp = b * y
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 ((b <= -3e+40) || !(b <= 0.00045)) {
tmp = b * y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3e+40) or not (b <= 0.00045): tmp = b * y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3e+40) || !(b <= 0.00045)) tmp = Float64(b * y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3e+40) || ~((b <= 0.00045))) tmp = b * y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3e+40], N[Not[LessEqual[b, 0.00045]], $MachinePrecision]], N[(b * y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3 \cdot 10^{+40} \lor \neg \left(b \leq 0.00045\right):\\
\;\;\;\;b \cdot y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if b < -3.0000000000000002e40 or 4.4999999999999999e-4 < b Initial program 92.0%
Taylor expanded in z around 0 81.1%
Taylor expanded in y around inf 29.4%
if -3.0000000000000002e40 < b < 4.4999999999999999e-4Initial program 100.0%
Taylor expanded in x around inf 24.7%
Final simplification27.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1e+70) x (if (<= x 2.3e-47) z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1e+70) {
tmp = x;
} else if (x <= 2.3e-47) {
tmp = z;
} 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 <= (-1d+70)) then
tmp = x
else if (x <= 2.3d-47) then
tmp = z
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 <= -1e+70) {
tmp = x;
} else if (x <= 2.3e-47) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1e+70: tmp = x elif x <= 2.3e-47: tmp = z else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1e+70) tmp = x; elseif (x <= 2.3e-47) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1e+70) tmp = x; elseif (x <= 2.3e-47) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1e+70], x, If[LessEqual[x, 2.3e-47], z, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+70}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-47}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.00000000000000007e70 or 2.29999999999999982e-47 < x Initial program 98.4%
Taylor expanded in x around inf 30.7%
if -1.00000000000000007e70 < x < 2.29999999999999982e-47Initial program 93.7%
Taylor expanded in z around inf 33.0%
Taylor expanded in y around 0 15.7%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.1%
Taylor expanded in x around inf 16.6%
herbie shell --seed 2024091
(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)))