
(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 23 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))) (* 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 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) Initial program 0.0%
Taylor expanded in t around inf 79.0%
Final simplification99.2%
(FPCore (x y z t a b) :precision binary64 (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b) return fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Initial program 96.5%
+-commutative96.5%
fma-def97.7%
associate--l+97.7%
sub-neg97.7%
metadata-eval97.7%
sub-neg97.7%
associate-+l-97.7%
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 (+ x (* z (- 1.0 y))))
(t_2 (+ x (* b (+ y (+ t -2.0)))))
(t_3 (+ x (* a (- 1.0 t)))))
(if (<= b -1.3e+26)
t_2
(if (<= b -7.7e-87)
t_1
(if (<= b -2.4e-181)
t_3
(if (<= b -1.1e-260)
t_1
(if (<= b 1.08e-215) t_3 (if (<= b 1.12e-8) 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));
double t_2 = x + (b * (y + (t + -2.0)));
double t_3 = x + (a * (1.0 - t));
double tmp;
if (b <= -1.3e+26) {
tmp = t_2;
} else if (b <= -7.7e-87) {
tmp = t_1;
} else if (b <= -2.4e-181) {
tmp = t_3;
} else if (b <= -1.1e-260) {
tmp = t_1;
} else if (b <= 1.08e-215) {
tmp = t_3;
} else if (b <= 1.12e-8) {
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) :: t_3
real(8) :: tmp
t_1 = x + (z * (1.0d0 - y))
t_2 = x + (b * (y + (t + (-2.0d0))))
t_3 = x + (a * (1.0d0 - t))
if (b <= (-1.3d+26)) then
tmp = t_2
else if (b <= (-7.7d-87)) then
tmp = t_1
else if (b <= (-2.4d-181)) then
tmp = t_3
else if (b <= (-1.1d-260)) then
tmp = t_1
else if (b <= 1.08d-215) then
tmp = t_3
else if (b <= 1.12d-8) 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));
double t_2 = x + (b * (y + (t + -2.0)));
double t_3 = x + (a * (1.0 - t));
double tmp;
if (b <= -1.3e+26) {
tmp = t_2;
} else if (b <= -7.7e-87) {
tmp = t_1;
} else if (b <= -2.4e-181) {
tmp = t_3;
} else if (b <= -1.1e-260) {
tmp = t_1;
} else if (b <= 1.08e-215) {
tmp = t_3;
} else if (b <= 1.12e-8) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (1.0 - y)) t_2 = x + (b * (y + (t + -2.0))) t_3 = x + (a * (1.0 - t)) tmp = 0 if b <= -1.3e+26: tmp = t_2 elif b <= -7.7e-87: tmp = t_1 elif b <= -2.4e-181: tmp = t_3 elif b <= -1.1e-260: tmp = t_1 elif b <= 1.08e-215: tmp = t_3 elif b <= 1.12e-8: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(1.0 - y))) t_2 = Float64(x + Float64(b * Float64(y + Float64(t + -2.0)))) t_3 = Float64(x + Float64(a * Float64(1.0 - t))) tmp = 0.0 if (b <= -1.3e+26) tmp = t_2; elseif (b <= -7.7e-87) tmp = t_1; elseif (b <= -2.4e-181) tmp = t_3; elseif (b <= -1.1e-260) tmp = t_1; elseif (b <= 1.08e-215) tmp = t_3; elseif (b <= 1.12e-8) 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)); t_2 = x + (b * (y + (t + -2.0))); t_3 = x + (a * (1.0 - t)); tmp = 0.0; if (b <= -1.3e+26) tmp = t_2; elseif (b <= -7.7e-87) tmp = t_1; elseif (b <= -2.4e-181) tmp = t_3; elseif (b <= -1.1e-260) tmp = t_1; elseif (b <= 1.08e-215) tmp = t_3; elseif (b <= 1.12e-8) 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[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+26], t$95$2, If[LessEqual[b, -7.7e-87], t$95$1, If[LessEqual[b, -2.4e-181], t$95$3, If[LessEqual[b, -1.1e-260], t$95$1, If[LessEqual[b, 1.08e-215], t$95$3, If[LessEqual[b, 1.12e-8], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(1 - y\right)\\
t_2 := x + b \cdot \left(y + \left(t + -2\right)\right)\\
t_3 := x + a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -1.3 \cdot 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -7.7 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -2.4 \cdot 10^{-181}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -1.1 \cdot 10^{-260}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.08 \cdot 10^{-215}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -1.30000000000000001e26 or 1.11999999999999994e-8 < b Initial program 94.3%
Taylor expanded in y around 0 95.1%
Taylor expanded in a around 0 87.3%
Taylor expanded in z around 0 76.2%
sub-neg76.2%
metadata-eval76.2%
distribute-lft-out79.4%
cancel-sign-sub79.4%
mul-1-neg79.4%
*-commutative79.4%
associate-*r*79.4%
distribute-lft-out79.4%
metadata-eval79.4%
sub-neg79.4%
unsub-neg79.4%
distribute-rgt-neg-in79.4%
sub-neg79.4%
metadata-eval79.4%
distribute-lft-out79.4%
mul-1-neg79.4%
remove-double-neg79.4%
+-commutative79.4%
Simplified79.4%
if -1.30000000000000001e26 < b < -7.6999999999999998e-87 or -2.4000000000000001e-181 < b < -1.10000000000000008e-260 or 1.08e-215 < b < 1.11999999999999994e-8Initial program 100.0%
Taylor expanded in b around 0 86.5%
Taylor expanded in a around 0 66.1%
if -7.6999999999999998e-87 < b < -2.4000000000000001e-181 or -1.10000000000000008e-260 < b < 1.08e-215Initial program 96.5%
Taylor expanded in b around 0 94.8%
Taylor expanded in a around inf 74.2%
Final simplification74.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -2.3e+57)
(+ t_1 (* a (- 1.0 t)))
(if (or (<= b -5.8e-68) (not (<= b 1.7e-84)))
(+ t_1 (* z (- 1.0 y)))
(- x (+ (* a (+ t -1.0)) (* z (+ y -1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -2.3e+57) {
tmp = t_1 + (a * (1.0 - t));
} else if ((b <= -5.8e-68) || !(b <= 1.7e-84)) {
tmp = t_1 + (z * (1.0 - y));
} else {
tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (b * ((y + t) - 2.0d0))
if (b <= (-2.3d+57)) then
tmp = t_1 + (a * (1.0d0 - t))
else if ((b <= (-5.8d-68)) .or. (.not. (b <= 1.7d-84))) then
tmp = t_1 + (z * (1.0d0 - y))
else
tmp = x - ((a * (t + (-1.0d0))) + (z * (y + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -2.3e+57) {
tmp = t_1 + (a * (1.0 - t));
} else if ((b <= -5.8e-68) || !(b <= 1.7e-84)) {
tmp = t_1 + (z * (1.0 - y));
} else {
tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -2.3e+57: tmp = t_1 + (a * (1.0 - t)) elif (b <= -5.8e-68) or not (b <= 1.7e-84): tmp = t_1 + (z * (1.0 - y)) else: tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -2.3e+57) tmp = Float64(t_1 + Float64(a * Float64(1.0 - t))); elseif ((b <= -5.8e-68) || !(b <= 1.7e-84)) tmp = Float64(t_1 + Float64(z * Float64(1.0 - y))); else tmp = Float64(x - Float64(Float64(a * Float64(t + -1.0)) + Float64(z * Float64(y + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -2.3e+57) tmp = t_1 + (a * (1.0 - t)); elseif ((b <= -5.8e-68) || ~((b <= 1.7e-84))) tmp = t_1 + (z * (1.0 - y)); else tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.3e+57], N[(t$95$1 + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, -5.8e-68], N[Not[LessEqual[b, 1.7e-84]], $MachinePrecision]], N[(t$95$1 + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -2.3 \cdot 10^{+57}:\\
\;\;\;\;t_1 + a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq -5.8 \cdot 10^{-68} \lor \neg \left(b \leq 1.7 \cdot 10^{-84}\right):\\
\;\;\;\;t_1 + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(a \cdot \left(t + -1\right) + z \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if b < -2.2999999999999999e57Initial program 91.1%
Taylor expanded in z around 0 91.3%
if -2.2999999999999999e57 < b < -5.8000000000000001e-68 or 1.7000000000000001e-84 < b Initial program 98.0%
Taylor expanded in a around 0 89.7%
if -5.8000000000000001e-68 < b < 1.7000000000000001e-84Initial program 98.0%
Taylor expanded in b around 0 95.9%
Final simplification92.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.4e+156)
(+ (+ x (* b (- (+ y t) 2.0))) (* a (- 1.0 t)))
(if (or (<= b -1.85e-69) (not (<= b 1.2e-87)))
(+ z (+ x (+ (* b (- t 2.0)) (* y (- b z)))))
(- x (+ (* a (+ t -1.0)) (* z (+ y -1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.4e+156) {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
} else if ((b <= -1.85e-69) || !(b <= 1.2e-87)) {
tmp = z + (x + ((b * (t - 2.0)) + (y * (b - z))));
} else {
tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.4d+156)) then
tmp = (x + (b * ((y + t) - 2.0d0))) + (a * (1.0d0 - t))
else if ((b <= (-1.85d-69)) .or. (.not. (b <= 1.2d-87))) then
tmp = z + (x + ((b * (t - 2.0d0)) + (y * (b - z))))
else
tmp = x - ((a * (t + (-1.0d0))) + (z * (y + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.4e+156) {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
} else if ((b <= -1.85e-69) || !(b <= 1.2e-87)) {
tmp = z + (x + ((b * (t - 2.0)) + (y * (b - z))));
} else {
tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.4e+156: tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)) elif (b <= -1.85e-69) or not (b <= 1.2e-87): tmp = z + (x + ((b * (t - 2.0)) + (y * (b - z)))) else: tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.4e+156) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + Float64(a * Float64(1.0 - t))); elseif ((b <= -1.85e-69) || !(b <= 1.2e-87)) tmp = Float64(z + Float64(x + Float64(Float64(b * Float64(t - 2.0)) + Float64(y * Float64(b - z))))); else tmp = Float64(x - Float64(Float64(a * Float64(t + -1.0)) + Float64(z * Float64(y + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.4e+156) tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)); elseif ((b <= -1.85e-69) || ~((b <= 1.2e-87))) tmp = z + (x + ((b * (t - 2.0)) + (y * (b - z)))); else tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.4e+156], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, -1.85e-69], N[Not[LessEqual[b, 1.2e-87]], $MachinePrecision]], N[(z + N[(x + N[(N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision] + N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{+156}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq -1.85 \cdot 10^{-69} \lor \neg \left(b \leq 1.2 \cdot 10^{-87}\right):\\
\;\;\;\;z + \left(x + \left(b \cdot \left(t - 2\right) + y \cdot \left(b - z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(a \cdot \left(t + -1\right) + z \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if b < -1.39999999999999994e156Initial program 92.6%
Taylor expanded in z around 0 100.0%
if -1.39999999999999994e156 < b < -1.8500000000000001e-69 or 1.2e-87 < b Initial program 96.1%
Taylor expanded in y around 0 96.9%
Taylor expanded in a around 0 89.0%
if -1.8500000000000001e-69 < b < 1.2e-87Initial program 98.0%
Taylor expanded in b around 0 95.9%
Final simplification92.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (<= y -4.2e+122)
(* y b)
(if (<= y -7.5e+66)
t_1
(if (<= y -1.65e+40)
(* y b)
(if (<= y 3e-141)
(+ x z)
(if (<= y 7.8e-86)
t_1
(if (<= y 8.5e-21)
(+ x z)
(if (<= y 5.1e+107)
t_1
(if (<= y 6e+223) (* y (- z)) (* y b)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if (y <= -4.2e+122) {
tmp = y * b;
} else if (y <= -7.5e+66) {
tmp = t_1;
} else if (y <= -1.65e+40) {
tmp = y * b;
} else if (y <= 3e-141) {
tmp = x + z;
} else if (y <= 7.8e-86) {
tmp = t_1;
} else if (y <= 8.5e-21) {
tmp = x + z;
} else if (y <= 5.1e+107) {
tmp = t_1;
} else if (y <= 6e+223) {
tmp = y * -z;
} 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) :: t_1
real(8) :: tmp
t_1 = a * (1.0d0 - t)
if (y <= (-4.2d+122)) then
tmp = y * b
else if (y <= (-7.5d+66)) then
tmp = t_1
else if (y <= (-1.65d+40)) then
tmp = y * b
else if (y <= 3d-141) then
tmp = x + z
else if (y <= 7.8d-86) then
tmp = t_1
else if (y <= 8.5d-21) then
tmp = x + z
else if (y <= 5.1d+107) then
tmp = t_1
else if (y <= 6d+223) then
tmp = y * -z
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 t_1 = a * (1.0 - t);
double tmp;
if (y <= -4.2e+122) {
tmp = y * b;
} else if (y <= -7.5e+66) {
tmp = t_1;
} else if (y <= -1.65e+40) {
tmp = y * b;
} else if (y <= 3e-141) {
tmp = x + z;
} else if (y <= 7.8e-86) {
tmp = t_1;
} else if (y <= 8.5e-21) {
tmp = x + z;
} else if (y <= 5.1e+107) {
tmp = t_1;
} else if (y <= 6e+223) {
tmp = y * -z;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if y <= -4.2e+122: tmp = y * b elif y <= -7.5e+66: tmp = t_1 elif y <= -1.65e+40: tmp = y * b elif y <= 3e-141: tmp = x + z elif y <= 7.8e-86: tmp = t_1 elif y <= 8.5e-21: tmp = x + z elif y <= 5.1e+107: tmp = t_1 elif y <= 6e+223: tmp = y * -z else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (y <= -4.2e+122) tmp = Float64(y * b); elseif (y <= -7.5e+66) tmp = t_1; elseif (y <= -1.65e+40) tmp = Float64(y * b); elseif (y <= 3e-141) tmp = Float64(x + z); elseif (y <= 7.8e-86) tmp = t_1; elseif (y <= 8.5e-21) tmp = Float64(x + z); elseif (y <= 5.1e+107) tmp = t_1; elseif (y <= 6e+223) tmp = Float64(y * Float64(-z)); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if (y <= -4.2e+122) tmp = y * b; elseif (y <= -7.5e+66) tmp = t_1; elseif (y <= -1.65e+40) tmp = y * b; elseif (y <= 3e-141) tmp = x + z; elseif (y <= 7.8e-86) tmp = t_1; elseif (y <= 8.5e-21) tmp = x + z; elseif (y <= 5.1e+107) tmp = t_1; elseif (y <= 6e+223) tmp = y * -z; else tmp = y * b; 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[LessEqual[y, -4.2e+122], N[(y * b), $MachinePrecision], If[LessEqual[y, -7.5e+66], t$95$1, If[LessEqual[y, -1.65e+40], N[(y * b), $MachinePrecision], If[LessEqual[y, 3e-141], N[(x + z), $MachinePrecision], If[LessEqual[y, 7.8e-86], t$95$1, If[LessEqual[y, 8.5e-21], N[(x + z), $MachinePrecision], If[LessEqual[y, 5.1e+107], t$95$1, If[LessEqual[y, 6e+223], N[(y * (-z)), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+122}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{+40}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-141}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-21}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+223}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -4.20000000000000032e122 or -7.50000000000000024e66 < y < -1.6499999999999999e40 or 6.00000000000000002e223 < y Initial program 91.5%
Taylor expanded in y around inf 81.5%
Taylor expanded in b around inf 58.3%
*-commutative58.3%
Simplified58.3%
if -4.20000000000000032e122 < y < -7.50000000000000024e66 or 2.99999999999999983e-141 < y < 7.8000000000000003e-86 or 8.4999999999999993e-21 < y < 5.1000000000000002e107Initial program 95.7%
Taylor expanded in a around inf 56.6%
if -1.6499999999999999e40 < y < 2.99999999999999983e-141 or 7.8000000000000003e-86 < y < 8.4999999999999993e-21Initial program 100.0%
Taylor expanded in b around 0 67.0%
Taylor expanded in a around 0 49.1%
Taylor expanded in y around 0 48.4%
sub-neg48.4%
mul-1-neg48.4%
remove-double-neg48.4%
+-commutative48.4%
Simplified48.4%
if 5.1000000000000002e107 < y < 6.00000000000000002e223Initial program 91.3%
Taylor expanded in b around 0 77.6%
Taylor expanded in a around 0 53.1%
Taylor expanded in y around inf 52.9%
associate-*r*52.9%
mul-1-neg52.9%
Simplified52.9%
Final simplification52.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- y 2.0)))) (t_2 (* t (- b a))) (t_3 (* z (- 1.0 y))))
(if (<= t -1.35e+62)
t_2
(if (<= t -1.1e-204)
t_1
(if (<= t -4.5e-261)
t_3
(if (<= t 3e-185)
t_1
(if (<= t 3e-152) t_3 (if (<= t 5.2e+41) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * (y - 2.0));
double t_2 = t * (b - a);
double t_3 = z * (1.0 - y);
double tmp;
if (t <= -1.35e+62) {
tmp = t_2;
} else if (t <= -1.1e-204) {
tmp = t_1;
} else if (t <= -4.5e-261) {
tmp = t_3;
} else if (t <= 3e-185) {
tmp = t_1;
} else if (t <= 3e-152) {
tmp = t_3;
} else if (t <= 5.2e+41) {
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) :: t_3
real(8) :: tmp
t_1 = x + (b * (y - 2.0d0))
t_2 = t * (b - a)
t_3 = z * (1.0d0 - y)
if (t <= (-1.35d+62)) then
tmp = t_2
else if (t <= (-1.1d-204)) then
tmp = t_1
else if (t <= (-4.5d-261)) then
tmp = t_3
else if (t <= 3d-185) then
tmp = t_1
else if (t <= 3d-152) then
tmp = t_3
else if (t <= 5.2d+41) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * (y - 2.0));
double t_2 = t * (b - a);
double t_3 = z * (1.0 - y);
double tmp;
if (t <= -1.35e+62) {
tmp = t_2;
} else if (t <= -1.1e-204) {
tmp = t_1;
} else if (t <= -4.5e-261) {
tmp = t_3;
} else if (t <= 3e-185) {
tmp = t_1;
} else if (t <= 3e-152) {
tmp = t_3;
} else if (t <= 5.2e+41) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * (y - 2.0)) t_2 = t * (b - a) t_3 = z * (1.0 - y) tmp = 0 if t <= -1.35e+62: tmp = t_2 elif t <= -1.1e-204: tmp = t_1 elif t <= -4.5e-261: tmp = t_3 elif t <= 3e-185: tmp = t_1 elif t <= 3e-152: tmp = t_3 elif t <= 5.2e+41: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * Float64(y - 2.0))) t_2 = Float64(t * Float64(b - a)) t_3 = Float64(z * Float64(1.0 - y)) tmp = 0.0 if (t <= -1.35e+62) tmp = t_2; elseif (t <= -1.1e-204) tmp = t_1; elseif (t <= -4.5e-261) tmp = t_3; elseif (t <= 3e-185) tmp = t_1; elseif (t <= 3e-152) tmp = t_3; elseif (t <= 5.2e+41) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * (y - 2.0)); t_2 = t * (b - a); t_3 = z * (1.0 - y); tmp = 0.0; if (t <= -1.35e+62) tmp = t_2; elseif (t <= -1.1e-204) tmp = t_1; elseif (t <= -4.5e-261) tmp = t_3; elseif (t <= 3e-185) tmp = t_1; elseif (t <= 3e-152) tmp = t_3; elseif (t <= 5.2e+41) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.35e+62], t$95$2, If[LessEqual[t, -1.1e-204], t$95$1, If[LessEqual[t, -4.5e-261], t$95$3, If[LessEqual[t, 3e-185], t$95$1, If[LessEqual[t, 3e-152], t$95$3, If[LessEqual[t, 5.2e+41], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(y - 2\right)\\
t_2 := t \cdot \left(b - a\right)\\
t_3 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-204}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-261}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-185}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-152}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+41}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.35e62 or 5.2000000000000001e41 < t Initial program 93.5%
Taylor expanded in t around inf 76.3%
if -1.35e62 < t < -1.0999999999999999e-204 or -4.5000000000000001e-261 < t < 3.0000000000000003e-185 or 3e-152 < t < 5.2000000000000001e41Initial program 98.3%
Taylor expanded in y around 0 100.0%
Taylor expanded in a around 0 85.6%
Taylor expanded in z around 0 61.1%
sub-neg61.1%
metadata-eval61.1%
distribute-lft-out61.1%
cancel-sign-sub61.1%
mul-1-neg61.1%
*-commutative61.1%
associate-*r*61.1%
distribute-lft-out61.1%
metadata-eval61.1%
sub-neg61.1%
unsub-neg61.1%
distribute-rgt-neg-in61.1%
sub-neg61.1%
metadata-eval61.1%
distribute-lft-out61.1%
mul-1-neg61.1%
remove-double-neg61.1%
+-commutative61.1%
Simplified61.1%
Taylor expanded in t around 0 58.7%
if -1.0999999999999999e-204 < t < -4.5000000000000001e-261 or 3.0000000000000003e-185 < t < 3e-152Initial program 100.0%
Taylor expanded in z around inf 67.5%
Final simplification67.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (- 1.0 y))))
(t_2 (* b (- (+ y t) 2.0)))
(t_3 (+ x (* a (- 1.0 t)))))
(if (<= b -2.35e+27)
t_2
(if (<= b -4.8e-89)
t_1
(if (<= b -1e-182)
t_3
(if (<= b -1.16e-259)
t_1
(if (<= b 4.7e-223) t_3 (if (<= b 4.2e+98) 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));
double t_2 = b * ((y + t) - 2.0);
double t_3 = x + (a * (1.0 - t));
double tmp;
if (b <= -2.35e+27) {
tmp = t_2;
} else if (b <= -4.8e-89) {
tmp = t_1;
} else if (b <= -1e-182) {
tmp = t_3;
} else if (b <= -1.16e-259) {
tmp = t_1;
} else if (b <= 4.7e-223) {
tmp = t_3;
} else if (b <= 4.2e+98) {
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) :: t_3
real(8) :: tmp
t_1 = x + (z * (1.0d0 - y))
t_2 = b * ((y + t) - 2.0d0)
t_3 = x + (a * (1.0d0 - t))
if (b <= (-2.35d+27)) then
tmp = t_2
else if (b <= (-4.8d-89)) then
tmp = t_1
else if (b <= (-1d-182)) then
tmp = t_3
else if (b <= (-1.16d-259)) then
tmp = t_1
else if (b <= 4.7d-223) then
tmp = t_3
else if (b <= 4.2d+98) 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));
double t_2 = b * ((y + t) - 2.0);
double t_3 = x + (a * (1.0 - t));
double tmp;
if (b <= -2.35e+27) {
tmp = t_2;
} else if (b <= -4.8e-89) {
tmp = t_1;
} else if (b <= -1e-182) {
tmp = t_3;
} else if (b <= -1.16e-259) {
tmp = t_1;
} else if (b <= 4.7e-223) {
tmp = t_3;
} else if (b <= 4.2e+98) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (1.0 - y)) t_2 = b * ((y + t) - 2.0) t_3 = x + (a * (1.0 - t)) tmp = 0 if b <= -2.35e+27: tmp = t_2 elif b <= -4.8e-89: tmp = t_1 elif b <= -1e-182: tmp = t_3 elif b <= -1.16e-259: tmp = t_1 elif b <= 4.7e-223: tmp = t_3 elif b <= 4.2e+98: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(1.0 - y))) t_2 = Float64(b * Float64(Float64(y + t) - 2.0)) t_3 = Float64(x + Float64(a * Float64(1.0 - t))) tmp = 0.0 if (b <= -2.35e+27) tmp = t_2; elseif (b <= -4.8e-89) tmp = t_1; elseif (b <= -1e-182) tmp = t_3; elseif (b <= -1.16e-259) tmp = t_1; elseif (b <= 4.7e-223) tmp = t_3; elseif (b <= 4.2e+98) 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)); t_2 = b * ((y + t) - 2.0); t_3 = x + (a * (1.0 - t)); tmp = 0.0; if (b <= -2.35e+27) tmp = t_2; elseif (b <= -4.8e-89) tmp = t_1; elseif (b <= -1e-182) tmp = t_3; elseif (b <= -1.16e-259) tmp = t_1; elseif (b <= 4.7e-223) tmp = t_3; elseif (b <= 4.2e+98) 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[(z * N[(1.0 - y), $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[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.35e+27], t$95$2, If[LessEqual[b, -4.8e-89], t$95$1, If[LessEqual[b, -1e-182], t$95$3, If[LessEqual[b, -1.16e-259], t$95$1, If[LessEqual[b, 4.7e-223], t$95$3, If[LessEqual[b, 4.2e+98], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(1 - y\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_3 := x + a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -2.35 \cdot 10^{+27}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -4.8 \cdot 10^{-89}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1 \cdot 10^{-182}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -1.16 \cdot 10^{-259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 4.7 \cdot 10^{-223}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+98}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -2.34999999999999988e27 or 4.20000000000000008e98 < b Initial program 93.5%
Taylor expanded in b around inf 77.6%
if -2.34999999999999988e27 < b < -4.80000000000000032e-89 or -1e-182 < b < -1.16e-259 or 4.70000000000000021e-223 < b < 4.20000000000000008e98Initial program 99.9%
Taylor expanded in b around 0 82.7%
Taylor expanded in a around 0 62.8%
if -4.80000000000000032e-89 < b < -1e-182 or -1.16e-259 < b < 4.70000000000000021e-223Initial program 96.5%
Taylor expanded in b around 0 94.8%
Taylor expanded in a around inf 74.2%
Final simplification71.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5e+26) (not (<= b 1.8e-5))) (+ (+ x (* b (- (+ y t) 2.0))) (* a (- 1.0 t))) (- x (+ (* a (+ t -1.0)) (* z (+ y -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5e+26) || !(b <= 1.8e-5)) {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
} else {
tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-5d+26)) .or. (.not. (b <= 1.8d-5))) then
tmp = (x + (b * ((y + t) - 2.0d0))) + (a * (1.0d0 - t))
else
tmp = x - ((a * (t + (-1.0d0))) + (z * (y + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5e+26) || !(b <= 1.8e-5)) {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
} else {
tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5e+26) or not (b <= 1.8e-5): tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)) else: tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5e+26) || !(b <= 1.8e-5)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + Float64(a * Float64(1.0 - t))); else tmp = Float64(x - Float64(Float64(a * Float64(t + -1.0)) + Float64(z * Float64(y + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5e+26) || ~((b <= 1.8e-5))) tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)); else tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5e+26], N[Not[LessEqual[b, 1.8e-5]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+26} \lor \neg \left(b \leq 1.8 \cdot 10^{-5}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(a \cdot \left(t + -1\right) + z \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if b < -5.0000000000000001e26 or 1.80000000000000005e-5 < b Initial program 94.3%
Taylor expanded in z around 0 87.2%
if -5.0000000000000001e26 < b < 1.80000000000000005e-5Initial program 98.5%
Taylor expanded in b around 0 90.1%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (* b (- y 2.0))))
(if (<= b -5.2e+33)
t_2
(if (<= b -3.3e-43)
(+ x z)
(if (<= b -4.5e-167)
t_1
(if (<= b -6.6e-239)
(+ x z)
(if (<= b 7.4e-132) t_1 (if (<= b 2.4e+100) (+ x z) 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 * (y - 2.0);
double tmp;
if (b <= -5.2e+33) {
tmp = t_2;
} else if (b <= -3.3e-43) {
tmp = x + z;
} else if (b <= -4.5e-167) {
tmp = t_1;
} else if (b <= -6.6e-239) {
tmp = x + z;
} else if (b <= 7.4e-132) {
tmp = t_1;
} else if (b <= 2.4e+100) {
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 = a * (1.0d0 - t)
t_2 = b * (y - 2.0d0)
if (b <= (-5.2d+33)) then
tmp = t_2
else if (b <= (-3.3d-43)) then
tmp = x + z
else if (b <= (-4.5d-167)) then
tmp = t_1
else if (b <= (-6.6d-239)) then
tmp = x + z
else if (b <= 7.4d-132) then
tmp = t_1
else if (b <= 2.4d+100) 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 = a * (1.0 - t);
double t_2 = b * (y - 2.0);
double tmp;
if (b <= -5.2e+33) {
tmp = t_2;
} else if (b <= -3.3e-43) {
tmp = x + z;
} else if (b <= -4.5e-167) {
tmp = t_1;
} else if (b <= -6.6e-239) {
tmp = x + z;
} else if (b <= 7.4e-132) {
tmp = t_1;
} else if (b <= 2.4e+100) {
tmp = x + z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = b * (y - 2.0) tmp = 0 if b <= -5.2e+33: tmp = t_2 elif b <= -3.3e-43: tmp = x + z elif b <= -4.5e-167: tmp = t_1 elif b <= -6.6e-239: tmp = x + z elif b <= 7.4e-132: tmp = t_1 elif b <= 2.4e+100: tmp = x + z 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(y - 2.0)) tmp = 0.0 if (b <= -5.2e+33) tmp = t_2; elseif (b <= -3.3e-43) tmp = Float64(x + z); elseif (b <= -4.5e-167) tmp = t_1; elseif (b <= -6.6e-239) tmp = Float64(x + z); elseif (b <= 7.4e-132) tmp = t_1; elseif (b <= 2.4e+100) tmp = Float64(x + z); 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 * (y - 2.0); tmp = 0.0; if (b <= -5.2e+33) tmp = t_2; elseif (b <= -3.3e-43) tmp = x + z; elseif (b <= -4.5e-167) tmp = t_1; elseif (b <= -6.6e-239) tmp = x + z; elseif (b <= 7.4e-132) tmp = t_1; elseif (b <= 2.4e+100) tmp = x + z; 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[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.2e+33], t$95$2, If[LessEqual[b, -3.3e-43], N[(x + z), $MachinePrecision], If[LessEqual[b, -4.5e-167], t$95$1, If[LessEqual[b, -6.6e-239], N[(x + z), $MachinePrecision], If[LessEqual[b, 7.4e-132], t$95$1, If[LessEqual[b, 2.4e+100], N[(x + z), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(y - 2\right)\\
\mathbf{if}\;b \leq -5.2 \cdot 10^{+33}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -3.3 \cdot 10^{-43}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;b \leq -4.5 \cdot 10^{-167}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -6.6 \cdot 10^{-239}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;b \leq 7.4 \cdot 10^{-132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{+100}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -5.1999999999999995e33 or 2.40000000000000012e100 < b Initial program 93.3%
Taylor expanded in b around inf 78.6%
Taylor expanded in t around 0 53.6%
if -5.1999999999999995e33 < b < -3.30000000000000016e-43 or -4.5000000000000001e-167 < b < -6.5999999999999999e-239 or 7.4000000000000004e-132 < b < 2.40000000000000012e100Initial program 99.9%
Taylor expanded in b around 0 81.5%
Taylor expanded in a around 0 62.7%
Taylor expanded in y around 0 47.9%
sub-neg47.9%
mul-1-neg47.9%
remove-double-neg47.9%
+-commutative47.9%
Simplified47.9%
if -3.30000000000000016e-43 < b < -4.5000000000000001e-167 or -6.5999999999999999e-239 < b < 7.4000000000000004e-132Initial program 97.2%
Taylor expanded in a around inf 50.0%
Final simplification50.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (+ y (+ t -2.0))))))
(if (<= b -1.05e+28)
t_1
(if (<= b -1e-59)
(+ z (+ x (* t b)))
(if (<= b -9.5e-68)
(* y (- b z))
(if (<= b 9.8e+19) (- x (- (* a (+ t -1.0)) z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * (y + (t + -2.0)));
double tmp;
if (b <= -1.05e+28) {
tmp = t_1;
} else if (b <= -1e-59) {
tmp = z + (x + (t * b));
} else if (b <= -9.5e-68) {
tmp = y * (b - z);
} else if (b <= 9.8e+19) {
tmp = x - ((a * (t + -1.0)) - 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 = x + (b * (y + (t + (-2.0d0))))
if (b <= (-1.05d+28)) then
tmp = t_1
else if (b <= (-1d-59)) then
tmp = z + (x + (t * b))
else if (b <= (-9.5d-68)) then
tmp = y * (b - z)
else if (b <= 9.8d+19) then
tmp = x - ((a * (t + (-1.0d0))) - 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 = x + (b * (y + (t + -2.0)));
double tmp;
if (b <= -1.05e+28) {
tmp = t_1;
} else if (b <= -1e-59) {
tmp = z + (x + (t * b));
} else if (b <= -9.5e-68) {
tmp = y * (b - z);
} else if (b <= 9.8e+19) {
tmp = x - ((a * (t + -1.0)) - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * (y + (t + -2.0))) tmp = 0 if b <= -1.05e+28: tmp = t_1 elif b <= -1e-59: tmp = z + (x + (t * b)) elif b <= -9.5e-68: tmp = y * (b - z) elif b <= 9.8e+19: tmp = x - ((a * (t + -1.0)) - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * Float64(y + Float64(t + -2.0)))) tmp = 0.0 if (b <= -1.05e+28) tmp = t_1; elseif (b <= -1e-59) tmp = Float64(z + Float64(x + Float64(t * b))); elseif (b <= -9.5e-68) tmp = Float64(y * Float64(b - z)); elseif (b <= 9.8e+19) tmp = Float64(x - Float64(Float64(a * Float64(t + -1.0)) - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * (y + (t + -2.0))); tmp = 0.0; if (b <= -1.05e+28) tmp = t_1; elseif (b <= -1e-59) tmp = z + (x + (t * b)); elseif (b <= -9.5e-68) tmp = y * (b - z); elseif (b <= 9.8e+19) tmp = x - ((a * (t + -1.0)) - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.05e+28], t$95$1, If[LessEqual[b, -1e-59], N[(z + N[(x + N[(t * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -9.5e-68], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.8e+19], N[(x - N[(N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{if}\;b \leq -1.05 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1 \cdot 10^{-59}:\\
\;\;\;\;z + \left(x + t \cdot b\right)\\
\mathbf{elif}\;b \leq -9.5 \cdot 10^{-68}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;b \leq 9.8 \cdot 10^{+19}:\\
\;\;\;\;x - \left(a \cdot \left(t + -1\right) - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -1.04999999999999995e28 or 9.8e19 < b Initial program 94.0%
Taylor expanded in y around 0 94.8%
Taylor expanded in a around 0 88.1%
Taylor expanded in z around 0 76.9%
sub-neg76.9%
metadata-eval76.9%
distribute-lft-out80.4%
cancel-sign-sub80.4%
mul-1-neg80.4%
*-commutative80.4%
associate-*r*80.4%
distribute-lft-out80.4%
metadata-eval80.4%
sub-neg80.4%
unsub-neg80.4%
distribute-rgt-neg-in80.4%
sub-neg80.4%
metadata-eval80.4%
distribute-lft-out80.4%
mul-1-neg80.4%
remove-double-neg80.4%
+-commutative80.4%
Simplified80.4%
if -1.04999999999999995e28 < b < -1e-59Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in a around 0 87.0%
Taylor expanded in t around inf 75.6%
if -1e-59 < b < -9.4999999999999997e-68Initial program 100.0%
Taylor expanded in y around inf 100.0%
if -9.4999999999999997e-68 < b < 9.8e19Initial program 98.3%
Taylor expanded in b around 0 92.0%
Taylor expanded in y around 0 77.1%
+-commutative77.1%
sub-neg77.1%
metadata-eval77.1%
mul-1-neg77.1%
unsub-neg77.1%
+-commutative77.1%
Simplified77.1%
Final simplification78.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.2e+27) (not (<= b 6.8e+51))) (+ x (* b (+ y (+ t -2.0)))) (- x (+ (* a (+ t -1.0)) (* z (+ y -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.2e+27) || !(b <= 6.8e+51)) {
tmp = x + (b * (y + (t + -2.0)));
} else {
tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-4.2d+27)) .or. (.not. (b <= 6.8d+51))) then
tmp = x + (b * (y + (t + (-2.0d0))))
else
tmp = x - ((a * (t + (-1.0d0))) + (z * (y + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.2e+27) || !(b <= 6.8e+51)) {
tmp = x + (b * (y + (t + -2.0)));
} else {
tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.2e+27) or not (b <= 6.8e+51): tmp = x + (b * (y + (t + -2.0))) else: tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.2e+27) || !(b <= 6.8e+51)) tmp = Float64(x + Float64(b * Float64(y + Float64(t + -2.0)))); else tmp = Float64(x - Float64(Float64(a * Float64(t + -1.0)) + Float64(z * Float64(y + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4.2e+27) || ~((b <= 6.8e+51))) tmp = x + (b * (y + (t + -2.0))); else tmp = x - ((a * (t + -1.0)) + (z * (y + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.2e+27], N[Not[LessEqual[b, 6.8e+51]], $MachinePrecision]], N[(x + N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.2 \cdot 10^{+27} \lor \neg \left(b \leq 6.8 \cdot 10^{+51}\right):\\
\;\;\;\;x + b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(a \cdot \left(t + -1\right) + z \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if b < -4.19999999999999989e27 or 6.79999999999999969e51 < b Initial program 93.7%
Taylor expanded in y around 0 94.6%
Taylor expanded in a around 0 88.5%
Taylor expanded in z around 0 79.3%
sub-neg79.3%
metadata-eval79.3%
distribute-lft-out82.9%
cancel-sign-sub82.9%
mul-1-neg82.9%
*-commutative82.9%
associate-*r*82.9%
distribute-lft-out82.9%
metadata-eval82.9%
sub-neg82.9%
unsub-neg82.9%
distribute-rgt-neg-in82.9%
sub-neg82.9%
metadata-eval82.9%
distribute-lft-out82.9%
mul-1-neg82.9%
remove-double-neg82.9%
+-commutative82.9%
Simplified82.9%
if -4.19999999999999989e27 < b < 6.79999999999999969e51Initial program 98.6%
Taylor expanded in b around 0 87.8%
Final simplification85.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- y 2.0))) (t_2 (* t (- b a))))
(if (<= t -4.2e+29)
t_2
(if (<= t 9.5e-257)
t_1
(if (<= t 3.9e-151)
(+ x z)
(if (<= t 4.5e-13) t_1 (if (<= t 2.4e+38) (+ x z) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y - 2.0);
double t_2 = t * (b - a);
double tmp;
if (t <= -4.2e+29) {
tmp = t_2;
} else if (t <= 9.5e-257) {
tmp = t_1;
} else if (t <= 3.9e-151) {
tmp = x + z;
} else if (t <= 4.5e-13) {
tmp = t_1;
} else if (t <= 2.4e+38) {
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 = b * (y - 2.0d0)
t_2 = t * (b - a)
if (t <= (-4.2d+29)) then
tmp = t_2
else if (t <= 9.5d-257) then
tmp = t_1
else if (t <= 3.9d-151) then
tmp = x + z
else if (t <= 4.5d-13) then
tmp = t_1
else if (t <= 2.4d+38) 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 = b * (y - 2.0);
double t_2 = t * (b - a);
double tmp;
if (t <= -4.2e+29) {
tmp = t_2;
} else if (t <= 9.5e-257) {
tmp = t_1;
} else if (t <= 3.9e-151) {
tmp = x + z;
} else if (t <= 4.5e-13) {
tmp = t_1;
} else if (t <= 2.4e+38) {
tmp = x + z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (y - 2.0) t_2 = t * (b - a) tmp = 0 if t <= -4.2e+29: tmp = t_2 elif t <= 9.5e-257: tmp = t_1 elif t <= 3.9e-151: tmp = x + z elif t <= 4.5e-13: tmp = t_1 elif t <= 2.4e+38: tmp = x + z else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y - 2.0)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -4.2e+29) tmp = t_2; elseif (t <= 9.5e-257) tmp = t_1; elseif (t <= 3.9e-151) tmp = Float64(x + z); elseif (t <= 4.5e-13) tmp = t_1; elseif (t <= 2.4e+38) tmp = Float64(x + z); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (y - 2.0); t_2 = t * (b - a); tmp = 0.0; if (t <= -4.2e+29) tmp = t_2; elseif (t <= 9.5e-257) tmp = t_1; elseif (t <= 3.9e-151) tmp = x + z; elseif (t <= 4.5e-13) tmp = t_1; elseif (t <= 2.4e+38) tmp = x + z; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+29], t$95$2, If[LessEqual[t, 9.5e-257], t$95$1, If[LessEqual[t, 3.9e-151], N[(x + z), $MachinePrecision], If[LessEqual[t, 4.5e-13], t$95$1, If[LessEqual[t, 2.4e+38], N[(x + z), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y - 2\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-257}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-151}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-13}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+38}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -4.2000000000000003e29 or 2.40000000000000017e38 < t Initial program 93.3%
Taylor expanded in t around inf 72.8%
if -4.2000000000000003e29 < t < 9.49999999999999941e-257 or 3.90000000000000007e-151 < t < 4.5e-13Initial program 100.0%
Taylor expanded in b around inf 42.6%
Taylor expanded in t around 0 41.7%
if 9.49999999999999941e-257 < t < 3.90000000000000007e-151 or 4.5e-13 < t < 2.40000000000000017e38Initial program 96.6%
Taylor expanded in b around 0 85.3%
Taylor expanded in a around 0 75.2%
Taylor expanded in y around 0 61.5%
sub-neg61.5%
mul-1-neg61.5%
remove-double-neg61.5%
+-commutative61.5%
Simplified61.5%
Final simplification58.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -1.9e+32)
t_1
(if (<= t 1e-256)
(* y (- b z))
(if (<= t 5.2e-152)
(+ x z)
(if (<= t 2.4e+27) (* b (- (+ y t) 2.0)) 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 <= -1.9e+32) {
tmp = t_1;
} else if (t <= 1e-256) {
tmp = y * (b - z);
} else if (t <= 5.2e-152) {
tmp = x + z;
} else if (t <= 2.4e+27) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b - a)
if (t <= (-1.9d+32)) then
tmp = t_1
else if (t <= 1d-256) then
tmp = y * (b - z)
else if (t <= 5.2d-152) then
tmp = x + z
else if (t <= 2.4d+27) then
tmp = b * ((y + t) - 2.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -1.9e+32) {
tmp = t_1;
} else if (t <= 1e-256) {
tmp = y * (b - z);
} else if (t <= 5.2e-152) {
tmp = x + z;
} else if (t <= 2.4e+27) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -1.9e+32: tmp = t_1 elif t <= 1e-256: tmp = y * (b - z) elif t <= 5.2e-152: tmp = x + z elif t <= 2.4e+27: tmp = b * ((y + t) - 2.0) 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 <= -1.9e+32) tmp = t_1; elseif (t <= 1e-256) tmp = Float64(y * Float64(b - z)); elseif (t <= 5.2e-152) tmp = Float64(x + z); elseif (t <= 2.4e+27) tmp = Float64(b * Float64(Float64(y + t) - 2.0)); 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 <= -1.9e+32) tmp = t_1; elseif (t <= 1e-256) tmp = y * (b - z); elseif (t <= 5.2e-152) tmp = x + z; elseif (t <= 2.4e+27) tmp = b * ((y + t) - 2.0); 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, -1.9e+32], t$95$1, If[LessEqual[t, 1e-256], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-152], N[(x + z), $MachinePrecision], If[LessEqual[t, 2.4e+27], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 10^{-256}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-152}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+27}:\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.9000000000000002e32 or 2.39999999999999998e27 < t Initial program 93.4%
Taylor expanded in t around inf 71.2%
if -1.9000000000000002e32 < t < 9.99999999999999977e-257Initial program 100.0%
Taylor expanded in y around inf 43.7%
if 9.99999999999999977e-257 < t < 5.20000000000000026e-152Initial program 100.0%
Taylor expanded in b around 0 89.7%
Taylor expanded in a around 0 79.5%
Taylor expanded in y around 0 63.8%
sub-neg63.8%
mul-1-neg63.8%
remove-double-neg63.8%
+-commutative63.8%
Simplified63.8%
if 5.20000000000000026e-152 < t < 2.39999999999999998e27Initial program 97.0%
Taylor expanded in b around inf 45.2%
Final simplification58.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- a))))
(if (<= y -6e+125)
(* y b)
(if (<= y -1.55e+67)
t_1
(if (<= y -1.85e+40)
(* y b)
(if (<= y 1.15e-20) (+ x z) (if (<= y 4.8e+216) t_1 (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * -a;
double tmp;
if (y <= -6e+125) {
tmp = y * b;
} else if (y <= -1.55e+67) {
tmp = t_1;
} else if (y <= -1.85e+40) {
tmp = y * b;
} else if (y <= 1.15e-20) {
tmp = x + z;
} else if (y <= 4.8e+216) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * -a
if (y <= (-6d+125)) then
tmp = y * b
else if (y <= (-1.55d+67)) then
tmp = t_1
else if (y <= (-1.85d+40)) then
tmp = y * b
else if (y <= 1.15d-20) then
tmp = x + z
else if (y <= 4.8d+216) then
tmp = t_1
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 t_1 = t * -a;
double tmp;
if (y <= -6e+125) {
tmp = y * b;
} else if (y <= -1.55e+67) {
tmp = t_1;
} else if (y <= -1.85e+40) {
tmp = y * b;
} else if (y <= 1.15e-20) {
tmp = x + z;
} else if (y <= 4.8e+216) {
tmp = t_1;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * -a tmp = 0 if y <= -6e+125: tmp = y * b elif y <= -1.55e+67: tmp = t_1 elif y <= -1.85e+40: tmp = y * b elif y <= 1.15e-20: tmp = x + z elif y <= 4.8e+216: tmp = t_1 else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(-a)) tmp = 0.0 if (y <= -6e+125) tmp = Float64(y * b); elseif (y <= -1.55e+67) tmp = t_1; elseif (y <= -1.85e+40) tmp = Float64(y * b); elseif (y <= 1.15e-20) tmp = Float64(x + z); elseif (y <= 4.8e+216) tmp = t_1; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * -a; tmp = 0.0; if (y <= -6e+125) tmp = y * b; elseif (y <= -1.55e+67) tmp = t_1; elseif (y <= -1.85e+40) tmp = y * b; elseif (y <= 1.15e-20) tmp = x + z; elseif (y <= 4.8e+216) tmp = t_1; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[y, -6e+125], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.55e+67], t$95$1, If[LessEqual[y, -1.85e+40], N[(y * b), $MachinePrecision], If[LessEqual[y, 1.15e-20], N[(x + z), $MachinePrecision], If[LessEqual[y, 4.8e+216], t$95$1, N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-a\right)\\
\mathbf{if}\;y \leq -6 \cdot 10^{+125}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+40}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-20}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+216}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -6.0000000000000003e125 or -1.54999999999999998e67 < y < -1.85e40 or 4.7999999999999999e216 < y Initial program 91.8%
Taylor expanded in y around inf 82.1%
Taylor expanded in b around inf 56.4%
*-commutative56.4%
Simplified56.4%
if -6.0000000000000003e125 < y < -1.54999999999999998e67 or 1.15e-20 < y < 4.7999999999999999e216Initial program 93.3%
Taylor expanded in a around inf 46.1%
Taylor expanded in t around inf 36.4%
associate-*r*36.4%
mul-1-neg36.4%
Simplified36.4%
if -1.85e40 < y < 1.15e-20Initial program 100.0%
Taylor expanded in b around 0 68.2%
Taylor expanded in a around 0 47.1%
Taylor expanded in y around 0 46.5%
sub-neg46.5%
mul-1-neg46.5%
remove-double-neg46.5%
+-commutative46.5%
Simplified46.5%
Final simplification46.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -8.5e+117)
(* y b)
(if (<= y -4.1e+66)
(* t (- a))
(if (<= y -1.35e+40)
(* y b)
(if (<= y 3e+25) (+ x z) (if (<= y 3.4e+223) (* y (- z)) (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.5e+117) {
tmp = y * b;
} else if (y <= -4.1e+66) {
tmp = t * -a;
} else if (y <= -1.35e+40) {
tmp = y * b;
} else if (y <= 3e+25) {
tmp = x + z;
} else if (y <= 3.4e+223) {
tmp = y * -z;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-8.5d+117)) then
tmp = y * b
else if (y <= (-4.1d+66)) then
tmp = t * -a
else if (y <= (-1.35d+40)) then
tmp = y * b
else if (y <= 3d+25) then
tmp = x + z
else if (y <= 3.4d+223) then
tmp = y * -z
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.5e+117) {
tmp = y * b;
} else if (y <= -4.1e+66) {
tmp = t * -a;
} else if (y <= -1.35e+40) {
tmp = y * b;
} else if (y <= 3e+25) {
tmp = x + z;
} else if (y <= 3.4e+223) {
tmp = y * -z;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.5e+117: tmp = y * b elif y <= -4.1e+66: tmp = t * -a elif y <= -1.35e+40: tmp = y * b elif y <= 3e+25: tmp = x + z elif y <= 3.4e+223: tmp = y * -z else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.5e+117) tmp = Float64(y * b); elseif (y <= -4.1e+66) tmp = Float64(t * Float64(-a)); elseif (y <= -1.35e+40) tmp = Float64(y * b); elseif (y <= 3e+25) tmp = Float64(x + z); elseif (y <= 3.4e+223) tmp = Float64(y * Float64(-z)); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8.5e+117) tmp = y * b; elseif (y <= -4.1e+66) tmp = t * -a; elseif (y <= -1.35e+40) tmp = y * b; elseif (y <= 3e+25) tmp = x + z; elseif (y <= 3.4e+223) tmp = y * -z; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.5e+117], N[(y * b), $MachinePrecision], If[LessEqual[y, -4.1e+66], N[(t * (-a)), $MachinePrecision], If[LessEqual[y, -1.35e+40], N[(y * b), $MachinePrecision], If[LessEqual[y, 3e+25], N[(x + z), $MachinePrecision], If[LessEqual[y, 3.4e+223], N[(y * (-z)), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+117}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{+40}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+25}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+223}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -8.49999999999999966e117 or -4.09999999999999994e66 < y < -1.35000000000000005e40 or 3.3999999999999998e223 < y Initial program 91.5%
Taylor expanded in y around inf 81.5%
Taylor expanded in b around inf 58.3%
*-commutative58.3%
Simplified58.3%
if -8.49999999999999966e117 < y < -4.09999999999999994e66Initial program 100.0%
Taylor expanded in a around inf 59.3%
Taylor expanded in t around inf 59.3%
associate-*r*59.3%
mul-1-neg59.3%
Simplified59.3%
if -1.35000000000000005e40 < y < 3.00000000000000006e25Initial program 99.3%
Taylor expanded in b around 0 67.6%
Taylor expanded in a around 0 44.8%
Taylor expanded in y around 0 43.9%
sub-neg43.9%
mul-1-neg43.9%
remove-double-neg43.9%
+-commutative43.9%
Simplified43.9%
if 3.00000000000000006e25 < y < 3.3999999999999998e223Initial program 92.1%
Taylor expanded in b around 0 78.7%
Taylor expanded in a around 0 43.6%
Taylor expanded in y around inf 40.9%
associate-*r*40.9%
mul-1-neg40.9%
Simplified40.9%
Final simplification47.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
(if (<= t -1.32e+32)
t_2
(if (<= t 1.4e-256)
t_1
(if (<= t 8.4e-151) (+ x z) (if (<= t 7e+27) t_1 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 <= -1.32e+32) {
tmp = t_2;
} else if (t <= 1.4e-256) {
tmp = t_1;
} else if (t <= 8.4e-151) {
tmp = x + z;
} else if (t <= 7e+27) {
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 = y * (b - z)
t_2 = t * (b - a)
if (t <= (-1.32d+32)) then
tmp = t_2
else if (t <= 1.4d-256) then
tmp = t_1
else if (t <= 8.4d-151) then
tmp = x + z
else if (t <= 7d+27) 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 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (t <= -1.32e+32) {
tmp = t_2;
} else if (t <= 1.4e-256) {
tmp = t_1;
} else if (t <= 8.4e-151) {
tmp = x + z;
} else if (t <= 7e+27) {
tmp = t_1;
} 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 <= -1.32e+32: tmp = t_2 elif t <= 1.4e-256: tmp = t_1 elif t <= 8.4e-151: tmp = x + z elif t <= 7e+27: tmp = t_1 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 <= -1.32e+32) tmp = t_2; elseif (t <= 1.4e-256) tmp = t_1; elseif (t <= 8.4e-151) tmp = Float64(x + z); elseif (t <= 7e+27) tmp = t_1; 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 <= -1.32e+32) tmp = t_2; elseif (t <= 1.4e-256) tmp = t_1; elseif (t <= 8.4e-151) tmp = x + z; elseif (t <= 7e+27) tmp = t_1; 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, -1.32e+32], t$95$2, If[LessEqual[t, 1.4e-256], t$95$1, If[LessEqual[t, 8.4e-151], N[(x + z), $MachinePrecision], If[LessEqual[t, 7e+27], t$95$1, 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 -1.32 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-256}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8.4 \cdot 10^{-151}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+27}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.31999999999999997e32 or 7.0000000000000004e27 < t Initial program 93.4%
Taylor expanded in t around inf 71.2%
if -1.31999999999999997e32 < t < 1.40000000000000012e-256 or 8.39999999999999962e-151 < t < 7.0000000000000004e27Initial program 99.1%
Taylor expanded in y around inf 44.1%
if 1.40000000000000012e-256 < t < 8.39999999999999962e-151Initial program 100.0%
Taylor expanded in b around 0 85.9%
Taylor expanded in a around 0 76.2%
Taylor expanded in y around 0 61.3%
sub-neg61.3%
mul-1-neg61.3%
remove-double-neg61.3%
+-commutative61.3%
Simplified61.3%
Final simplification58.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.6e+27) (not (<= b 9e+19))) (+ x (* b (+ y (+ t -2.0)))) (- x (- (* a (+ t -1.0)) z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.6e+27) || !(b <= 9e+19)) {
tmp = x + (b * (y + (t + -2.0)));
} else {
tmp = x - ((a * (t + -1.0)) - 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 ((b <= (-7.6d+27)) .or. (.not. (b <= 9d+19))) then
tmp = x + (b * (y + (t + (-2.0d0))))
else
tmp = x - ((a * (t + (-1.0d0))) - 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 ((b <= -7.6e+27) || !(b <= 9e+19)) {
tmp = x + (b * (y + (t + -2.0)));
} else {
tmp = x - ((a * (t + -1.0)) - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.6e+27) or not (b <= 9e+19): tmp = x + (b * (y + (t + -2.0))) else: tmp = x - ((a * (t + -1.0)) - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.6e+27) || !(b <= 9e+19)) tmp = Float64(x + Float64(b * Float64(y + Float64(t + -2.0)))); else tmp = Float64(x - Float64(Float64(a * Float64(t + -1.0)) - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7.6e+27) || ~((b <= 9e+19))) tmp = x + (b * (y + (t + -2.0))); else tmp = x - ((a * (t + -1.0)) - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.6e+27], N[Not[LessEqual[b, 9e+19]], $MachinePrecision]], N[(x + N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.6 \cdot 10^{+27} \lor \neg \left(b \leq 9 \cdot 10^{+19}\right):\\
\;\;\;\;x + b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(a \cdot \left(t + -1\right) - z\right)\\
\end{array}
\end{array}
if b < -7.60000000000000043e27 or 9e19 < b Initial program 94.0%
Taylor expanded in y around 0 94.9%
Taylor expanded in a around 0 88.2%
Taylor expanded in z around 0 77.1%
sub-neg77.1%
metadata-eval77.1%
distribute-lft-out80.5%
cancel-sign-sub80.5%
mul-1-neg80.5%
*-commutative80.5%
associate-*r*80.5%
distribute-lft-out80.5%
metadata-eval80.5%
sub-neg80.5%
unsub-neg80.5%
distribute-rgt-neg-in80.5%
sub-neg80.5%
metadata-eval80.5%
distribute-lft-out80.5%
mul-1-neg80.5%
remove-double-neg80.5%
+-commutative80.5%
Simplified80.5%
if -7.60000000000000043e27 < b < 9e19Initial program 98.5%
Taylor expanded in b around 0 89.3%
Taylor expanded in y around 0 73.7%
+-commutative73.7%
sub-neg73.7%
metadata-eval73.7%
mul-1-neg73.7%
unsub-neg73.7%
+-commutative73.7%
Simplified73.7%
Final simplification76.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1e+40) (not (<= y 1.3e+17))) (* y b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1e+40) || !(y <= 1.3e+17)) {
tmp = y * b;
} 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 ((y <= (-1d+40)) .or. (.not. (y <= 1.3d+17))) then
tmp = y * b
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 ((y <= -1e+40) || !(y <= 1.3e+17)) {
tmp = y * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1e+40) or not (y <= 1.3e+17): tmp = y * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1e+40) || !(y <= 1.3e+17)) tmp = Float64(y * b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1e+40) || ~((y <= 1.3e+17))) tmp = y * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1e+40], N[Not[LessEqual[y, 1.3e+17]], $MachinePrecision]], N[(y * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+40} \lor \neg \left(y \leq 1.3 \cdot 10^{+17}\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.00000000000000003e40 or 1.3e17 < y Initial program 91.9%
Taylor expanded in y around inf 67.3%
Taylor expanded in b around inf 41.0%
*-commutative41.0%
Simplified41.0%
if -1.00000000000000003e40 < y < 1.3e17Initial program 100.0%
Taylor expanded in x around inf 20.5%
Final simplification29.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.2e+39) (not (<= y 1.9e+17))) (* y b) (+ x z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.2e+39) || !(y <= 1.9e+17)) {
tmp = y * b;
} 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 ((y <= (-6.2d+39)) .or. (.not. (y <= 1.9d+17))) then
tmp = y * b
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 ((y <= -6.2e+39) || !(y <= 1.9e+17)) {
tmp = y * b;
} else {
tmp = x + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.2e+39) or not (y <= 1.9e+17): tmp = y * b else: tmp = x + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.2e+39) || !(y <= 1.9e+17)) tmp = Float64(y * b); else tmp = Float64(x + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.2e+39) || ~((y <= 1.9e+17))) tmp = y * b; else tmp = x + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.2e+39], N[Not[LessEqual[y, 1.9e+17]], $MachinePrecision]], N[(y * b), $MachinePrecision], N[(x + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+39} \lor \neg \left(y \leq 1.9 \cdot 10^{+17}\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\end{array}
if y < -6.2000000000000005e39 or 1.9e17 < y Initial program 91.9%
Taylor expanded in y around inf 67.3%
Taylor expanded in b around inf 41.0%
*-commutative41.0%
Simplified41.0%
if -6.2000000000000005e39 < y < 1.9e17Initial program 100.0%
Taylor expanded in b around 0 68.5%
Taylor expanded in a around 0 45.4%
Taylor expanded in y around 0 44.4%
sub-neg44.4%
mul-1-neg44.4%
remove-double-neg44.4%
+-commutative44.4%
Simplified44.4%
Final simplification42.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.45e+24) x (if (<= x 5.6e+18) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.45e+24) {
tmp = x;
} else if (x <= 5.6e+18) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-1.45d+24)) then
tmp = x
else if (x <= 5.6d+18) then
tmp = a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.45e+24) {
tmp = x;
} else if (x <= 5.6e+18) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.45e+24: tmp = x elif x <= 5.6e+18: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.45e+24) tmp = x; elseif (x <= 5.6e+18) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.45e+24) tmp = x; elseif (x <= 5.6e+18) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.45e+24], x, If[LessEqual[x, 5.6e+18], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{+18}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.4499999999999999e24 or 5.6e18 < x Initial program 96.6%
Taylor expanded in x around inf 27.0%
if -1.4499999999999999e24 < x < 5.6e18Initial program 96.3%
Taylor expanded in a around inf 32.7%
Taylor expanded in t around 0 11.2%
Final simplification18.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.75e+59) (* -2.0 b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.75e+59) {
tmp = -2.0 * b;
} 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 <= (-1.75d+59)) then
tmp = (-2.0d0) * b
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 <= -1.75e+59) {
tmp = -2.0 * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.75e+59: tmp = -2.0 * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.75e+59) tmp = Float64(-2.0 * b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.75e+59) tmp = -2.0 * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.75e+59], N[(-2.0 * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{+59}:\\
\;\;\;\;-2 \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if b < -1.75e59Initial program 90.9%
Taylor expanded in b around inf 84.1%
Taylor expanded in t around 0 57.4%
Taylor expanded in y around 0 17.7%
*-commutative17.7%
Simplified17.7%
if -1.75e59 < b Initial program 98.0%
Taylor expanded in x around inf 16.9%
Final simplification17.1%
(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 26.5%
Taylor expanded in t around 0 8.2%
Final simplification8.2%
herbie shell --seed 2024010
(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)))