
(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 25 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 (* y (- b z)))))
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 = y * (b - z);
}
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 = y * (b - z);
}
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 = y * (b - z) 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(y * Float64(b - z)); 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 = y * (b - z); 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[(y * N[(b - z), $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}:\\
\;\;\;\;y \cdot \left(b - z\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 y around inf 71.6%
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 97.2%
+-commutative97.2%
fma-def98.8%
associate--l+98.8%
sub-neg98.8%
metadata-eval98.8%
sub-neg98.8%
associate-+l-98.8%
fma-neg98.8%
sub-neg98.8%
metadata-eval98.8%
remove-double-neg98.8%
sub-neg98.8%
metadata-eval98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))) (t_2 (* y (- b z))))
(if (<= y -7.2e+86)
t_2
(if (<= y -4.6e+17)
t_1
(if (<= y -7.6e-33)
(+ x a)
(if (<= y -4.4e-70)
t_1
(if (<= y -5.4e-210)
(+ x z)
(if (<= y 5e-270)
(- x (* t a))
(if (<= y 7.8e-224)
(+ x z)
(if (<= y 2.55e+70) (* a (- 1.0 t)) t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double t_2 = y * (b - z);
double tmp;
if (y <= -7.2e+86) {
tmp = t_2;
} else if (y <= -4.6e+17) {
tmp = t_1;
} else if (y <= -7.6e-33) {
tmp = x + a;
} else if (y <= -4.4e-70) {
tmp = t_1;
} else if (y <= -5.4e-210) {
tmp = x + z;
} else if (y <= 5e-270) {
tmp = x - (t * a);
} else if (y <= 7.8e-224) {
tmp = x + z;
} else if (y <= 2.55e+70) {
tmp = a * (1.0 - t);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (b - a)
t_2 = y * (b - z)
if (y <= (-7.2d+86)) then
tmp = t_2
else if (y <= (-4.6d+17)) then
tmp = t_1
else if (y <= (-7.6d-33)) then
tmp = x + a
else if (y <= (-4.4d-70)) then
tmp = t_1
else if (y <= (-5.4d-210)) then
tmp = x + z
else if (y <= 5d-270) then
tmp = x - (t * a)
else if (y <= 7.8d-224) then
tmp = x + z
else if (y <= 2.55d+70) then
tmp = a * (1.0d0 - t)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double t_2 = y * (b - z);
double tmp;
if (y <= -7.2e+86) {
tmp = t_2;
} else if (y <= -4.6e+17) {
tmp = t_1;
} else if (y <= -7.6e-33) {
tmp = x + a;
} else if (y <= -4.4e-70) {
tmp = t_1;
} else if (y <= -5.4e-210) {
tmp = x + z;
} else if (y <= 5e-270) {
tmp = x - (t * a);
} else if (y <= 7.8e-224) {
tmp = x + z;
} else if (y <= 2.55e+70) {
tmp = a * (1.0 - t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) t_2 = y * (b - z) tmp = 0 if y <= -7.2e+86: tmp = t_2 elif y <= -4.6e+17: tmp = t_1 elif y <= -7.6e-33: tmp = x + a elif y <= -4.4e-70: tmp = t_1 elif y <= -5.4e-210: tmp = x + z elif y <= 5e-270: tmp = x - (t * a) elif y <= 7.8e-224: tmp = x + z elif y <= 2.55e+70: tmp = a * (1.0 - t) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -7.2e+86) tmp = t_2; elseif (y <= -4.6e+17) tmp = t_1; elseif (y <= -7.6e-33) tmp = Float64(x + a); elseif (y <= -4.4e-70) tmp = t_1; elseif (y <= -5.4e-210) tmp = Float64(x + z); elseif (y <= 5e-270) tmp = Float64(x - Float64(t * a)); elseif (y <= 7.8e-224) tmp = Float64(x + z); elseif (y <= 2.55e+70) tmp = Float64(a * Float64(1.0 - t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); t_2 = y * (b - z); tmp = 0.0; if (y <= -7.2e+86) tmp = t_2; elseif (y <= -4.6e+17) tmp = t_1; elseif (y <= -7.6e-33) tmp = x + a; elseif (y <= -4.4e-70) tmp = t_1; elseif (y <= -5.4e-210) tmp = x + z; elseif (y <= 5e-270) tmp = x - (t * a); elseif (y <= 7.8e-224) tmp = x + z; elseif (y <= 2.55e+70) tmp = a * (1.0 - t); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.2e+86], t$95$2, If[LessEqual[y, -4.6e+17], t$95$1, If[LessEqual[y, -7.6e-33], N[(x + a), $MachinePrecision], If[LessEqual[y, -4.4e-70], t$95$1, If[LessEqual[y, -5.4e-210], N[(x + z), $MachinePrecision], If[LessEqual[y, 5e-270], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.8e-224], N[(x + z), $MachinePrecision], If[LessEqual[y, 2.55e+70], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{+86}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{-33}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-210}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-270}:\\
\;\;\;\;x - t \cdot a\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-224}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{+70}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -7.20000000000000011e86 or 2.55000000000000007e70 < y Initial program 94.6%
Taylor expanded in y around inf 73.5%
if -7.20000000000000011e86 < y < -4.6e17 or -7.59999999999999988e-33 < y < -4.3999999999999998e-70Initial program 96.9%
Taylor expanded in t around inf 67.4%
if -4.6e17 < y < -7.59999999999999988e-33Initial program 99.8%
Taylor expanded in z around 0 71.2%
Taylor expanded in b around 0 52.2%
Taylor expanded in t around 0 52.2%
cancel-sign-sub-inv52.2%
metadata-eval52.2%
*-lft-identity52.2%
+-commutative52.2%
Simplified52.2%
if -4.3999999999999998e-70 < y < -5.39999999999999983e-210 or 4.9999999999999998e-270 < y < 7.7999999999999996e-224Initial program 99.9%
Taylor expanded in y around 0 99.9%
associate--l+99.9%
fma-neg100.0%
sub-neg100.0%
metadata-eval100.0%
sub-neg100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-neg-in100.0%
mul-1-neg100.0%
remove-double-neg100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 55.3%
if -5.39999999999999983e-210 < y < 4.9999999999999998e-270Initial program 97.0%
Taylor expanded in z around 0 77.3%
Taylor expanded in b around 0 64.2%
Taylor expanded in t around inf 57.4%
*-commutative57.4%
Simplified57.4%
if 7.7999999999999996e-224 < y < 2.55000000000000007e70Initial program 100.0%
Taylor expanded in a around inf 52.6%
Final simplification63.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ z (* b (- t 2.0))))) (t_2 (+ x (* a (- 1.0 t)))))
(if (<= a -1.95e+54)
t_2
(if (<= a -3.1e-78)
t_1
(if (<= a -3.1e-161)
(+ x (* b (- (+ y t) 2.0)))
(if (<= a 1.6e-247)
t_1
(if (<= a 4e-184) (* y (- b z)) (if (<= a 8e+148) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z + (b * (t - 2.0)));
double t_2 = x + (a * (1.0 - t));
double tmp;
if (a <= -1.95e+54) {
tmp = t_2;
} else if (a <= -3.1e-78) {
tmp = t_1;
} else if (a <= -3.1e-161) {
tmp = x + (b * ((y + t) - 2.0));
} else if (a <= 1.6e-247) {
tmp = t_1;
} else if (a <= 4e-184) {
tmp = y * (b - z);
} else if (a <= 8e+148) {
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 + (b * (t - 2.0d0)))
t_2 = x + (a * (1.0d0 - t))
if (a <= (-1.95d+54)) then
tmp = t_2
else if (a <= (-3.1d-78)) then
tmp = t_1
else if (a <= (-3.1d-161)) then
tmp = x + (b * ((y + t) - 2.0d0))
else if (a <= 1.6d-247) then
tmp = t_1
else if (a <= 4d-184) then
tmp = y * (b - z)
else if (a <= 8d+148) 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 + (b * (t - 2.0)));
double t_2 = x + (a * (1.0 - t));
double tmp;
if (a <= -1.95e+54) {
tmp = t_2;
} else if (a <= -3.1e-78) {
tmp = t_1;
} else if (a <= -3.1e-161) {
tmp = x + (b * ((y + t) - 2.0));
} else if (a <= 1.6e-247) {
tmp = t_1;
} else if (a <= 4e-184) {
tmp = y * (b - z);
} else if (a <= 8e+148) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z + (b * (t - 2.0))) t_2 = x + (a * (1.0 - t)) tmp = 0 if a <= -1.95e+54: tmp = t_2 elif a <= -3.1e-78: tmp = t_1 elif a <= -3.1e-161: tmp = x + (b * ((y + t) - 2.0)) elif a <= 1.6e-247: tmp = t_1 elif a <= 4e-184: tmp = y * (b - z) elif a <= 8e+148: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z + Float64(b * Float64(t - 2.0)))) t_2 = Float64(x + Float64(a * Float64(1.0 - t))) tmp = 0.0 if (a <= -1.95e+54) tmp = t_2; elseif (a <= -3.1e-78) tmp = t_1; elseif (a <= -3.1e-161) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); elseif (a <= 1.6e-247) tmp = t_1; elseif (a <= 4e-184) tmp = Float64(y * Float64(b - z)); elseif (a <= 8e+148) 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 + (b * (t - 2.0))); t_2 = x + (a * (1.0 - t)); tmp = 0.0; if (a <= -1.95e+54) tmp = t_2; elseif (a <= -3.1e-78) tmp = t_1; elseif (a <= -3.1e-161) tmp = x + (b * ((y + t) - 2.0)); elseif (a <= 1.6e-247) tmp = t_1; elseif (a <= 4e-184) tmp = y * (b - z); elseif (a <= 8e+148) 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[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.95e+54], t$95$2, If[LessEqual[a, -3.1e-78], t$95$1, If[LessEqual[a, -3.1e-161], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e-247], t$95$1, If[LessEqual[a, 4e-184], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8e+148], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z + b \cdot \left(t - 2\right)\right)\\
t_2 := x + a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -1.95 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-161}:\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-247}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-184}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.9500000000000001e54 or 8.0000000000000004e148 < a Initial program 96.6%
Taylor expanded in z around 0 88.0%
Taylor expanded in b around 0 75.7%
if -1.9500000000000001e54 < a < -3.10000000000000018e-78 or -3.0999999999999999e-161 < a < 1.59999999999999997e-247 or 4.0000000000000002e-184 < a < 8.0000000000000004e148Initial program 97.6%
Taylor expanded in y around 0 76.2%
associate--l+76.2%
fma-neg76.2%
sub-neg76.2%
metadata-eval76.2%
sub-neg76.2%
metadata-eval76.2%
*-commutative76.2%
distribute-neg-in76.2%
mul-1-neg76.2%
remove-double-neg76.2%
*-commutative76.2%
distribute-rgt-neg-in76.2%
+-commutative76.2%
distribute-neg-in76.2%
metadata-eval76.2%
sub-neg76.2%
Simplified76.2%
Taylor expanded in a around 0 66.0%
if -3.10000000000000018e-78 < a < -3.0999999999999999e-161Initial program 95.6%
Taylor expanded in z around 0 84.9%
Taylor expanded in a around 0 80.7%
if 1.59999999999999997e-247 < a < 4.0000000000000002e-184Initial program 100.0%
Taylor expanded in y around inf 85.9%
Final simplification72.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- (+ y t) 2.0)))) (t_2 (* a (- 1.0 t))))
(if (<= y -2.1e+175)
(* y (- b z))
(if (<= y -1600000.0)
(+ t_1 t_2)
(if (<= y 2.9e+72)
(+ (+ (* (+ t -2.0) b) (+ x z)) t_2)
(+ t_1 (* z (- 1.0 y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((y + t) - 2.0));
double t_2 = a * (1.0 - t);
double tmp;
if (y <= -2.1e+175) {
tmp = y * (b - z);
} else if (y <= -1600000.0) {
tmp = t_1 + t_2;
} else if (y <= 2.9e+72) {
tmp = (((t + -2.0) * b) + (x + z)) + t_2;
} else {
tmp = t_1 + (z * (1.0 - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (b * ((y + t) - 2.0d0))
t_2 = a * (1.0d0 - t)
if (y <= (-2.1d+175)) then
tmp = y * (b - z)
else if (y <= (-1600000.0d0)) then
tmp = t_1 + t_2
else if (y <= 2.9d+72) then
tmp = (((t + (-2.0d0)) * b) + (x + z)) + t_2
else
tmp = t_1 + (z * (1.0d0 - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((y + t) - 2.0));
double t_2 = a * (1.0 - t);
double tmp;
if (y <= -2.1e+175) {
tmp = y * (b - z);
} else if (y <= -1600000.0) {
tmp = t_1 + t_2;
} else if (y <= 2.9e+72) {
tmp = (((t + -2.0) * b) + (x + z)) + t_2;
} else {
tmp = t_1 + (z * (1.0 - y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * ((y + t) - 2.0)) t_2 = a * (1.0 - t) tmp = 0 if y <= -2.1e+175: tmp = y * (b - z) elif y <= -1600000.0: tmp = t_1 + t_2 elif y <= 2.9e+72: tmp = (((t + -2.0) * b) + (x + z)) + t_2 else: tmp = t_1 + (z * (1.0 - y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) t_2 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (y <= -2.1e+175) tmp = Float64(y * Float64(b - z)); elseif (y <= -1600000.0) tmp = Float64(t_1 + t_2); elseif (y <= 2.9e+72) tmp = Float64(Float64(Float64(Float64(t + -2.0) * b) + Float64(x + z)) + t_2); else tmp = Float64(t_1 + Float64(z * Float64(1.0 - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * ((y + t) - 2.0)); t_2 = a * (1.0 - t); tmp = 0.0; if (y <= -2.1e+175) tmp = y * (b - z); elseif (y <= -1600000.0) tmp = t_1 + t_2; elseif (y <= 2.9e+72) tmp = (((t + -2.0) * b) + (x + z)) + t_2; else tmp = t_1 + (z * (1.0 - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+175], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1600000.0], N[(t$95$1 + t$95$2), $MachinePrecision], If[LessEqual[y, 2.9e+72], N[(N[(N[(N[(t + -2.0), $MachinePrecision] * b), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], N[(t$95$1 + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
t_2 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+175}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;y \leq -1600000:\\
\;\;\;\;t_1 + t_2\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+72}:\\
\;\;\;\;\left(\left(t + -2\right) \cdot b + \left(x + z\right)\right) + t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 + z \cdot \left(1 - y\right)\\
\end{array}
\end{array}
if y < -2.0999999999999999e175Initial program 81.3%
Taylor expanded in y around inf 97.2%
if -2.0999999999999999e175 < y < -1.6e6Initial program 97.6%
Taylor expanded in z around 0 88.8%
if -1.6e6 < y < 2.90000000000000017e72Initial program 99.2%
Taylor expanded in y around 0 99.2%
+-commutative99.2%
mul-1-neg99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in y around 0 97.2%
associate-+r+97.2%
+-commutative97.2%
sub-neg97.2%
metadata-eval97.2%
sub-neg97.2%
metadata-eval97.2%
Simplified97.2%
if 2.90000000000000017e72 < y Initial program 96.5%
Taylor expanded in a around 0 80.6%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (or (<= b -2.8e-48) (not (<= b 9.2e+22)))
(+ (+ x (* b (- (+ y t) 2.0))) t_1)
(+ x (+ t_1 (* z (- 1.0 y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if ((b <= -2.8e-48) || !(b <= 9.2e+22)) {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
} else {
tmp = x + (t_1 + (z * (1.0 - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (1.0d0 - t)
if ((b <= (-2.8d-48)) .or. (.not. (b <= 9.2d+22))) then
tmp = (x + (b * ((y + t) - 2.0d0))) + t_1
else
tmp = x + (t_1 + (z * (1.0d0 - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if ((b <= -2.8e-48) || !(b <= 9.2e+22)) {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
} else {
tmp = x + (t_1 + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if (b <= -2.8e-48) or not (b <= 9.2e+22): tmp = (x + (b * ((y + t) - 2.0))) + t_1 else: tmp = x + (t_1 + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if ((b <= -2.8e-48) || !(b <= 9.2e+22)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + t_1); else tmp = Float64(x + Float64(t_1 + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if ((b <= -2.8e-48) || ~((b <= 9.2e+22))) tmp = (x + (b * ((y + t) - 2.0))) + t_1; else tmp = x + (t_1 + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -2.8e-48], N[Not[LessEqual[b, 9.2e+22]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x + N[(t$95$1 + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -2.8 \cdot 10^{-48} \lor \neg \left(b \leq 9.2 \cdot 10^{+22}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(t_1 + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if b < -2.80000000000000005e-48 or 9.2000000000000008e22 < b Initial program 94.8%
Taylor expanded in z around 0 85.3%
if -2.80000000000000005e-48 < b < 9.2000000000000008e22Initial program 100.0%
Taylor expanded in b around 0 91.3%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- (+ y t) 2.0)))))
(if (or (<= a -7.8e+51) (not (<= a 1.95e+34)))
(+ t_1 (* a (- 1.0 t)))
(+ t_1 (* z (- 1.0 y))))))
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 ((a <= -7.8e+51) || !(a <= 1.95e+34)) {
tmp = t_1 + (a * (1.0 - t));
} else {
tmp = t_1 + (z * (1.0 - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (b * ((y + t) - 2.0d0))
if ((a <= (-7.8d+51)) .or. (.not. (a <= 1.95d+34))) then
tmp = t_1 + (a * (1.0d0 - t))
else
tmp = t_1 + (z * (1.0d0 - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((y + t) - 2.0));
double tmp;
if ((a <= -7.8e+51) || !(a <= 1.95e+34)) {
tmp = t_1 + (a * (1.0 - t));
} else {
tmp = t_1 + (z * (1.0 - y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * ((y + t) - 2.0)) tmp = 0 if (a <= -7.8e+51) or not (a <= 1.95e+34): tmp = t_1 + (a * (1.0 - t)) else: tmp = t_1 + (z * (1.0 - y)) 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 ((a <= -7.8e+51) || !(a <= 1.95e+34)) tmp = Float64(t_1 + Float64(a * Float64(1.0 - t))); else tmp = Float64(t_1 + Float64(z * Float64(1.0 - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if ((a <= -7.8e+51) || ~((a <= 1.95e+34))) tmp = t_1 + (a * (1.0 - t)); else tmp = t_1 + (z * (1.0 - y)); 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[Or[LessEqual[a, -7.8e+51], N[Not[LessEqual[a, 1.95e+34]], $MachinePrecision]], N[(t$95$1 + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;a \leq -7.8 \cdot 10^{+51} \lor \neg \left(a \leq 1.95 \cdot 10^{+34}\right):\\
\;\;\;\;t_1 + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + z \cdot \left(1 - y\right)\\
\end{array}
\end{array}
if a < -7.79999999999999968e51 or 1.9500000000000001e34 < a Initial program 96.2%
Taylor expanded in z around 0 87.4%
if -7.79999999999999968e51 < a < 1.9500000000000001e34Initial program 97.9%
Taylor expanded in a around 0 89.9%
Final simplification88.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (<= a -1.25e-34)
t_1
(if (<= a 1.6e-239)
(+ x z)
(if (<= a 4.6e-184)
(* y b)
(if (<= a 7.5e+24)
(+ x z)
(if (<= a 3.2e+146) (* t b) (if (<= a 4.6e+146) x t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if (a <= -1.25e-34) {
tmp = t_1;
} else if (a <= 1.6e-239) {
tmp = x + z;
} else if (a <= 4.6e-184) {
tmp = y * b;
} else if (a <= 7.5e+24) {
tmp = x + z;
} else if (a <= 3.2e+146) {
tmp = t * b;
} else if (a <= 4.6e+146) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (1.0d0 - t)
if (a <= (-1.25d-34)) then
tmp = t_1
else if (a <= 1.6d-239) then
tmp = x + z
else if (a <= 4.6d-184) then
tmp = y * b
else if (a <= 7.5d+24) then
tmp = x + z
else if (a <= 3.2d+146) then
tmp = t * b
else if (a <= 4.6d+146) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if (a <= -1.25e-34) {
tmp = t_1;
} else if (a <= 1.6e-239) {
tmp = x + z;
} else if (a <= 4.6e-184) {
tmp = y * b;
} else if (a <= 7.5e+24) {
tmp = x + z;
} else if (a <= 3.2e+146) {
tmp = t * b;
} else if (a <= 4.6e+146) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if a <= -1.25e-34: tmp = t_1 elif a <= 1.6e-239: tmp = x + z elif a <= 4.6e-184: tmp = y * b elif a <= 7.5e+24: tmp = x + z elif a <= 3.2e+146: tmp = t * b elif a <= 4.6e+146: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (a <= -1.25e-34) tmp = t_1; elseif (a <= 1.6e-239) tmp = Float64(x + z); elseif (a <= 4.6e-184) tmp = Float64(y * b); elseif (a <= 7.5e+24) tmp = Float64(x + z); elseif (a <= 3.2e+146) tmp = Float64(t * b); elseif (a <= 4.6e+146) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if (a <= -1.25e-34) tmp = t_1; elseif (a <= 1.6e-239) tmp = x + z; elseif (a <= 4.6e-184) tmp = y * b; elseif (a <= 7.5e+24) tmp = x + z; elseif (a <= 3.2e+146) tmp = t * b; elseif (a <= 4.6e+146) tmp = x; else tmp = t_1; 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[a, -1.25e-34], t$95$1, If[LessEqual[a, 1.6e-239], N[(x + z), $MachinePrecision], If[LessEqual[a, 4.6e-184], N[(y * b), $MachinePrecision], If[LessEqual[a, 7.5e+24], N[(x + z), $MachinePrecision], If[LessEqual[a, 3.2e+146], N[(t * b), $MachinePrecision], If[LessEqual[a, 4.6e+146], x, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -1.25 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-239}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-184}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+24}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+146}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{+146}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.2500000000000001e-34 or 4.60000000000000001e146 < a Initial program 97.1%
Taylor expanded in a around inf 62.1%
if -1.2500000000000001e-34 < a < 1.6e-239 or 4.5999999999999999e-184 < a < 7.50000000000000014e24Initial program 97.3%
Taylor expanded in y around 0 71.9%
associate--l+71.9%
fma-neg71.9%
sub-neg71.9%
metadata-eval71.9%
sub-neg71.9%
metadata-eval71.9%
*-commutative71.9%
distribute-neg-in71.9%
mul-1-neg71.9%
remove-double-neg71.9%
*-commutative71.9%
distribute-rgt-neg-in71.9%
+-commutative71.9%
distribute-neg-in71.9%
metadata-eval71.9%
sub-neg71.9%
Simplified71.9%
Taylor expanded in z around inf 38.5%
if 1.6e-239 < a < 4.5999999999999999e-184Initial program 100.0%
Taylor expanded in z around 0 58.1%
Taylor expanded in y around inf 55.1%
if 7.50000000000000014e24 < a < 3.2e146Initial program 95.2%
Taylor expanded in z around 0 81.6%
Taylor expanded in a around 0 72.2%
Taylor expanded in t around inf 58.1%
Taylor expanded in x around 0 44.0%
*-commutative44.0%
Simplified44.0%
if 3.2e146 < a < 4.60000000000000001e146Initial program 100.0%
Taylor expanded in x around inf 100.0%
Final simplification49.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))) (t_2 (* y (- b z))))
(if (<= y -7.2e+86)
t_2
(if (<= y -1.85e+15)
t_1
(if (<= y -1.16e-30)
(+ x a)
(if (<= y -4.9e-70)
t_1
(if (<= y 1.2e-222)
(+ x z)
(if (<= y 4.9e+69) (* a (- 1.0 t)) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double t_2 = y * (b - z);
double tmp;
if (y <= -7.2e+86) {
tmp = t_2;
} else if (y <= -1.85e+15) {
tmp = t_1;
} else if (y <= -1.16e-30) {
tmp = x + a;
} else if (y <= -4.9e-70) {
tmp = t_1;
} else if (y <= 1.2e-222) {
tmp = x + z;
} else if (y <= 4.9e+69) {
tmp = a * (1.0 - t);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (b - a)
t_2 = y * (b - z)
if (y <= (-7.2d+86)) then
tmp = t_2
else if (y <= (-1.85d+15)) then
tmp = t_1
else if (y <= (-1.16d-30)) then
tmp = x + a
else if (y <= (-4.9d-70)) then
tmp = t_1
else if (y <= 1.2d-222) then
tmp = x + z
else if (y <= 4.9d+69) then
tmp = a * (1.0d0 - t)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double t_2 = y * (b - z);
double tmp;
if (y <= -7.2e+86) {
tmp = t_2;
} else if (y <= -1.85e+15) {
tmp = t_1;
} else if (y <= -1.16e-30) {
tmp = x + a;
} else if (y <= -4.9e-70) {
tmp = t_1;
} else if (y <= 1.2e-222) {
tmp = x + z;
} else if (y <= 4.9e+69) {
tmp = a * (1.0 - t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) t_2 = y * (b - z) tmp = 0 if y <= -7.2e+86: tmp = t_2 elif y <= -1.85e+15: tmp = t_1 elif y <= -1.16e-30: tmp = x + a elif y <= -4.9e-70: tmp = t_1 elif y <= 1.2e-222: tmp = x + z elif y <= 4.9e+69: tmp = a * (1.0 - t) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -7.2e+86) tmp = t_2; elseif (y <= -1.85e+15) tmp = t_1; elseif (y <= -1.16e-30) tmp = Float64(x + a); elseif (y <= -4.9e-70) tmp = t_1; elseif (y <= 1.2e-222) tmp = Float64(x + z); elseif (y <= 4.9e+69) tmp = Float64(a * Float64(1.0 - t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); t_2 = y * (b - z); tmp = 0.0; if (y <= -7.2e+86) tmp = t_2; elseif (y <= -1.85e+15) tmp = t_1; elseif (y <= -1.16e-30) tmp = x + a; elseif (y <= -4.9e-70) tmp = t_1; elseif (y <= 1.2e-222) tmp = x + z; elseif (y <= 4.9e+69) tmp = a * (1.0 - t); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.2e+86], t$95$2, If[LessEqual[y, -1.85e+15], t$95$1, If[LessEqual[y, -1.16e-30], N[(x + a), $MachinePrecision], If[LessEqual[y, -4.9e-70], t$95$1, If[LessEqual[y, 1.2e-222], N[(x + z), $MachinePrecision], If[LessEqual[y, 4.9e+69], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{+86}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.16 \cdot 10^{-30}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;y \leq -4.9 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-222}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{+69}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -7.20000000000000011e86 or 4.9e69 < y Initial program 94.6%
Taylor expanded in y around inf 73.5%
if -7.20000000000000011e86 < y < -1.85e15 or -1.16e-30 < y < -4.9e-70Initial program 96.9%
Taylor expanded in t around inf 67.4%
if -1.85e15 < y < -1.16e-30Initial program 99.8%
Taylor expanded in z around 0 71.2%
Taylor expanded in b around 0 52.2%
Taylor expanded in t around 0 52.2%
cancel-sign-sub-inv52.2%
metadata-eval52.2%
*-lft-identity52.2%
+-commutative52.2%
Simplified52.2%
if -4.9e-70 < y < 1.19999999999999997e-222Initial program 98.6%
Taylor expanded in y around 0 98.6%
associate--l+98.6%
fma-neg100.0%
sub-neg100.0%
metadata-eval100.0%
sub-neg100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-neg-in100.0%
mul-1-neg100.0%
remove-double-neg100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
sub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 50.4%
if 1.19999999999999997e-222 < y < 4.9e69Initial program 100.0%
Taylor expanded in a around inf 52.6%
Final simplification61.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z (+ x a)) (* y z))) (t_2 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -5e+56)
t_2
(if (<= b -8.6e-80)
t_1
(if (<= b -1.9e-129)
(+ x (* a (- 1.0 t)))
(if (<= b 1.25e+26) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x + a)) - (y * z);
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -5e+56) {
tmp = t_2;
} else if (b <= -8.6e-80) {
tmp = t_1;
} else if (b <= -1.9e-129) {
tmp = x + (a * (1.0 - t));
} else if (b <= 1.25e+26) {
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 = (z + (x + a)) - (y * z)
t_2 = x + (b * ((y + t) - 2.0d0))
if (b <= (-5d+56)) then
tmp = t_2
else if (b <= (-8.6d-80)) then
tmp = t_1
else if (b <= (-1.9d-129)) then
tmp = x + (a * (1.0d0 - t))
else if (b <= 1.25d+26) 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 = (z + (x + a)) - (y * z);
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -5e+56) {
tmp = t_2;
} else if (b <= -8.6e-80) {
tmp = t_1;
} else if (b <= -1.9e-129) {
tmp = x + (a * (1.0 - t));
} else if (b <= 1.25e+26) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (x + a)) - (y * z) t_2 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -5e+56: tmp = t_2 elif b <= -8.6e-80: tmp = t_1 elif b <= -1.9e-129: tmp = x + (a * (1.0 - t)) elif b <= 1.25e+26: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(x + a)) - Float64(y * z)) t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -5e+56) tmp = t_2; elseif (b <= -8.6e-80) tmp = t_1; elseif (b <= -1.9e-129) tmp = Float64(x + Float64(a * Float64(1.0 - t))); elseif (b <= 1.25e+26) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (x + a)) - (y * z); t_2 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -5e+56) tmp = t_2; elseif (b <= -8.6e-80) tmp = t_1; elseif (b <= -1.9e-129) tmp = x + (a * (1.0 - t)); elseif (b <= 1.25e+26) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5e+56], t$95$2, If[LessEqual[b, -8.6e-80], t$95$1, If[LessEqual[b, -1.9e-129], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.25e+26], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + \left(x + a\right)\right) - y \cdot z\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -5 \cdot 10^{+56}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -8.6 \cdot 10^{-80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.9 \cdot 10^{-129}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -5.00000000000000024e56 or 1.25e26 < b Initial program 93.8%
Taylor expanded in z around 0 85.8%
Taylor expanded in a around 0 75.0%
if -5.00000000000000024e56 < b < -8.6000000000000002e-80 or -1.89999999999999992e-129 < b < 1.25e26Initial program 100.0%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in b around 0 89.3%
Taylor expanded in t around 0 66.0%
neg-mul-166.0%
associate--r+66.0%
+-commutative66.0%
associate--l+66.0%
sub-neg66.0%
remove-double-neg66.0%
+-commutative66.0%
*-commutative66.0%
Simplified66.0%
if -8.6000000000000002e-80 < b < -1.89999999999999992e-129Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in b around 0 88.1%
Final simplification70.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (* b (- (+ y t) 2.0)) (* t a))))
(if (<= t -7.2e-20)
t_1
(if (<= t 1.1e-219)
(- (+ z (+ x a)) (* y z))
(if (<= t 25000000.0) (+ x (+ a (* b (+ y -2.0)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((y + t) - 2.0)) - (t * a);
double tmp;
if (t <= -7.2e-20) {
tmp = t_1;
} else if (t <= 1.1e-219) {
tmp = (z + (x + a)) - (y * z);
} else if (t <= 25000000.0) {
tmp = x + (a + (b * (y + -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 = (b * ((y + t) - 2.0d0)) - (t * a)
if (t <= (-7.2d-20)) then
tmp = t_1
else if (t <= 1.1d-219) then
tmp = (z + (x + a)) - (y * z)
else if (t <= 25000000.0d0) then
tmp = x + (a + (b * (y + (-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 = (b * ((y + t) - 2.0)) - (t * a);
double tmp;
if (t <= -7.2e-20) {
tmp = t_1;
} else if (t <= 1.1e-219) {
tmp = (z + (x + a)) - (y * z);
} else if (t <= 25000000.0) {
tmp = x + (a + (b * (y + -2.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b * ((y + t) - 2.0)) - (t * a) tmp = 0 if t <= -7.2e-20: tmp = t_1 elif t <= 1.1e-219: tmp = (z + (x + a)) - (y * z) elif t <= 25000000.0: tmp = x + (a + (b * (y + -2.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) - Float64(t * a)) tmp = 0.0 if (t <= -7.2e-20) tmp = t_1; elseif (t <= 1.1e-219) tmp = Float64(Float64(z + Float64(x + a)) - Float64(y * z)); elseif (t <= 25000000.0) tmp = Float64(x + Float64(a + Float64(b * Float64(y + -2.0)))); 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 * a); tmp = 0.0; if (t <= -7.2e-20) tmp = t_1; elseif (t <= 1.1e-219) tmp = (z + (x + a)) - (y * z); elseif (t <= 25000000.0) tmp = x + (a + (b * (y + -2.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e-20], t$95$1, If[LessEqual[t, 1.1e-219], N[(N[(z + N[(x + a), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 25000000.0], N[(x + N[(a + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-219}:\\
\;\;\;\;\left(z + \left(x + a\right)\right) - y \cdot z\\
\mathbf{elif}\;t \leq 25000000:\\
\;\;\;\;x + \left(a + b \cdot \left(y + -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.19999999999999948e-20 or 2.5e7 < t Initial program 95.5%
Taylor expanded in z around 0 81.5%
Taylor expanded in t around inf 81.3%
*-commutative47.7%
Simplified81.3%
Taylor expanded in x around 0 70.3%
if -7.19999999999999948e-20 < t < 1.1e-219Initial program 98.8%
Taylor expanded in y around 0 98.7%
+-commutative98.7%
mul-1-neg98.7%
unsub-neg98.7%
Simplified98.7%
Taylor expanded in b around 0 72.8%
Taylor expanded in t around 0 72.8%
neg-mul-172.8%
associate--r+72.8%
+-commutative72.8%
associate--l+72.8%
sub-neg72.8%
remove-double-neg72.8%
+-commutative72.8%
*-commutative72.8%
Simplified72.8%
if 1.1e-219 < t < 2.5e7Initial program 100.0%
Taylor expanded in z around 0 83.2%
Taylor expanded in t around 0 80.4%
associate--l+80.4%
sub-neg80.4%
metadata-eval80.4%
neg-mul-180.4%
Simplified80.4%
Final simplification72.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.8e+131) (not (<= b 1.1e+149))) (+ x (* b (- (+ y t) 2.0))) (+ x (+ (* a (- 1.0 t)) (* z (- 1.0 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.8e+131) || !(b <= 1.1e+149)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-3.8d+131)) .or. (.not. (b <= 1.1d+149))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x + ((a * (1.0d0 - t)) + (z * (1.0d0 - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.8e+131) || !(b <= 1.1e+149)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.8e+131) or not (b <= 1.1e+149): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.8e+131) || !(b <= 1.1e+149)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.8e+131) || ~((b <= 1.1e+149))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.8e+131], N[Not[LessEqual[b, 1.1e+149]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.8 \cdot 10^{+131} \lor \neg \left(b \leq 1.1 \cdot 10^{+149}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if b < -3.8000000000000004e131 or 1.1e149 < b Initial program 93.1%
Taylor expanded in z around 0 93.4%
Taylor expanded in a around 0 89.3%
if -3.8000000000000004e131 < b < 1.1e149Initial program 98.9%
Taylor expanded in b around 0 82.4%
Final simplification84.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -9.6e+54) (not (<= b 1.9e+23))) (- (+ x (* b (- (+ y t) 2.0))) (* t a)) (+ x (+ (* a (- 1.0 t)) (* z (- 1.0 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9.6e+54) || !(b <= 1.9e+23)) {
tmp = (x + (b * ((y + t) - 2.0))) - (t * a);
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-9.6d+54)) .or. (.not. (b <= 1.9d+23))) then
tmp = (x + (b * ((y + t) - 2.0d0))) - (t * a)
else
tmp = x + ((a * (1.0d0 - t)) + (z * (1.0d0 - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9.6e+54) || !(b <= 1.9e+23)) {
tmp = (x + (b * ((y + t) - 2.0))) - (t * a);
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -9.6e+54) or not (b <= 1.9e+23): tmp = (x + (b * ((y + t) - 2.0))) - (t * a) else: tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -9.6e+54) || !(b <= 1.9e+23)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) - Float64(t * a)); else tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -9.6e+54) || ~((b <= 1.9e+23))) tmp = (x + (b * ((y + t) - 2.0))) - (t * a); else tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9.6e+54], N[Not[LessEqual[b, 1.9e+23]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.6 \cdot 10^{+54} \lor \neg \left(b \leq 1.9 \cdot 10^{+23}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) - t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if b < -9.59999999999999993e54 or 1.89999999999999987e23 < b Initial program 93.8%
Taylor expanded in z around 0 85.9%
Taylor expanded in t around inf 80.7%
*-commutative20.6%
Simplified80.7%
if -9.59999999999999993e54 < b < 1.89999999999999987e23Initial program 100.0%
Taylor expanded in b around 0 89.2%
Final simplification85.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- a))))
(if (<= y -1.05e+88)
(* y b)
(if (<= y -3.1e+19)
t_1
(if (<= y -1300000000.0)
(* t b)
(if (<= y 2.6e-207)
(+ x z)
(if (<= y 1.35e-74) (+ x a) (if (<= y 7e+84) 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 <= -1.05e+88) {
tmp = y * b;
} else if (y <= -3.1e+19) {
tmp = t_1;
} else if (y <= -1300000000.0) {
tmp = t * b;
} else if (y <= 2.6e-207) {
tmp = x + z;
} else if (y <= 1.35e-74) {
tmp = x + a;
} else if (y <= 7e+84) {
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 <= (-1.05d+88)) then
tmp = y * b
else if (y <= (-3.1d+19)) then
tmp = t_1
else if (y <= (-1300000000.0d0)) then
tmp = t * b
else if (y <= 2.6d-207) then
tmp = x + z
else if (y <= 1.35d-74) then
tmp = x + a
else if (y <= 7d+84) 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 <= -1.05e+88) {
tmp = y * b;
} else if (y <= -3.1e+19) {
tmp = t_1;
} else if (y <= -1300000000.0) {
tmp = t * b;
} else if (y <= 2.6e-207) {
tmp = x + z;
} else if (y <= 1.35e-74) {
tmp = x + a;
} else if (y <= 7e+84) {
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 <= -1.05e+88: tmp = y * b elif y <= -3.1e+19: tmp = t_1 elif y <= -1300000000.0: tmp = t * b elif y <= 2.6e-207: tmp = x + z elif y <= 1.35e-74: tmp = x + a elif y <= 7e+84: 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 <= -1.05e+88) tmp = Float64(y * b); elseif (y <= -3.1e+19) tmp = t_1; elseif (y <= -1300000000.0) tmp = Float64(t * b); elseif (y <= 2.6e-207) tmp = Float64(x + z); elseif (y <= 1.35e-74) tmp = Float64(x + a); elseif (y <= 7e+84) 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 <= -1.05e+88) tmp = y * b; elseif (y <= -3.1e+19) tmp = t_1; elseif (y <= -1300000000.0) tmp = t * b; elseif (y <= 2.6e-207) tmp = x + z; elseif (y <= 1.35e-74) tmp = x + a; elseif (y <= 7e+84) 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, -1.05e+88], N[(y * b), $MachinePrecision], If[LessEqual[y, -3.1e+19], t$95$1, If[LessEqual[y, -1300000000.0], N[(t * b), $MachinePrecision], If[LessEqual[y, 2.6e-207], N[(x + z), $MachinePrecision], If[LessEqual[y, 1.35e-74], N[(x + a), $MachinePrecision], If[LessEqual[y, 7e+84], t$95$1, N[(y * b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-a\right)\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+88}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1300000000:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-207}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-74}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.05e88 or 6.9999999999999998e84 < y Initial program 94.5%
Taylor expanded in z around 0 68.6%
Taylor expanded in y around inf 44.2%
if -1.05e88 < y < -3.1e19 or 1.35000000000000009e-74 < y < 6.9999999999999998e84Initial program 97.6%
Taylor expanded in a around inf 47.1%
Taylor expanded in t around inf 39.6%
associate-*r*39.6%
neg-mul-139.6%
Simplified39.6%
if -3.1e19 < y < -1.3e9Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around inf 69.1%
Taylor expanded in x around 0 66.7%
*-commutative66.7%
Simplified66.7%
if -1.3e9 < y < 2.5999999999999999e-207Initial program 98.9%
Taylor expanded in y around 0 97.4%
associate--l+97.4%
fma-neg98.5%
sub-neg98.5%
metadata-eval98.5%
sub-neg98.5%
metadata-eval98.5%
*-commutative98.5%
distribute-neg-in98.5%
mul-1-neg98.5%
remove-double-neg98.5%
*-commutative98.5%
distribute-rgt-neg-in98.5%
+-commutative98.5%
distribute-neg-in98.5%
metadata-eval98.5%
sub-neg98.5%
Simplified98.5%
Taylor expanded in z around inf 46.5%
if 2.5999999999999999e-207 < y < 1.35000000000000009e-74Initial program 100.0%
Taylor expanded in z around 0 96.2%
Taylor expanded in b around 0 68.3%
Taylor expanded in t around 0 48.5%
cancel-sign-sub-inv48.5%
metadata-eval48.5%
*-lft-identity48.5%
+-commutative48.5%
Simplified48.5%
Final simplification45.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (* t a))) (t_2 (* b (- (+ y t) 2.0))))
(if (<= b -1.3e+39)
t_2
(if (<= b -1.05e-252)
t_1
(if (<= b 3.2e-173) (* a (- 1.0 t)) (if (<= b 3.1e+68) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (t * a);
double t_2 = b * ((y + t) - 2.0);
double tmp;
if (b <= -1.3e+39) {
tmp = t_2;
} else if (b <= -1.05e-252) {
tmp = t_1;
} else if (b <= 3.2e-173) {
tmp = a * (1.0 - t);
} else if (b <= 3.1e+68) {
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 - (t * a)
t_2 = b * ((y + t) - 2.0d0)
if (b <= (-1.3d+39)) then
tmp = t_2
else if (b <= (-1.05d-252)) then
tmp = t_1
else if (b <= 3.2d-173) then
tmp = a * (1.0d0 - t)
else if (b <= 3.1d+68) 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 - (t * a);
double t_2 = b * ((y + t) - 2.0);
double tmp;
if (b <= -1.3e+39) {
tmp = t_2;
} else if (b <= -1.05e-252) {
tmp = t_1;
} else if (b <= 3.2e-173) {
tmp = a * (1.0 - t);
} else if (b <= 3.1e+68) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (t * a) t_2 = b * ((y + t) - 2.0) tmp = 0 if b <= -1.3e+39: tmp = t_2 elif b <= -1.05e-252: tmp = t_1 elif b <= 3.2e-173: tmp = a * (1.0 - t) elif b <= 3.1e+68: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(t * a)) t_2 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -1.3e+39) tmp = t_2; elseif (b <= -1.05e-252) tmp = t_1; elseif (b <= 3.2e-173) tmp = Float64(a * Float64(1.0 - t)); elseif (b <= 3.1e+68) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - (t * a); t_2 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -1.3e+39) tmp = t_2; elseif (b <= -1.05e-252) tmp = t_1; elseif (b <= 3.2e-173) tmp = a * (1.0 - t); elseif (b <= 3.1e+68) 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[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+39], t$95$2, If[LessEqual[b, -1.05e-252], t$95$1, If[LessEqual[b, 3.2e-173], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.1e+68], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - t \cdot a\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.3 \cdot 10^{+39}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -1.05 \cdot 10^{-252}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-173}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 3.1 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -1.3e39 or 3.0999999999999998e68 < b Initial program 93.9%
Taylor expanded in b around inf 66.4%
if -1.3e39 < b < -1.05e-252 or 3.2e-173 < b < 3.0999999999999998e68Initial program 100.0%
Taylor expanded in z around 0 71.7%
Taylor expanded in b around 0 58.6%
Taylor expanded in t around inf 50.0%
*-commutative50.0%
Simplified50.0%
if -1.05e-252 < b < 3.2e-173Initial program 100.0%
Taylor expanded in a around inf 52.5%
Final simplification57.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -8.5e+50)
(* y b)
(if (<= y -3e+14)
(* t b)
(if (<= y -2.2e+14)
(* y b)
(if (<= y 4.8e-205) (+ x z) (if (<= y 6.5e+84) (+ x a) (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.5e+50) {
tmp = y * b;
} else if (y <= -3e+14) {
tmp = t * b;
} else if (y <= -2.2e+14) {
tmp = y * b;
} else if (y <= 4.8e-205) {
tmp = x + z;
} else if (y <= 6.5e+84) {
tmp = x + a;
} 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+50)) then
tmp = y * b
else if (y <= (-3d+14)) then
tmp = t * b
else if (y <= (-2.2d+14)) then
tmp = y * b
else if (y <= 4.8d-205) then
tmp = x + z
else if (y <= 6.5d+84) then
tmp = x + a
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+50) {
tmp = y * b;
} else if (y <= -3e+14) {
tmp = t * b;
} else if (y <= -2.2e+14) {
tmp = y * b;
} else if (y <= 4.8e-205) {
tmp = x + z;
} else if (y <= 6.5e+84) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.5e+50: tmp = y * b elif y <= -3e+14: tmp = t * b elif y <= -2.2e+14: tmp = y * b elif y <= 4.8e-205: tmp = x + z elif y <= 6.5e+84: tmp = x + a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.5e+50) tmp = Float64(y * b); elseif (y <= -3e+14) tmp = Float64(t * b); elseif (y <= -2.2e+14) tmp = Float64(y * b); elseif (y <= 4.8e-205) tmp = Float64(x + z); elseif (y <= 6.5e+84) tmp = Float64(x + a); 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+50) tmp = y * b; elseif (y <= -3e+14) tmp = t * b; elseif (y <= -2.2e+14) tmp = y * b; elseif (y <= 4.8e-205) tmp = x + z; elseif (y <= 6.5e+84) tmp = x + a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.5e+50], N[(y * b), $MachinePrecision], If[LessEqual[y, -3e+14], N[(t * b), $MachinePrecision], If[LessEqual[y, -2.2e+14], N[(y * b), $MachinePrecision], If[LessEqual[y, 4.8e-205], N[(x + z), $MachinePrecision], If[LessEqual[y, 6.5e+84], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+50}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -3 \cdot 10^{+14}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+14}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-205}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+84}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -8.49999999999999961e50 or -3e14 < y < -2.2e14 or 6.50000000000000027e84 < y Initial program 95.0%
Taylor expanded in z around 0 70.4%
Taylor expanded in y around inf 42.4%
if -8.49999999999999961e50 < y < -3e14Initial program 92.9%
Taylor expanded in z around 0 100.0%
Taylor expanded in a around 0 59.4%
Taylor expanded in t around inf 52.6%
Taylor expanded in x around 0 44.8%
*-commutative44.8%
Simplified44.8%
if -2.2e14 < y < 4.8000000000000004e-205Initial program 98.9%
Taylor expanded in y around 0 97.4%
associate--l+97.4%
fma-neg98.5%
sub-neg98.5%
metadata-eval98.5%
sub-neg98.5%
metadata-eval98.5%
*-commutative98.5%
distribute-neg-in98.5%
mul-1-neg98.5%
remove-double-neg98.5%
*-commutative98.5%
distribute-rgt-neg-in98.5%
+-commutative98.5%
distribute-neg-in98.5%
metadata-eval98.5%
sub-neg98.5%
Simplified98.5%
Taylor expanded in z around inf 46.5%
if 4.8000000000000004e-205 < y < 6.50000000000000027e84Initial program 100.0%
Taylor expanded in z around 0 91.7%
Taylor expanded in b around 0 62.1%
Taylor expanded in t around 0 32.9%
cancel-sign-sub-inv32.9%
metadata-eval32.9%
*-lft-identity32.9%
+-commutative32.9%
Simplified32.9%
Final simplification42.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.85e+37) (not (<= b 8.2e+43))) (+ x (* b (- (+ y t) 2.0))) (+ x (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.85e+37) || !(b <= 8.2e+43)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + (a * (1.0 - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.85d+37)) .or. (.not. (b <= 8.2d+43))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x + (a * (1.0d0 - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.85e+37) || !(b <= 8.2e+43)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.85e+37) or not (b <= 8.2e+43): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.85e+37) || !(b <= 8.2e+43)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(x + Float64(a * Float64(1.0 - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.85e+37) || ~((b <= 8.2e+43))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.85e+37], N[Not[LessEqual[b, 8.2e+43]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.85 \cdot 10^{+37} \lor \neg \left(b \leq 8.2 \cdot 10^{+43}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if b < -1.85e37 or 8.2000000000000001e43 < b Initial program 94.0%
Taylor expanded in z around 0 83.8%
Taylor expanded in a around 0 72.7%
if -1.85e37 < b < 8.2000000000000001e43Initial program 100.0%
Taylor expanded in z around 0 68.1%
Taylor expanded in b around 0 59.6%
Final simplification65.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.05e+51)
(* y b)
(if (<= y -1.25e-95)
(* t b)
(if (<= y 1.56e-204) z (if (<= y 1.62e+25) a (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.05e+51) {
tmp = y * b;
} else if (y <= -1.25e-95) {
tmp = t * b;
} else if (y <= 1.56e-204) {
tmp = z;
} else if (y <= 1.62e+25) {
tmp = a;
} 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 <= (-1.05d+51)) then
tmp = y * b
else if (y <= (-1.25d-95)) then
tmp = t * b
else if (y <= 1.56d-204) then
tmp = z
else if (y <= 1.62d+25) then
tmp = a
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 <= -1.05e+51) {
tmp = y * b;
} else if (y <= -1.25e-95) {
tmp = t * b;
} else if (y <= 1.56e-204) {
tmp = z;
} else if (y <= 1.62e+25) {
tmp = a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.05e+51: tmp = y * b elif y <= -1.25e-95: tmp = t * b elif y <= 1.56e-204: tmp = z elif y <= 1.62e+25: tmp = a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.05e+51) tmp = Float64(y * b); elseif (y <= -1.25e-95) tmp = Float64(t * b); elseif (y <= 1.56e-204) tmp = z; elseif (y <= 1.62e+25) tmp = a; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.05e+51) tmp = y * b; elseif (y <= -1.25e-95) tmp = t * b; elseif (y <= 1.56e-204) tmp = z; elseif (y <= 1.62e+25) tmp = a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.05e+51], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.25e-95], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.56e-204], z, If[LessEqual[y, 1.62e+25], a, N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+51}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{-95}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 1.56 \cdot 10^{-204}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{+25}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.0500000000000001e51 or 1.62e25 < y Initial program 95.3%
Taylor expanded in z around 0 71.5%
Taylor expanded in y around inf 39.8%
if -1.0500000000000001e51 < y < -1.2499999999999999e-95Initial program 97.5%
Taylor expanded in z around 0 90.5%
Taylor expanded in a around 0 62.4%
Taylor expanded in t around inf 48.3%
Taylor expanded in x around 0 29.2%
*-commutative29.2%
Simplified29.2%
if -1.2499999999999999e-95 < y < 1.56000000000000007e-204Initial program 98.5%
Taylor expanded in z around inf 35.6%
Taylor expanded in y around 0 35.6%
if 1.56000000000000007e-204 < y < 1.62e25Initial program 100.0%
Taylor expanded in a around inf 49.3%
Taylor expanded in t around 0 23.6%
Final simplification34.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -7.8e+83)
(* t b)
(if (<= b 2.1e-305)
(+ x a)
(if (<= b 1.65e-212) z (if (<= b 2.35e+111) (+ x a) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.8e+83) {
tmp = t * b;
} else if (b <= 2.1e-305) {
tmp = x + a;
} else if (b <= 1.65e-212) {
tmp = z;
} else if (b <= 2.35e+111) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-7.8d+83)) then
tmp = t * b
else if (b <= 2.1d-305) then
tmp = x + a
else if (b <= 1.65d-212) then
tmp = z
else if (b <= 2.35d+111) then
tmp = x + a
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.8e+83) {
tmp = t * b;
} else if (b <= 2.1e-305) {
tmp = x + a;
} else if (b <= 1.65e-212) {
tmp = z;
} else if (b <= 2.35e+111) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.8e+83: tmp = t * b elif b <= 2.1e-305: tmp = x + a elif b <= 1.65e-212: tmp = z elif b <= 2.35e+111: tmp = x + a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.8e+83) tmp = Float64(t * b); elseif (b <= 2.1e-305) tmp = Float64(x + a); elseif (b <= 1.65e-212) tmp = z; elseif (b <= 2.35e+111) tmp = Float64(x + a); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.8e+83) tmp = t * b; elseif (b <= 2.1e-305) tmp = x + a; elseif (b <= 1.65e-212) tmp = z; elseif (b <= 2.35e+111) tmp = x + a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.8e+83], N[(t * b), $MachinePrecision], If[LessEqual[b, 2.1e-305], N[(x + a), $MachinePrecision], If[LessEqual[b, 1.65e-212], z, If[LessEqual[b, 2.35e+111], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.8 \cdot 10^{+83}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-305}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;b \leq 1.65 \cdot 10^{-212}:\\
\;\;\;\;z\\
\mathbf{elif}\;b \leq 2.35 \cdot 10^{+111}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -7.8000000000000003e83Initial program 92.6%
Taylor expanded in z around 0 87.5%
Taylor expanded in a around 0 78.5%
Taylor expanded in t around inf 51.3%
Taylor expanded in x around 0 46.0%
*-commutative46.0%
Simplified46.0%
if -7.8000000000000003e83 < b < 2.1e-305 or 1.6500000000000001e-212 < b < 2.35000000000000004e111Initial program 100.0%
Taylor expanded in z around 0 70.8%
Taylor expanded in b around 0 55.3%
Taylor expanded in t around 0 32.4%
cancel-sign-sub-inv32.4%
metadata-eval32.4%
*-lft-identity32.4%
+-commutative32.4%
Simplified32.4%
if 2.1e-305 < b < 1.6500000000000001e-212Initial program 99.9%
Taylor expanded in z around inf 48.8%
Taylor expanded in y around 0 42.2%
if 2.35000000000000004e111 < b Initial program 92.1%
Taylor expanded in z around 0 87.2%
Taylor expanded in y around inf 39.0%
Final simplification37.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.45e+57) (not (<= b 1.2e+87))) (* b (- (+ y t) 2.0)) (+ x (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.45e+57) || !(b <= 1.2e+87)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x + (a * (1.0 - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.45d+57)) .or. (.not. (b <= 1.2d+87))) then
tmp = b * ((y + t) - 2.0d0)
else
tmp = x + (a * (1.0d0 - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.45e+57) || !(b <= 1.2e+87)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.45e+57) or not (b <= 1.2e+87): tmp = b * ((y + t) - 2.0) else: tmp = x + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.45e+57) || !(b <= 1.2e+87)) tmp = Float64(b * Float64(Float64(y + t) - 2.0)); else tmp = Float64(x + Float64(a * Float64(1.0 - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.45e+57) || ~((b <= 1.2e+87))) tmp = b * ((y + t) - 2.0); else tmp = x + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.45e+57], N[Not[LessEqual[b, 1.2e+87]], $MachinePrecision]], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.45 \cdot 10^{+57} \lor \neg \left(b \leq 1.2 \cdot 10^{+87}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if b < -1.4500000000000001e57 or 1.19999999999999991e87 < b Initial program 93.4%
Taylor expanded in b around inf 70.1%
if -1.4500000000000001e57 < b < 1.19999999999999991e87Initial program 100.0%
Taylor expanded in z around 0 67.9%
Taylor expanded in b around 0 57.4%
Final simplification62.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.65e+130) x (if (<= x -4.7e-241) z (if (<= x 3.25e-230) a (if (<= x 1.12e+38) z x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.65e+130) {
tmp = x;
} else if (x <= -4.7e-241) {
tmp = z;
} else if (x <= 3.25e-230) {
tmp = a;
} else if (x <= 1.12e+38) {
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 <= (-1.65d+130)) then
tmp = x
else if (x <= (-4.7d-241)) then
tmp = z
else if (x <= 3.25d-230) then
tmp = a
else if (x <= 1.12d+38) 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 <= -1.65e+130) {
tmp = x;
} else if (x <= -4.7e-241) {
tmp = z;
} else if (x <= 3.25e-230) {
tmp = a;
} else if (x <= 1.12e+38) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.65e+130: tmp = x elif x <= -4.7e-241: tmp = z elif x <= 3.25e-230: tmp = a elif x <= 1.12e+38: tmp = z else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.65e+130) tmp = x; elseif (x <= -4.7e-241) tmp = z; elseif (x <= 3.25e-230) tmp = a; elseif (x <= 1.12e+38) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.65e+130) tmp = x; elseif (x <= -4.7e-241) tmp = z; elseif (x <= 3.25e-230) tmp = a; elseif (x <= 1.12e+38) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.65e+130], x, If[LessEqual[x, -4.7e-241], z, If[LessEqual[x, 3.25e-230], a, If[LessEqual[x, 1.12e+38], z, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+130}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4.7 \cdot 10^{-241}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 3.25 \cdot 10^{-230}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 1.12 \cdot 10^{+38}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.65e130 or 1.1199999999999999e38 < x Initial program 96.8%
Taylor expanded in x around inf 35.1%
if -1.65e130 < x < -4.6999999999999999e-241 or 3.2500000000000002e-230 < x < 1.1199999999999999e38Initial program 96.9%
Taylor expanded in z around inf 37.7%
Taylor expanded in y around 0 20.7%
if -4.6999999999999999e-241 < x < 3.2500000000000002e-230Initial program 100.0%
Taylor expanded in a around inf 51.5%
Taylor expanded in t around 0 24.5%
Final simplification26.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1500000.0) (* y b) (if (<= y 6.1e-202) z (if (<= y 7.6e+25) a (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1500000.0) {
tmp = y * b;
} else if (y <= 6.1e-202) {
tmp = z;
} else if (y <= 7.6e+25) {
tmp = a;
} 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 <= (-1500000.0d0)) then
tmp = y * b
else if (y <= 6.1d-202) then
tmp = z
else if (y <= 7.6d+25) then
tmp = a
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 <= -1500000.0) {
tmp = y * b;
} else if (y <= 6.1e-202) {
tmp = z;
} else if (y <= 7.6e+25) {
tmp = a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1500000.0: tmp = y * b elif y <= 6.1e-202: tmp = z elif y <= 7.6e+25: tmp = a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1500000.0) tmp = Float64(y * b); elseif (y <= 6.1e-202) tmp = z; elseif (y <= 7.6e+25) tmp = a; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1500000.0) tmp = y * b; elseif (y <= 6.1e-202) tmp = z; elseif (y <= 7.6e+25) tmp = a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1500000.0], N[(y * b), $MachinePrecision], If[LessEqual[y, 6.1e-202], z, If[LessEqual[y, 7.6e+25], a, N[(y * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1500000:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 6.1 \cdot 10^{-202}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+25}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.5e6 or 7.6000000000000001e25 < y Initial program 95.1%
Taylor expanded in z around 0 75.0%
Taylor expanded in y around inf 36.9%
if -1.5e6 < y < 6.10000000000000045e-202Initial program 98.9%
Taylor expanded in z around inf 30.7%
Taylor expanded in y around 0 29.2%
if 6.10000000000000045e-202 < y < 7.6000000000000001e25Initial program 100.0%
Taylor expanded in a around inf 49.3%
Taylor expanded in t around 0 23.6%
Final simplification32.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -12000.0) (not (<= t 14500000.0))) (* t (- b a)) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -12000.0) || !(t <= 14500000.0)) {
tmp = t * (b - a);
} else {
tmp = x + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-12000.0d0)) .or. (.not. (t <= 14500000.0d0))) then
tmp = t * (b - a)
else
tmp = x + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -12000.0) || !(t <= 14500000.0)) {
tmp = t * (b - a);
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -12000.0) or not (t <= 14500000.0): tmp = t * (b - a) else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -12000.0) || !(t <= 14500000.0)) tmp = Float64(t * Float64(b - a)); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -12000.0) || ~((t <= 14500000.0))) tmp = t * (b - a); else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -12000.0], N[Not[LessEqual[t, 14500000.0]], $MachinePrecision]], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -12000 \lor \neg \left(t \leq 14500000\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if t < -12000 or 1.45e7 < t Initial program 95.3%
Taylor expanded in t around inf 64.7%
if -12000 < t < 1.45e7Initial program 99.2%
Taylor expanded in z around 0 69.0%
Taylor expanded in b around 0 37.4%
Taylor expanded in t around 0 36.6%
cancel-sign-sub-inv36.6%
metadata-eval36.6%
*-lft-identity36.6%
+-commutative36.6%
Simplified36.6%
Final simplification50.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -3.2e+61) x (if (<= x 2.35e+33) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.2e+61) {
tmp = x;
} else if (x <= 2.35e+33) {
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 <= (-3.2d+61)) then
tmp = x
else if (x <= 2.35d+33) 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 <= -3.2e+61) {
tmp = x;
} else if (x <= 2.35e+33) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -3.2e+61: tmp = x elif x <= 2.35e+33: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.2e+61) tmp = x; elseif (x <= 2.35e+33) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -3.2e+61) tmp = x; elseif (x <= 2.35e+33) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.2e+61], x, If[LessEqual[x, 2.35e+33], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+61}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{+33}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.1999999999999998e61 or 2.3499999999999999e33 < x Initial program 97.2%
Taylor expanded in x around inf 31.2%
if -3.1999999999999998e61 < x < 2.3499999999999999e33Initial program 97.2%
Taylor expanded in a around inf 35.3%
Taylor expanded in t around 0 16.2%
Final simplification22.6%
(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 97.2%
Taylor expanded in a around inf 30.3%
Taylor expanded in t around 0 11.5%
Final simplification11.5%
herbie shell --seed 2023279
(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)))