
(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 (- (+ x z) (* b (- 2.0 t)))) (t_2 (+ x (- a (* t a)))))
(if (<= a -1e+54)
t_2
(if (<= a -3.2e-78)
t_1
(if (<= a -3.1e-161)
(+ x (* b (- (+ y t) 2.0)))
(if (<= a 2.3e-248)
t_1
(if (<= a 4e-184) (* y (- b z)) (if (<= a 1.32e+150) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + z) - (b * (2.0 - t));
double t_2 = x + (a - (t * a));
double tmp;
if (a <= -1e+54) {
tmp = t_2;
} else if (a <= -3.2e-78) {
tmp = t_1;
} else if (a <= -3.1e-161) {
tmp = x + (b * ((y + t) - 2.0));
} else if (a <= 2.3e-248) {
tmp = t_1;
} else if (a <= 4e-184) {
tmp = y * (b - z);
} else if (a <= 1.32e+150) {
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 * (2.0d0 - t))
t_2 = x + (a - (t * a))
if (a <= (-1d+54)) then
tmp = t_2
else if (a <= (-3.2d-78)) then
tmp = t_1
else if (a <= (-3.1d-161)) then
tmp = x + (b * ((y + t) - 2.0d0))
else if (a <= 2.3d-248) then
tmp = t_1
else if (a <= 4d-184) then
tmp = y * (b - z)
else if (a <= 1.32d+150) 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 * (2.0 - t));
double t_2 = x + (a - (t * a));
double tmp;
if (a <= -1e+54) {
tmp = t_2;
} else if (a <= -3.2e-78) {
tmp = t_1;
} else if (a <= -3.1e-161) {
tmp = x + (b * ((y + t) - 2.0));
} else if (a <= 2.3e-248) {
tmp = t_1;
} else if (a <= 4e-184) {
tmp = y * (b - z);
} else if (a <= 1.32e+150) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + z) - (b * (2.0 - t)) t_2 = x + (a - (t * a)) tmp = 0 if a <= -1e+54: tmp = t_2 elif a <= -3.2e-78: tmp = t_1 elif a <= -3.1e-161: tmp = x + (b * ((y + t) - 2.0)) elif a <= 2.3e-248: tmp = t_1 elif a <= 4e-184: tmp = y * (b - z) elif a <= 1.32e+150: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + z) - Float64(b * Float64(2.0 - t))) t_2 = Float64(x + Float64(a - Float64(t * a))) tmp = 0.0 if (a <= -1e+54) tmp = t_2; elseif (a <= -3.2e-78) tmp = t_1; elseif (a <= -3.1e-161) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); elseif (a <= 2.3e-248) tmp = t_1; elseif (a <= 4e-184) tmp = Float64(y * Float64(b - z)); elseif (a <= 1.32e+150) 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 * (2.0 - t)); t_2 = x + (a - (t * a)); tmp = 0.0; if (a <= -1e+54) tmp = t_2; elseif (a <= -3.2e-78) tmp = t_1; elseif (a <= -3.1e-161) tmp = x + (b * ((y + t) - 2.0)); elseif (a <= 2.3e-248) tmp = t_1; elseif (a <= 4e-184) tmp = y * (b - z); elseif (a <= 1.32e+150) 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[(x + z), $MachinePrecision] - N[(b * N[(2.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1e+54], t$95$2, If[LessEqual[a, -3.2e-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, 2.3e-248], t$95$1, If[LessEqual[a, 4e-184], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.32e+150], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + z\right) - b \cdot \left(2 - t\right)\\
t_2 := x + \left(a - t \cdot a\right)\\
\mathbf{if}\;a \leq -1 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.2 \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 2.3 \cdot 10^{-248}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-184}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;a \leq 1.32 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.0000000000000001e54 or 1.32e150 < a Initial program 96.6%
Taylor expanded in y around 0 96.6%
mul-1-neg96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in b around 0 85.4%
Taylor expanded in z around 0 75.7%
sub-neg75.7%
metadata-eval75.7%
*-commutative75.7%
distribute-rgt-in75.7%
mul-1-neg75.7%
unsub-neg75.7%
Simplified75.7%
if -1.0000000000000001e54 < a < -3.2e-78 or -3.0999999999999999e-161 < a < 2.3e-248 or 4.0000000000000002e-184 < a < 1.32e150Initial program 97.6%
Taylor expanded in y around 0 97.6%
mul-1-neg97.6%
unsub-neg97.6%
Simplified97.6%
Taylor expanded in y around 0 76.2%
Taylor expanded in a around 0 66.0%
if -3.2e-78 < a < -3.0999999999999999e-161Initial program 95.6%
Taylor expanded in a around 0 89.2%
Taylor expanded in z around 0 80.7%
if 2.3e-248 < 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 (+ (* a (- 1.0 t)) (* z (- 1.0 y)))))
(t_2 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -1.1e+132)
t_2
(if (<= b 2.7e+31)
t_1
(if (<= b 2.1e+131)
(+ a (+ z (+ x (* b (- y 2.0)))))
(if (<= b 1.1e+149) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.1e+132) {
tmp = t_2;
} else if (b <= 2.7e+31) {
tmp = t_1;
} else if (b <= 2.1e+131) {
tmp = a + (z + (x + (b * (y - 2.0))));
} else if (b <= 1.1e+149) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((a * (1.0d0 - t)) + (z * (1.0d0 - y)))
t_2 = x + (b * ((y + t) - 2.0d0))
if (b <= (-1.1d+132)) then
tmp = t_2
else if (b <= 2.7d+31) then
tmp = t_1
else if (b <= 2.1d+131) then
tmp = a + (z + (x + (b * (y - 2.0d0))))
else if (b <= 1.1d+149) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.1e+132) {
tmp = t_2;
} else if (b <= 2.7e+31) {
tmp = t_1;
} else if (b <= 2.1e+131) {
tmp = a + (z + (x + (b * (y - 2.0))));
} else if (b <= 1.1e+149) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((a * (1.0 - t)) + (z * (1.0 - y))) t_2 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -1.1e+132: tmp = t_2 elif b <= 2.7e+31: tmp = t_1 elif b <= 2.1e+131: tmp = a + (z + (x + (b * (y - 2.0)))) elif b <= 1.1e+149: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z * Float64(1.0 - y)))) t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -1.1e+132) tmp = t_2; elseif (b <= 2.7e+31) tmp = t_1; elseif (b <= 2.1e+131) tmp = Float64(a + Float64(z + Float64(x + Float64(b * Float64(y - 2.0))))); elseif (b <= 1.1e+149) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((a * (1.0 - t)) + (z * (1.0 - y))); t_2 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -1.1e+132) tmp = t_2; elseif (b <= 2.7e+31) tmp = t_1; elseif (b <= 2.1e+131) tmp = a + (z + (x + (b * (y - 2.0)))); elseif (b <= 1.1e+149) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.1e+132], t$95$2, If[LessEqual[b, 2.7e+31], t$95$1, If[LessEqual[b, 2.1e+131], N[(a + N[(z + N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e+149], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.1 \cdot 10^{+132}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{+131}:\\
\;\;\;\;a + \left(z + \left(x + b \cdot \left(y - 2\right)\right)\right)\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{+149}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -1.09999999999999994e132 or 1.1e149 < b Initial program 93.1%
Taylor expanded in a around 0 88.9%
Taylor expanded in z around 0 89.3%
if -1.09999999999999994e132 < b < 2.69999999999999986e31 or 2.09999999999999985e131 < b < 1.1e149Initial program 98.7%
Taylor expanded in b around 0 86.1%
if 2.69999999999999986e31 < b < 2.09999999999999985e131Initial program 100.0%
+-commutative100.0%
fma-def100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
sub-neg100.0%
associate-+l-100.0%
fma-neg100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 88.9%
+-commutative88.9%
sub-neg88.9%
metadata-eval88.9%
mul-1-neg88.9%
unsub-neg88.9%
*-commutative88.9%
distribute-lft-in88.9%
*-commutative88.9%
neg-mul-188.9%
unsub-neg88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in t around 0 75.9%
Final simplification86.3%
(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)
(+ (+ z (+ x (* b (- t 2.0)))) 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 = (z + (x + (b * (t - 2.0)))) + 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 = (z + (x + (b * (t - 2.0d0)))) + 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 = (z + (x + (b * (t - 2.0)))) + 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 = (z + (x + (b * (t - 2.0)))) + 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(z + Float64(x + Float64(b * Float64(t - 2.0)))) + 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 = (z + (x + (b * (t - 2.0)))) + 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[(z + N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $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(z + \left(x + b \cdot \left(t - 2\right)\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%
mul-1-neg99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in y around 0 97.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 (+ x (* z (- 1.0 y))))
(t_2 (* b (- (+ y t) 2.0)))
(t_3 (* a (- 1.0 t))))
(if (<= b -3.4e+117)
t_2
(if (<= b -1.65e-79)
t_1
(if (<= b -9.8e-138)
t_3
(if (<= b 1.42e-213)
t_1
(if (<= b 4e-184) t_3 (if (<= b 8e+86) 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 = a * (1.0 - t);
double tmp;
if (b <= -3.4e+117) {
tmp = t_2;
} else if (b <= -1.65e-79) {
tmp = t_1;
} else if (b <= -9.8e-138) {
tmp = t_3;
} else if (b <= 1.42e-213) {
tmp = t_1;
} else if (b <= 4e-184) {
tmp = t_3;
} else if (b <= 8e+86) {
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 = a * (1.0d0 - t)
if (b <= (-3.4d+117)) then
tmp = t_2
else if (b <= (-1.65d-79)) then
tmp = t_1
else if (b <= (-9.8d-138)) then
tmp = t_3
else if (b <= 1.42d-213) then
tmp = t_1
else if (b <= 4d-184) then
tmp = t_3
else if (b <= 8d+86) 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 = a * (1.0 - t);
double tmp;
if (b <= -3.4e+117) {
tmp = t_2;
} else if (b <= -1.65e-79) {
tmp = t_1;
} else if (b <= -9.8e-138) {
tmp = t_3;
} else if (b <= 1.42e-213) {
tmp = t_1;
} else if (b <= 4e-184) {
tmp = t_3;
} else if (b <= 8e+86) {
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 = a * (1.0 - t) tmp = 0 if b <= -3.4e+117: tmp = t_2 elif b <= -1.65e-79: tmp = t_1 elif b <= -9.8e-138: tmp = t_3 elif b <= 1.42e-213: tmp = t_1 elif b <= 4e-184: tmp = t_3 elif b <= 8e+86: 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(a * Float64(1.0 - t)) tmp = 0.0 if (b <= -3.4e+117) tmp = t_2; elseif (b <= -1.65e-79) tmp = t_1; elseif (b <= -9.8e-138) tmp = t_3; elseif (b <= 1.42e-213) tmp = t_1; elseif (b <= 4e-184) tmp = t_3; elseif (b <= 8e+86) 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 = a * (1.0 - t); tmp = 0.0; if (b <= -3.4e+117) tmp = t_2; elseif (b <= -1.65e-79) tmp = t_1; elseif (b <= -9.8e-138) tmp = t_3; elseif (b <= 1.42e-213) tmp = t_1; elseif (b <= 4e-184) tmp = t_3; elseif (b <= 8e+86) 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[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.4e+117], t$95$2, If[LessEqual[b, -1.65e-79], t$95$1, If[LessEqual[b, -9.8e-138], t$95$3, If[LessEqual[b, 1.42e-213], t$95$1, If[LessEqual[b, 4e-184], t$95$3, If[LessEqual[b, 8e+86], 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 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -3.4 \cdot 10^{+117}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -1.65 \cdot 10^{-79}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -9.8 \cdot 10^{-138}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 1.42 \cdot 10^{-213}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 4 \cdot 10^{-184}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+86}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -3.4000000000000001e117 or 8.0000000000000001e86 < b Initial program 92.3%
Taylor expanded in b around inf 75.4%
if -3.4000000000000001e117 < b < -1.6499999999999999e-79 or -9.80000000000000033e-138 < b < 1.42000000000000002e-213 or 4.0000000000000002e-184 < b < 8.0000000000000001e86Initial program 99.9%
Taylor expanded in a around 0 68.1%
Taylor expanded in b around 0 53.8%
if -1.6499999999999999e-79 < b < -9.80000000000000033e-138 or 1.42000000000000002e-213 < b < 4.0000000000000002e-184Initial program 100.0%
Taylor expanded in a around inf 77.9%
Final simplification63.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (- a (* t a))))
(t_2 (* b (- (+ y t) 2.0)))
(t_3 (+ x (* z (- 1.0 y)))))
(if (<= b -2.8e+56)
t_2
(if (<= b -2.15e-138)
t_1
(if (<= b -1.05e-223)
t_3
(if (<= b 1.22e-144)
t_1
(if (<= b 2.05e-76) t_3 (if (<= b 4.2e+84) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a - (t * a));
double t_2 = b * ((y + t) - 2.0);
double t_3 = x + (z * (1.0 - y));
double tmp;
if (b <= -2.8e+56) {
tmp = t_2;
} else if (b <= -2.15e-138) {
tmp = t_1;
} else if (b <= -1.05e-223) {
tmp = t_3;
} else if (b <= 1.22e-144) {
tmp = t_1;
} else if (b <= 2.05e-76) {
tmp = t_3;
} else if (b <= 4.2e+84) {
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 + (a - (t * a))
t_2 = b * ((y + t) - 2.0d0)
t_3 = x + (z * (1.0d0 - y))
if (b <= (-2.8d+56)) then
tmp = t_2
else if (b <= (-2.15d-138)) then
tmp = t_1
else if (b <= (-1.05d-223)) then
tmp = t_3
else if (b <= 1.22d-144) then
tmp = t_1
else if (b <= 2.05d-76) then
tmp = t_3
else if (b <= 4.2d+84) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a - (t * a));
double t_2 = b * ((y + t) - 2.0);
double t_3 = x + (z * (1.0 - y));
double tmp;
if (b <= -2.8e+56) {
tmp = t_2;
} else if (b <= -2.15e-138) {
tmp = t_1;
} else if (b <= -1.05e-223) {
tmp = t_3;
} else if (b <= 1.22e-144) {
tmp = t_1;
} else if (b <= 2.05e-76) {
tmp = t_3;
} else if (b <= 4.2e+84) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a - (t * a)) t_2 = b * ((y + t) - 2.0) t_3 = x + (z * (1.0 - y)) tmp = 0 if b <= -2.8e+56: tmp = t_2 elif b <= -2.15e-138: tmp = t_1 elif b <= -1.05e-223: tmp = t_3 elif b <= 1.22e-144: tmp = t_1 elif b <= 2.05e-76: tmp = t_3 elif b <= 4.2e+84: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a - Float64(t * a))) t_2 = Float64(b * Float64(Float64(y + t) - 2.0)) t_3 = Float64(x + Float64(z * Float64(1.0 - y))) tmp = 0.0 if (b <= -2.8e+56) tmp = t_2; elseif (b <= -2.15e-138) tmp = t_1; elseif (b <= -1.05e-223) tmp = t_3; elseif (b <= 1.22e-144) tmp = t_1; elseif (b <= 2.05e-76) tmp = t_3; elseif (b <= 4.2e+84) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a - (t * a)); t_2 = b * ((y + t) - 2.0); t_3 = x + (z * (1.0 - y)); tmp = 0.0; if (b <= -2.8e+56) tmp = t_2; elseif (b <= -2.15e-138) tmp = t_1; elseif (b <= -1.05e-223) tmp = t_3; elseif (b <= 1.22e-144) tmp = t_1; elseif (b <= 2.05e-76) tmp = t_3; elseif (b <= 4.2e+84) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a - N[(t * a), $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[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.8e+56], t$95$2, If[LessEqual[b, -2.15e-138], t$95$1, If[LessEqual[b, -1.05e-223], t$95$3, If[LessEqual[b, 1.22e-144], t$95$1, If[LessEqual[b, 2.05e-76], t$95$3, If[LessEqual[b, 4.2e+84], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(a - t \cdot a\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_3 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -2.8 \cdot 10^{+56}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2.15 \cdot 10^{-138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.05 \cdot 10^{-223}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 1.22 \cdot 10^{-144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{-76}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -2.80000000000000008e56 or 4.20000000000000037e84 < b Initial program 93.4%
Taylor expanded in b around inf 70.1%
if -2.80000000000000008e56 < b < -2.15e-138 or -1.04999999999999991e-223 < b < 1.22e-144 or 2.0499999999999999e-76 < b < 4.20000000000000037e84Initial program 100.0%
Taylor expanded in y around 0 100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in b around 0 89.4%
Taylor expanded in z around 0 63.2%
sub-neg63.2%
metadata-eval63.2%
*-commutative63.2%
distribute-rgt-in63.2%
mul-1-neg63.2%
unsub-neg63.2%
Simplified63.2%
if -2.15e-138 < b < -1.04999999999999991e-223 or 1.22e-144 < b < 2.0499999999999999e-76Initial program 99.9%
Taylor expanded in a around 0 77.5%
Taylor expanded in b around 0 64.6%
Final simplification66.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (+ z (+ x (* b (- y 2.0)))))) (t_2 (* t (- b a))))
(if (<= t -4.6e+106)
t_2
(if (<= t 2.3e-301)
t_1
(if (<= t 5.5e-231)
(- (+ x z) (- (* y z) a))
(if (<= t 7e+48) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z + (x + (b * (y - 2.0))));
double t_2 = t * (b - a);
double tmp;
if (t <= -4.6e+106) {
tmp = t_2;
} else if (t <= 2.3e-301) {
tmp = t_1;
} else if (t <= 5.5e-231) {
tmp = (x + z) - ((y * z) - a);
} else if (t <= 7e+48) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a + (z + (x + (b * (y - 2.0d0))))
t_2 = t * (b - a)
if (t <= (-4.6d+106)) then
tmp = t_2
else if (t <= 2.3d-301) then
tmp = t_1
else if (t <= 5.5d-231) then
tmp = (x + z) - ((y * z) - a)
else if (t <= 7d+48) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z + (x + (b * (y - 2.0))));
double t_2 = t * (b - a);
double tmp;
if (t <= -4.6e+106) {
tmp = t_2;
} else if (t <= 2.3e-301) {
tmp = t_1;
} else if (t <= 5.5e-231) {
tmp = (x + z) - ((y * z) - a);
} else if (t <= 7e+48) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (z + (x + (b * (y - 2.0)))) t_2 = t * (b - a) tmp = 0 if t <= -4.6e+106: tmp = t_2 elif t <= 2.3e-301: tmp = t_1 elif t <= 5.5e-231: tmp = (x + z) - ((y * z) - a) elif t <= 7e+48: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(z + Float64(x + Float64(b * Float64(y - 2.0))))) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -4.6e+106) tmp = t_2; elseif (t <= 2.3e-301) tmp = t_1; elseif (t <= 5.5e-231) tmp = Float64(Float64(x + z) - Float64(Float64(y * z) - a)); elseif (t <= 7e+48) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (z + (x + (b * (y - 2.0)))); t_2 = t * (b - a); tmp = 0.0; if (t <= -4.6e+106) tmp = t_2; elseif (t <= 2.3e-301) tmp = t_1; elseif (t <= 5.5e-231) tmp = (x + z) - ((y * z) - a); elseif (t <= 7e+48) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z + N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e+106], t$95$2, If[LessEqual[t, 2.3e-301], t$95$1, If[LessEqual[t, 5.5e-231], N[(N[(x + z), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+48], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z + \left(x + b \cdot \left(y - 2\right)\right)\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{+106}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-301}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-231}:\\
\;\;\;\;\left(x + z\right) - \left(y \cdot z - a\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+48}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -4.6000000000000004e106 or 6.9999999999999995e48 < t Initial program 94.9%
Taylor expanded in t around inf 73.0%
if -4.6000000000000004e106 < t < 2.3000000000000002e-301 or 5.49999999999999951e-231 < t < 6.9999999999999995e48Initial program 98.5%
+-commutative98.5%
fma-def99.3%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
sub-neg99.3%
associate-+l-99.3%
fma-neg99.3%
sub-neg99.3%
metadata-eval99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around 0 87.7%
+-commutative87.7%
sub-neg87.7%
metadata-eval87.7%
mul-1-neg87.7%
unsub-neg87.7%
*-commutative87.7%
distribute-lft-in87.7%
*-commutative87.7%
neg-mul-187.7%
unsub-neg87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in t around 0 79.7%
if 2.3000000000000002e-301 < t < 5.49999999999999951e-231Initial program 100.0%
Taylor expanded in y around 0 99.9%
mul-1-neg99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in b around 0 89.6%
Taylor expanded in t around 0 89.6%
neg-mul-189.6%
Simplified89.6%
Final simplification77.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (+ z (+ x (* b (- y 2.0))))))
(t_2 (- (* b (- (+ y t) 2.0)) (* t a))))
(if (<= t -1.12e+17)
t_2
(if (<= t 1.15e-303)
t_1
(if (<= t 2.06e-224)
(- (+ x z) (- (* y z) a))
(if (<= t 2.6e+45) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z + (x + (b * (y - 2.0))));
double t_2 = (b * ((y + t) - 2.0)) - (t * a);
double tmp;
if (t <= -1.12e+17) {
tmp = t_2;
} else if (t <= 1.15e-303) {
tmp = t_1;
} else if (t <= 2.06e-224) {
tmp = (x + z) - ((y * z) - a);
} else if (t <= 2.6e+45) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a + (z + (x + (b * (y - 2.0d0))))
t_2 = (b * ((y + t) - 2.0d0)) - (t * a)
if (t <= (-1.12d+17)) then
tmp = t_2
else if (t <= 1.15d-303) then
tmp = t_1
else if (t <= 2.06d-224) then
tmp = (x + z) - ((y * z) - a)
else if (t <= 2.6d+45) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z + (x + (b * (y - 2.0))));
double t_2 = (b * ((y + t) - 2.0)) - (t * a);
double tmp;
if (t <= -1.12e+17) {
tmp = t_2;
} else if (t <= 1.15e-303) {
tmp = t_1;
} else if (t <= 2.06e-224) {
tmp = (x + z) - ((y * z) - a);
} else if (t <= 2.6e+45) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (z + (x + (b * (y - 2.0)))) t_2 = (b * ((y + t) - 2.0)) - (t * a) tmp = 0 if t <= -1.12e+17: tmp = t_2 elif t <= 1.15e-303: tmp = t_1 elif t <= 2.06e-224: tmp = (x + z) - ((y * z) - a) elif t <= 2.6e+45: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(z + Float64(x + Float64(b * Float64(y - 2.0))))) t_2 = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) - Float64(t * a)) tmp = 0.0 if (t <= -1.12e+17) tmp = t_2; elseif (t <= 1.15e-303) tmp = t_1; elseif (t <= 2.06e-224) tmp = Float64(Float64(x + z) - Float64(Float64(y * z) - a)); elseif (t <= 2.6e+45) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (z + (x + (b * (y - 2.0)))); t_2 = (b * ((y + t) - 2.0)) - (t * a); tmp = 0.0; if (t <= -1.12e+17) tmp = t_2; elseif (t <= 1.15e-303) tmp = t_1; elseif (t <= 2.06e-224) tmp = (x + z) - ((y * z) - a); elseif (t <= 2.6e+45) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z + N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.12e+17], t$95$2, If[LessEqual[t, 1.15e-303], t$95$1, If[LessEqual[t, 2.06e-224], N[(N[(x + z), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+45], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z + \left(x + b \cdot \left(y - 2\right)\right)\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\
\mathbf{if}\;t \leq -1.12 \cdot 10^{+17}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-303}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.06 \cdot 10^{-224}:\\
\;\;\;\;\left(x + z\right) - \left(y \cdot z - a\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.12e17 or 2.60000000000000007e45 < t Initial program 94.9%
Taylor expanded in y around 0 95.0%
mul-1-neg95.0%
unsub-neg95.0%
Simplified95.0%
Taylor expanded in t around inf 72.9%
associate-*r*72.9%
neg-mul-172.9%
Simplified72.9%
if -1.12e17 < t < 1.14999999999999998e-303 or 2.0599999999999999e-224 < t < 2.60000000000000007e45Initial program 99.1%
+-commutative99.1%
fma-def100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
sub-neg100.0%
associate-+l-100.0%
fma-neg100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 87.3%
+-commutative87.3%
sub-neg87.3%
metadata-eval87.3%
mul-1-neg87.3%
unsub-neg87.3%
*-commutative87.3%
distribute-lft-in87.3%
*-commutative87.3%
neg-mul-187.3%
unsub-neg87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in t around 0 83.9%
if 1.14999999999999998e-303 < t < 2.0599999999999999e-224Initial program 100.0%
Taylor expanded in y around 0 99.9%
mul-1-neg99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in b around 0 89.6%
Taylor expanded in t around 0 89.6%
neg-mul-189.6%
Simplified89.6%
Final simplification79.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.35e+87) (not (<= y 6.2e+84))) (* y (- b z)) (+ (+ z (+ x (* b (- t 2.0)))) (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.35e+87) || !(y <= 6.2e+84)) {
tmp = y * (b - z);
} else {
tmp = (z + (x + (b * (t - 2.0)))) + (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 ((y <= (-2.35d+87)) .or. (.not. (y <= 6.2d+84))) then
tmp = y * (b - z)
else
tmp = (z + (x + (b * (t - 2.0d0)))) + (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 ((y <= -2.35e+87) || !(y <= 6.2e+84)) {
tmp = y * (b - z);
} else {
tmp = (z + (x + (b * (t - 2.0)))) + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.35e+87) or not (y <= 6.2e+84): tmp = y * (b - z) else: tmp = (z + (x + (b * (t - 2.0)))) + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.35e+87) || !(y <= 6.2e+84)) tmp = Float64(y * Float64(b - z)); else tmp = Float64(Float64(z + Float64(x + Float64(b * Float64(t - 2.0)))) + Float64(a * Float64(1.0 - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.35e+87) || ~((y <= 6.2e+84))) tmp = y * (b - z); else tmp = (z + (x + (b * (t - 2.0)))) + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.35e+87], N[Not[LessEqual[y, 6.2e+84]], $MachinePrecision]], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+87} \lor \neg \left(y \leq 6.2 \cdot 10^{+84}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(x + b \cdot \left(t - 2\right)\right)\right) + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if y < -2.3500000000000002e87 or 6.20000000000000006e84 < y Initial program 94.5%
Taylor expanded in y around inf 74.0%
if -2.3500000000000002e87 < y < 6.20000000000000006e84Initial program 98.8%
Taylor expanded in y around 0 98.8%
mul-1-neg98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in y around 0 94.8%
Final simplification87.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.06e+88) (not (<= y 6.8e+69))) (+ (+ x (* b (- (+ y t) 2.0))) (* z (- 1.0 y))) (+ (+ z (+ x (* b (- t 2.0)))) (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.06e+88) || !(y <= 6.8e+69)) {
tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y));
} else {
tmp = (z + (x + (b * (t - 2.0)))) + (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 ((y <= (-1.06d+88)) .or. (.not. (y <= 6.8d+69))) then
tmp = (x + (b * ((y + t) - 2.0d0))) + (z * (1.0d0 - y))
else
tmp = (z + (x + (b * (t - 2.0d0)))) + (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 ((y <= -1.06e+88) || !(y <= 6.8e+69)) {
tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y));
} else {
tmp = (z + (x + (b * (t - 2.0)))) + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.06e+88) or not (y <= 6.8e+69): tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y)) else: tmp = (z + (x + (b * (t - 2.0)))) + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.06e+88) || !(y <= 6.8e+69)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + Float64(z * Float64(1.0 - y))); else tmp = Float64(Float64(z + Float64(x + Float64(b * Float64(t - 2.0)))) + Float64(a * Float64(1.0 - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.06e+88) || ~((y <= 6.8e+69))) tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y)); else tmp = (z + (x + (b * (t - 2.0)))) + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.06e+88], N[Not[LessEqual[y, 6.8e+69]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+88} \lor \neg \left(y \leq 6.8 \cdot 10^{+69}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(x + b \cdot \left(t - 2\right)\right)\right) + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if y < -1.06000000000000001e88 or 6.79999999999999973e69 < y Initial program 94.6%
Taylor expanded in a around 0 81.9%
if -1.06000000000000001e88 < y < 6.79999999999999973e69Initial program 98.7%
Taylor expanded in y around 0 98.7%
mul-1-neg98.7%
unsub-neg98.7%
Simplified98.7%
Taylor expanded in y around 0 95.3%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (<= a -9e-35)
t_1
(if (<= a 1.5e-239)
(+ x z)
(if (<= a 6e-184)
(* y b)
(if (<= a 4.5e+24)
(+ x z)
(if (<= a 3.4e+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 <= -9e-35) {
tmp = t_1;
} else if (a <= 1.5e-239) {
tmp = x + z;
} else if (a <= 6e-184) {
tmp = y * b;
} else if (a <= 4.5e+24) {
tmp = x + z;
} else if (a <= 3.4e+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 <= (-9d-35)) then
tmp = t_1
else if (a <= 1.5d-239) then
tmp = x + z
else if (a <= 6d-184) then
tmp = y * b
else if (a <= 4.5d+24) then
tmp = x + z
else if (a <= 3.4d+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 <= -9e-35) {
tmp = t_1;
} else if (a <= 1.5e-239) {
tmp = x + z;
} else if (a <= 6e-184) {
tmp = y * b;
} else if (a <= 4.5e+24) {
tmp = x + z;
} else if (a <= 3.4e+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 <= -9e-35: tmp = t_1 elif a <= 1.5e-239: tmp = x + z elif a <= 6e-184: tmp = y * b elif a <= 4.5e+24: tmp = x + z elif a <= 3.4e+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 <= -9e-35) tmp = t_1; elseif (a <= 1.5e-239) tmp = Float64(x + z); elseif (a <= 6e-184) tmp = Float64(y * b); elseif (a <= 4.5e+24) tmp = Float64(x + z); elseif (a <= 3.4e+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 <= -9e-35) tmp = t_1; elseif (a <= 1.5e-239) tmp = x + z; elseif (a <= 6e-184) tmp = y * b; elseif (a <= 4.5e+24) tmp = x + z; elseif (a <= 3.4e+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, -9e-35], t$95$1, If[LessEqual[a, 1.5e-239], N[(x + z), $MachinePrecision], If[LessEqual[a, 6e-184], N[(y * b), $MachinePrecision], If[LessEqual[a, 4.5e+24], N[(x + z), $MachinePrecision], If[LessEqual[a, 3.4e+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 -9 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-239}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-184}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{+24}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;a \leq 3.4 \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 < -9.0000000000000002e-35 or 4.60000000000000001e146 < a Initial program 97.1%
Taylor expanded in a around inf 62.1%
if -9.0000000000000002e-35 < a < 1.4999999999999999e-239 or 5.99999999999999982e-184 < a < 4.50000000000000019e24Initial program 97.3%
Taylor expanded in a around 0 90.2%
Taylor expanded in b around 0 53.8%
Taylor expanded in y around 0 38.5%
sub-neg38.5%
neg-mul-138.5%
remove-double-neg38.5%
Simplified38.5%
if 1.4999999999999999e-239 < a < 5.99999999999999982e-184Initial program 100.0%
Taylor expanded in y around inf 90.3%
Taylor expanded in b around inf 55.1%
if 4.50000000000000019e24 < a < 3.39999999999999991e146Initial program 95.2%
Taylor expanded in a around 0 86.1%
Taylor expanded in t around inf 44.0%
if 3.39999999999999991e146 < 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 (* a (- 1.0 t))) (t_2 (* t (- b a))))
(if (<= t -6.6e+16)
t_2
(if (<= t -1.6e-95)
(+ x z)
(if (<= t -9.5e-188)
t_1
(if (<= t 1.5e-50)
(+ x z)
(if (<= t 170000.0)
t_1
(if (<= t 9200000000000.0) (+ 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 = t * (b - a);
double tmp;
if (t <= -6.6e+16) {
tmp = t_2;
} else if (t <= -1.6e-95) {
tmp = x + z;
} else if (t <= -9.5e-188) {
tmp = t_1;
} else if (t <= 1.5e-50) {
tmp = x + z;
} else if (t <= 170000.0) {
tmp = t_1;
} else if (t <= 9200000000000.0) {
tmp = x + z;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (1.0d0 - t)
t_2 = t * (b - a)
if (t <= (-6.6d+16)) then
tmp = t_2
else if (t <= (-1.6d-95)) then
tmp = x + z
else if (t <= (-9.5d-188)) then
tmp = t_1
else if (t <= 1.5d-50) then
tmp = x + z
else if (t <= 170000.0d0) then
tmp = t_1
else if (t <= 9200000000000.0d0) then
tmp = x + z
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = t * (b - a);
double tmp;
if (t <= -6.6e+16) {
tmp = t_2;
} else if (t <= -1.6e-95) {
tmp = x + z;
} else if (t <= -9.5e-188) {
tmp = t_1;
} else if (t <= 1.5e-50) {
tmp = x + z;
} else if (t <= 170000.0) {
tmp = t_1;
} else if (t <= 9200000000000.0) {
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 = t * (b - a) tmp = 0 if t <= -6.6e+16: tmp = t_2 elif t <= -1.6e-95: tmp = x + z elif t <= -9.5e-188: tmp = t_1 elif t <= 1.5e-50: tmp = x + z elif t <= 170000.0: tmp = t_1 elif t <= 9200000000000.0: 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(t * Float64(b - a)) tmp = 0.0 if (t <= -6.6e+16) tmp = t_2; elseif (t <= -1.6e-95) tmp = Float64(x + z); elseif (t <= -9.5e-188) tmp = t_1; elseif (t <= 1.5e-50) tmp = Float64(x + z); elseif (t <= 170000.0) tmp = t_1; elseif (t <= 9200000000000.0) tmp = Float64(x + z); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = t * (b - a); tmp = 0.0; if (t <= -6.6e+16) tmp = t_2; elseif (t <= -1.6e-95) tmp = x + z; elseif (t <= -9.5e-188) tmp = t_1; elseif (t <= 1.5e-50) tmp = x + z; elseif (t <= 170000.0) tmp = t_1; elseif (t <= 9200000000000.0) tmp = x + z; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.6e+16], t$95$2, If[LessEqual[t, -1.6e-95], N[(x + z), $MachinePrecision], If[LessEqual[t, -9.5e-188], t$95$1, If[LessEqual[t, 1.5e-50], N[(x + z), $MachinePrecision], If[LessEqual[t, 170000.0], t$95$1, If[LessEqual[t, 9200000000000.0], N[(x + z), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{+16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-95}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-188}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-50}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 170000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9200000000000:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -6.6e16 or 9.2e12 < t Initial program 95.2%
Taylor expanded in t around inf 66.0%
if -6.6e16 < t < -1.5999999999999999e-95 or -9.50000000000000063e-188 < t < 1.49999999999999995e-50 or 1.7e5 < t < 9.2e12Initial program 100.0%
Taylor expanded in a around 0 86.8%
Taylor expanded in b around 0 54.2%
Taylor expanded in y around 0 38.6%
sub-neg38.6%
neg-mul-138.6%
remove-double-neg38.6%
Simplified38.6%
if -1.5999999999999999e-95 < t < -9.50000000000000063e-188 or 1.49999999999999995e-50 < t < 1.7e5Initial program 97.4%
Taylor expanded in a around inf 38.7%
Final simplification52.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))) (t_2 (* y (- b z))))
(if (<= y -1.2e+87)
t_2
(if (<= y -4.1e+14)
t_1
(if (<= y -1.02e-20)
(+ x z)
(if (<= y -1.9e-70)
t_1
(if (<= y 8.2e-224)
(+ x z)
(if (<= y 2.35e+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 <= -1.2e+87) {
tmp = t_2;
} else if (y <= -4.1e+14) {
tmp = t_1;
} else if (y <= -1.02e-20) {
tmp = x + z;
} else if (y <= -1.9e-70) {
tmp = t_1;
} else if (y <= 8.2e-224) {
tmp = x + z;
} else if (y <= 2.35e+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 <= (-1.2d+87)) then
tmp = t_2
else if (y <= (-4.1d+14)) then
tmp = t_1
else if (y <= (-1.02d-20)) then
tmp = x + z
else if (y <= (-1.9d-70)) then
tmp = t_1
else if (y <= 8.2d-224) then
tmp = x + z
else if (y <= 2.35d+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 <= -1.2e+87) {
tmp = t_2;
} else if (y <= -4.1e+14) {
tmp = t_1;
} else if (y <= -1.02e-20) {
tmp = x + z;
} else if (y <= -1.9e-70) {
tmp = t_1;
} else if (y <= 8.2e-224) {
tmp = x + z;
} else if (y <= 2.35e+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 <= -1.2e+87: tmp = t_2 elif y <= -4.1e+14: tmp = t_1 elif y <= -1.02e-20: tmp = x + z elif y <= -1.9e-70: tmp = t_1 elif y <= 8.2e-224: tmp = x + z elif y <= 2.35e+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 <= -1.2e+87) tmp = t_2; elseif (y <= -4.1e+14) tmp = t_1; elseif (y <= -1.02e-20) tmp = Float64(x + z); elseif (y <= -1.9e-70) tmp = t_1; elseif (y <= 8.2e-224) tmp = Float64(x + z); elseif (y <= 2.35e+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 <= -1.2e+87) tmp = t_2; elseif (y <= -4.1e+14) tmp = t_1; elseif (y <= -1.02e-20) tmp = x + z; elseif (y <= -1.9e-70) tmp = t_1; elseif (y <= 8.2e-224) tmp = x + z; elseif (y <= 2.35e+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, -1.2e+87], t$95$2, If[LessEqual[y, -4.1e+14], t$95$1, If[LessEqual[y, -1.02e-20], N[(x + z), $MachinePrecision], If[LessEqual[y, -1.9e-70], t$95$1, If[LessEqual[y, 8.2e-224], N[(x + z), $MachinePrecision], If[LessEqual[y, 2.35e+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 -1.2 \cdot 10^{+87}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-20}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-224}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{+70}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.19999999999999991e87 or 2.3499999999999999e70 < y Initial program 94.6%
Taylor expanded in y around inf 73.5%
if -1.19999999999999991e87 < y < -4.1e14 or -1.02000000000000001e-20 < y < -1.8999999999999999e-70Initial program 97.1%
Taylor expanded in t around inf 63.7%
if -4.1e14 < y < -1.02000000000000001e-20 or -1.8999999999999999e-70 < y < 8.19999999999999972e-224Initial program 98.7%
Taylor expanded in a around 0 74.7%
Taylor expanded in b around 0 52.9%
Taylor expanded in y around 0 51.3%
sub-neg51.3%
neg-mul-151.3%
remove-double-neg51.3%
Simplified51.3%
if 8.19999999999999972e-224 < y < 2.3499999999999999e70Initial program 100.0%
Taylor expanded in a around inf 52.6%
Final simplification61.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -8.5e+56)
t_1
(if (<= b -3.5e+43)
(- (+ x z) (- (* y z) a))
(if (or (<= b -2.55e+38) (not (<= b 9.5e+45)))
t_1
(- (+ x (+ z a)) (* t a)))))))
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 <= -8.5e+56) {
tmp = t_1;
} else if (b <= -3.5e+43) {
tmp = (x + z) - ((y * z) - a);
} else if ((b <= -2.55e+38) || !(b <= 9.5e+45)) {
tmp = t_1;
} else {
tmp = (x + (z + a)) - (t * 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) :: t_1
real(8) :: tmp
t_1 = x + (b * ((y + t) - 2.0d0))
if (b <= (-8.5d+56)) then
tmp = t_1
else if (b <= (-3.5d+43)) then
tmp = (x + z) - ((y * z) - a)
else if ((b <= (-2.55d+38)) .or. (.not. (b <= 9.5d+45))) then
tmp = t_1
else
tmp = (x + (z + a)) - (t * a)
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 <= -8.5e+56) {
tmp = t_1;
} else if (b <= -3.5e+43) {
tmp = (x + z) - ((y * z) - a);
} else if ((b <= -2.55e+38) || !(b <= 9.5e+45)) {
tmp = t_1;
} else {
tmp = (x + (z + a)) - (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -8.5e+56: tmp = t_1 elif b <= -3.5e+43: tmp = (x + z) - ((y * z) - a) elif (b <= -2.55e+38) or not (b <= 9.5e+45): tmp = t_1 else: tmp = (x + (z + a)) - (t * a) 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 <= -8.5e+56) tmp = t_1; elseif (b <= -3.5e+43) tmp = Float64(Float64(x + z) - Float64(Float64(y * z) - a)); elseif ((b <= -2.55e+38) || !(b <= 9.5e+45)) tmp = t_1; else tmp = Float64(Float64(x + Float64(z + a)) - Float64(t * a)); 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 <= -8.5e+56) tmp = t_1; elseif (b <= -3.5e+43) tmp = (x + z) - ((y * z) - a); elseif ((b <= -2.55e+38) || ~((b <= 9.5e+45))) tmp = t_1; else tmp = (x + (z + a)) - (t * a); 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, -8.5e+56], t$95$1, If[LessEqual[b, -3.5e+43], N[(N[(x + z), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, -2.55e+38], N[Not[LessEqual[b, 9.5e+45]], $MachinePrecision]], t$95$1, N[(N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{+43}:\\
\;\;\;\;\left(x + z\right) - \left(y \cdot z - a\right)\\
\mathbf{elif}\;b \leq -2.55 \cdot 10^{+38} \lor \neg \left(b \leq 9.5 \cdot 10^{+45}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(z + a\right)\right) - t \cdot a\\
\end{array}
\end{array}
if b < -8.4999999999999998e56 or -3.5000000000000001e43 < b < -2.5500000000000001e38 or 9.4999999999999998e45 < b Initial program 93.8%
Taylor expanded in a around 0 83.8%
Taylor expanded in z around 0 75.8%
if -8.4999999999999998e56 < b < -3.5000000000000001e43Initial program 100.0%
Taylor expanded in y around 0 100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in t around 0 100.0%
neg-mul-1100.0%
Simplified100.0%
if -2.5500000000000001e38 < b < 9.4999999999999998e45Initial program 100.0%
+-commutative100.0%
fma-def100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
sub-neg100.0%
associate-+l-100.0%
fma-neg100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 84.9%
+-commutative84.9%
sub-neg84.9%
metadata-eval84.9%
mul-1-neg84.9%
unsub-neg84.9%
*-commutative84.9%
distribute-lft-in84.9%
*-commutative84.9%
neg-mul-184.9%
unsub-neg84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in b around 0 75.6%
associate-+r+75.6%
Simplified75.6%
Final simplification76.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ x z) (* b (- 2.0 t)))) (t_2 (+ x (- a (* t a)))))
(if (<= a -1.18e+54)
t_2
(if (<= a 1.7e-247)
t_1
(if (<= a 4e-184) (* y (- b z)) (if (<= a 8.2e+152) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + z) - (b * (2.0 - t));
double t_2 = x + (a - (t * a));
double tmp;
if (a <= -1.18e+54) {
tmp = t_2;
} else if (a <= 1.7e-247) {
tmp = t_1;
} else if (a <= 4e-184) {
tmp = y * (b - z);
} else if (a <= 8.2e+152) {
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 * (2.0d0 - t))
t_2 = x + (a - (t * a))
if (a <= (-1.18d+54)) then
tmp = t_2
else if (a <= 1.7d-247) then
tmp = t_1
else if (a <= 4d-184) then
tmp = y * (b - z)
else if (a <= 8.2d+152) 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 * (2.0 - t));
double t_2 = x + (a - (t * a));
double tmp;
if (a <= -1.18e+54) {
tmp = t_2;
} else if (a <= 1.7e-247) {
tmp = t_1;
} else if (a <= 4e-184) {
tmp = y * (b - z);
} else if (a <= 8.2e+152) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + z) - (b * (2.0 - t)) t_2 = x + (a - (t * a)) tmp = 0 if a <= -1.18e+54: tmp = t_2 elif a <= 1.7e-247: tmp = t_1 elif a <= 4e-184: tmp = y * (b - z) elif a <= 8.2e+152: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + z) - Float64(b * Float64(2.0 - t))) t_2 = Float64(x + Float64(a - Float64(t * a))) tmp = 0.0 if (a <= -1.18e+54) tmp = t_2; elseif (a <= 1.7e-247) tmp = t_1; elseif (a <= 4e-184) tmp = Float64(y * Float64(b - z)); elseif (a <= 8.2e+152) 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 * (2.0 - t)); t_2 = x + (a - (t * a)); tmp = 0.0; if (a <= -1.18e+54) tmp = t_2; elseif (a <= 1.7e-247) tmp = t_1; elseif (a <= 4e-184) tmp = y * (b - z); elseif (a <= 8.2e+152) 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[(x + z), $MachinePrecision] - N[(b * N[(2.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.18e+54], t$95$2, If[LessEqual[a, 1.7e-247], t$95$1, If[LessEqual[a, 4e-184], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e+152], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + z\right) - b \cdot \left(2 - t\right)\\
t_2 := x + \left(a - t \cdot a\right)\\
\mathbf{if}\;a \leq -1.18 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-247}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-184}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -1.1799999999999999e54 or 8.1999999999999996e152 < a Initial program 96.6%
Taylor expanded in y around 0 96.6%
mul-1-neg96.6%
unsub-neg96.6%
Simplified96.6%
Taylor expanded in b around 0 85.4%
Taylor expanded in z around 0 75.7%
sub-neg75.7%
metadata-eval75.7%
*-commutative75.7%
distribute-rgt-in75.7%
mul-1-neg75.7%
unsub-neg75.7%
Simplified75.7%
if -1.1799999999999999e54 < a < 1.7000000000000001e-247 or 4.0000000000000002e-184 < a < 8.1999999999999996e152Initial program 97.3%
Taylor expanded in y around 0 97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in y around 0 74.7%
Taylor expanded in a around 0 65.1%
if 1.7000000000000001e-247 < a < 4.0000000000000002e-184Initial program 100.0%
Taylor expanded in y around inf 85.9%
Final simplification70.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- a))))
(if (<= y -1.2e+87)
(* y b)
(if (<= y -3.2e+19)
t_1
(if (<= y -4000000000000.0)
(* t b)
(if (<= y 3.5e-222) (+ x z) (if (<= y 1.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.2e+87) {
tmp = y * b;
} else if (y <= -3.2e+19) {
tmp = t_1;
} else if (y <= -4000000000000.0) {
tmp = t * b;
} else if (y <= 3.5e-222) {
tmp = x + z;
} else if (y <= 1.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.2d+87)) then
tmp = y * b
else if (y <= (-3.2d+19)) then
tmp = t_1
else if (y <= (-4000000000000.0d0)) then
tmp = t * b
else if (y <= 3.5d-222) then
tmp = x + z
else if (y <= 1.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.2e+87) {
tmp = y * b;
} else if (y <= -3.2e+19) {
tmp = t_1;
} else if (y <= -4000000000000.0) {
tmp = t * b;
} else if (y <= 3.5e-222) {
tmp = x + z;
} else if (y <= 1.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.2e+87: tmp = y * b elif y <= -3.2e+19: tmp = t_1 elif y <= -4000000000000.0: tmp = t * b elif y <= 3.5e-222: tmp = x + z elif y <= 1.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.2e+87) tmp = Float64(y * b); elseif (y <= -3.2e+19) tmp = t_1; elseif (y <= -4000000000000.0) tmp = Float64(t * b); elseif (y <= 3.5e-222) tmp = Float64(x + z); elseif (y <= 1.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.2e+87) tmp = y * b; elseif (y <= -3.2e+19) tmp = t_1; elseif (y <= -4000000000000.0) tmp = t * b; elseif (y <= 3.5e-222) tmp = x + z; elseif (y <= 1.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.2e+87], N[(y * b), $MachinePrecision], If[LessEqual[y, -3.2e+19], t$95$1, If[LessEqual[y, -4000000000000.0], N[(t * b), $MachinePrecision], If[LessEqual[y, 3.5e-222], N[(x + z), $MachinePrecision], If[LessEqual[y, 1.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.2 \cdot 10^{+87}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4000000000000:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-222}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.19999999999999991e87 or 1.6999999999999999e84 < y Initial program 94.5%
Taylor expanded in y around inf 74.0%
Taylor expanded in b around inf 44.2%
if -1.19999999999999991e87 < y < -3.2e19 or 3.50000000000000024e-222 < y < 1.6999999999999999e84Initial program 98.6%
Taylor expanded in y around 0 98.6%
mul-1-neg98.6%
unsub-neg98.6%
Simplified98.6%
Taylor expanded in b around 0 69.6%
Taylor expanded in t around inf 34.1%
associate-*r*34.1%
mul-1-neg34.1%
Simplified34.1%
if -3.2e19 < y < -4e12Initial program 100.0%
Taylor expanded in a around 0 100.0%
Taylor expanded in t around inf 66.7%
if -4e12 < y < 3.50000000000000024e-222Initial program 98.8%
Taylor expanded in a around 0 72.5%
Taylor expanded in b around 0 49.0%
Taylor expanded in y around 0 47.5%
sub-neg47.5%
neg-mul-147.5%
remove-double-neg47.5%
Simplified47.5%
Final simplification42.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 y))) (t_2 (* t (- b a))))
(if (<= t -7.2e+15)
t_2
(if (<= t 9.5e-66)
t_1
(if (<= t 3.6e+31) (* a (- 1.0 t)) (if (<= t 4.2e+42) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - y);
double t_2 = t * (b - a);
double tmp;
if (t <= -7.2e+15) {
tmp = t_2;
} else if (t <= 9.5e-66) {
tmp = t_1;
} else if (t <= 3.6e+31) {
tmp = a * (1.0 - t);
} else if (t <= 4.2e+42) {
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 * (1.0d0 - y)
t_2 = t * (b - a)
if (t <= (-7.2d+15)) then
tmp = t_2
else if (t <= 9.5d-66) then
tmp = t_1
else if (t <= 3.6d+31) then
tmp = a * (1.0d0 - t)
else if (t <= 4.2d+42) 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 * (1.0 - y);
double t_2 = t * (b - a);
double tmp;
if (t <= -7.2e+15) {
tmp = t_2;
} else if (t <= 9.5e-66) {
tmp = t_1;
} else if (t <= 3.6e+31) {
tmp = a * (1.0 - t);
} else if (t <= 4.2e+42) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - y) t_2 = t * (b - a) tmp = 0 if t <= -7.2e+15: tmp = t_2 elif t <= 9.5e-66: tmp = t_1 elif t <= 3.6e+31: tmp = a * (1.0 - t) elif t <= 4.2e+42: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - y)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -7.2e+15) tmp = t_2; elseif (t <= 9.5e-66) tmp = t_1; elseif (t <= 3.6e+31) tmp = Float64(a * Float64(1.0 - t)); elseif (t <= 4.2e+42) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - y); t_2 = t * (b - a); tmp = 0.0; if (t <= -7.2e+15) tmp = t_2; elseif (t <= 9.5e-66) tmp = t_1; elseif (t <= 3.6e+31) tmp = a * (1.0 - t); elseif (t <= 4.2e+42) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+15], t$95$2, If[LessEqual[t, 9.5e-66], t$95$1, If[LessEqual[t, 3.6e+31], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+42], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+15}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+31}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -7.2e15 or 4.19999999999999991e42 < t Initial program 95.0%
Taylor expanded in t around inf 67.0%
if -7.2e15 < t < 9.5000000000000004e-66 or 3.59999999999999996e31 < t < 4.19999999999999991e42Initial program 99.1%
Taylor expanded in z around inf 37.4%
if 9.5000000000000004e-66 < t < 3.59999999999999996e31Initial program 100.0%
Taylor expanded in a around inf 39.8%
Final simplification51.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.9e+38) (not (<= b 4e+46))) (+ x (* b (- (+ y t) 2.0))) (- (+ x (+ z a)) (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.9e+38) || !(b <= 4e+46)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x + (z + a)) - (t * 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 ((b <= (-1.9d+38)) .or. (.not. (b <= 4d+46))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = (x + (z + a)) - (t * 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 ((b <= -1.9e+38) || !(b <= 4e+46)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x + (z + a)) - (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.9e+38) or not (b <= 4e+46): tmp = x + (b * ((y + t) - 2.0)) else: tmp = (x + (z + a)) - (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.9e+38) || !(b <= 4e+46)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(Float64(x + Float64(z + a)) - Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.9e+38) || ~((b <= 4e+46))) tmp = x + (b * ((y + t) - 2.0)); else tmp = (x + (z + a)) - (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.9e+38], N[Not[LessEqual[b, 4e+46]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{+38} \lor \neg \left(b \leq 4 \cdot 10^{+46}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(z + a\right)\right) - t \cdot a\\
\end{array}
\end{array}
if b < -1.8999999999999999e38 or 4e46 < b Initial program 94.0%
Taylor expanded in a around 0 82.9%
Taylor expanded in z around 0 72.7%
if -1.8999999999999999e38 < b < 4e46Initial program 100.0%
+-commutative100.0%
fma-def100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
sub-neg100.0%
associate-+l-100.0%
fma-neg100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 84.9%
+-commutative84.9%
sub-neg84.9%
metadata-eval84.9%
mul-1-neg84.9%
unsub-neg84.9%
*-commutative84.9%
distribute-lft-in84.9%
*-commutative84.9%
neg-mul-184.9%
unsub-neg84.9%
*-commutative84.9%
Simplified84.9%
Taylor expanded in b around 0 75.6%
associate-+r+75.6%
Simplified75.6%
Final simplification74.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -4e+198)
x
(if (<= x -3.8e+24)
(* t b)
(if (<= x -3.85e-236) z (if (<= x 4.7e-230) a (if (<= x 1e+35) z x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4e+198) {
tmp = x;
} else if (x <= -3.8e+24) {
tmp = t * b;
} else if (x <= -3.85e-236) {
tmp = z;
} else if (x <= 4.7e-230) {
tmp = a;
} else if (x <= 1e+35) {
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 <= (-4d+198)) then
tmp = x
else if (x <= (-3.8d+24)) then
tmp = t * b
else if (x <= (-3.85d-236)) then
tmp = z
else if (x <= 4.7d-230) then
tmp = a
else if (x <= 1d+35) 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 <= -4e+198) {
tmp = x;
} else if (x <= -3.8e+24) {
tmp = t * b;
} else if (x <= -3.85e-236) {
tmp = z;
} else if (x <= 4.7e-230) {
tmp = a;
} else if (x <= 1e+35) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4e+198: tmp = x elif x <= -3.8e+24: tmp = t * b elif x <= -3.85e-236: tmp = z elif x <= 4.7e-230: tmp = a elif x <= 1e+35: tmp = z else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4e+198) tmp = x; elseif (x <= -3.8e+24) tmp = Float64(t * b); elseif (x <= -3.85e-236) tmp = z; elseif (x <= 4.7e-230) tmp = a; elseif (x <= 1e+35) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -4e+198) tmp = x; elseif (x <= -3.8e+24) tmp = t * b; elseif (x <= -3.85e-236) tmp = z; elseif (x <= 4.7e-230) tmp = a; elseif (x <= 1e+35) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4e+198], x, If[LessEqual[x, -3.8e+24], N[(t * b), $MachinePrecision], If[LessEqual[x, -3.85e-236], z, If[LessEqual[x, 4.7e-230], a, If[LessEqual[x, 1e+35], z, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+198}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -3.8 \cdot 10^{+24}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;x \leq -3.85 \cdot 10^{-236}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-230}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 10^{+35}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.00000000000000007e198 or 9.9999999999999997e34 < x Initial program 96.3%
Taylor expanded in x around inf 36.7%
if -4.00000000000000007e198 < x < -3.80000000000000015e24Initial program 100.0%
Taylor expanded in a around 0 77.3%
Taylor expanded in t around inf 33.3%
if -3.80000000000000015e24 < x < -3.85e-236 or 4.7e-230 < x < 9.9999999999999997e34Initial program 96.3%
+-commutative96.3%
fma-def98.2%
associate--l+98.2%
sub-neg98.2%
metadata-eval98.2%
sub-neg98.2%
associate-+l-98.2%
fma-neg98.2%
sub-neg98.2%
metadata-eval98.2%
remove-double-neg98.2%
sub-neg98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in y around 0 86.3%
+-commutative86.3%
sub-neg86.3%
metadata-eval86.3%
mul-1-neg86.3%
unsub-neg86.3%
*-commutative86.3%
distribute-lft-in86.3%
*-commutative86.3%
neg-mul-186.3%
unsub-neg86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in z around inf 22.5%
if -3.85e-236 < x < 4.7e-230Initial program 100.0%
Taylor expanded in a around inf 51.5%
Taylor expanded in t around 0 24.5%
Final simplification28.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.32e+51)
(* y b)
(if (<= y -9.6e-95)
(* t b)
(if (<= y 1.22e-207) z (if (<= y 2.5e+25) a (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.32e+51) {
tmp = y * b;
} else if (y <= -9.6e-95) {
tmp = t * b;
} else if (y <= 1.22e-207) {
tmp = z;
} else if (y <= 2.5e+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.32d+51)) then
tmp = y * b
else if (y <= (-9.6d-95)) then
tmp = t * b
else if (y <= 1.22d-207) then
tmp = z
else if (y <= 2.5d+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.32e+51) {
tmp = y * b;
} else if (y <= -9.6e-95) {
tmp = t * b;
} else if (y <= 1.22e-207) {
tmp = z;
} else if (y <= 2.5e+25) {
tmp = a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.32e+51: tmp = y * b elif y <= -9.6e-95: tmp = t * b elif y <= 1.22e-207: tmp = z elif y <= 2.5e+25: tmp = a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.32e+51) tmp = Float64(y * b); elseif (y <= -9.6e-95) tmp = Float64(t * b); elseif (y <= 1.22e-207) tmp = z; elseif (y <= 2.5e+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.32e+51) tmp = y * b; elseif (y <= -9.6e-95) tmp = t * b; elseif (y <= 1.22e-207) tmp = z; elseif (y <= 2.5e+25) tmp = a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.32e+51], N[(y * b), $MachinePrecision], If[LessEqual[y, -9.6e-95], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.22e-207], z, If[LessEqual[y, 2.5e+25], a, N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.32 \cdot 10^{+51}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -9.6 \cdot 10^{-95}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-207}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+25}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.32e51 or 2.50000000000000012e25 < y Initial program 95.3%
Taylor expanded in y around inf 67.8%
Taylor expanded in b around inf 39.8%
if -1.32e51 < y < -9.6e-95Initial program 97.5%
Taylor expanded in a around 0 69.6%
Taylor expanded in t around inf 29.2%
if -9.6e-95 < y < 1.22e-207Initial program 98.5%
+-commutative98.5%
fma-def100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
sub-neg100.0%
associate-+l-100.0%
fma-neg100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
mul-1-neg100.0%
unsub-neg100.0%
*-commutative100.0%
distribute-lft-in100.0%
*-commutative100.0%
neg-mul-1100.0%
unsub-neg100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 35.6%
if 1.22e-207 < y < 2.50000000000000012e25Initial 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 (<= x -1.55e+129) x (if (<= x -1.1e-239) z (if (<= x 2.5e-229) a (if (<= x 1.12e+35) z x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.55e+129) {
tmp = x;
} else if (x <= -1.1e-239) {
tmp = z;
} else if (x <= 2.5e-229) {
tmp = a;
} else if (x <= 1.12e+35) {
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.55d+129)) then
tmp = x
else if (x <= (-1.1d-239)) then
tmp = z
else if (x <= 2.5d-229) then
tmp = a
else if (x <= 1.12d+35) 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.55e+129) {
tmp = x;
} else if (x <= -1.1e-239) {
tmp = z;
} else if (x <= 2.5e-229) {
tmp = a;
} else if (x <= 1.12e+35) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.55e+129: tmp = x elif x <= -1.1e-239: tmp = z elif x <= 2.5e-229: tmp = a elif x <= 1.12e+35: tmp = z else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.55e+129) tmp = x; elseif (x <= -1.1e-239) tmp = z; elseif (x <= 2.5e-229) tmp = a; elseif (x <= 1.12e+35) 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.55e+129) tmp = x; elseif (x <= -1.1e-239) tmp = z; elseif (x <= 2.5e-229) tmp = a; elseif (x <= 1.12e+35) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.55e+129], x, If[LessEqual[x, -1.1e-239], z, If[LessEqual[x, 2.5e-229], a, If[LessEqual[x, 1.12e+35], z, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+129}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-239}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-229}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 1.12 \cdot 10^{+35}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.55e129 or 1.12000000000000003e35 < x Initial program 96.8%
Taylor expanded in x around inf 35.1%
if -1.55e129 < x < -1.09999999999999991e-239 or 2.50000000000000008e-229 < x < 1.12000000000000003e35Initial program 96.9%
+-commutative96.9%
fma-def98.5%
associate--l+98.5%
sub-neg98.5%
metadata-eval98.5%
sub-neg98.5%
associate-+l-98.5%
fma-neg98.5%
sub-neg98.5%
metadata-eval98.5%
remove-double-neg98.5%
sub-neg98.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in y around 0 85.5%
+-commutative85.5%
sub-neg85.5%
metadata-eval85.5%
mul-1-neg85.5%
unsub-neg85.5%
*-commutative85.5%
distribute-lft-in85.5%
*-commutative85.5%
neg-mul-185.5%
unsub-neg85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in z around inf 20.7%
if -1.09999999999999991e-239 < x < 2.50000000000000008e-229Initial 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 (<= b -3.5e+87) (* t b) (if (<= b 2.05e+108) (+ x z) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.5e+87) {
tmp = t * b;
} else if (b <= 2.05e+108) {
tmp = x + 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 (b <= (-3.5d+87)) then
tmp = t * b
else if (b <= 2.05d+108) then
tmp = x + 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 (b <= -3.5e+87) {
tmp = t * b;
} else if (b <= 2.05e+108) {
tmp = x + z;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.5e+87: tmp = t * b elif b <= 2.05e+108: tmp = x + z else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.5e+87) tmp = Float64(t * b); elseif (b <= 2.05e+108) tmp = Float64(x + z); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.5e+87) tmp = t * b; elseif (b <= 2.05e+108) tmp = x + z; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.5e+87], N[(t * b), $MachinePrecision], If[LessEqual[b, 2.05e+108], N[(x + z), $MachinePrecision], N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+87}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{+108}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -3.49999999999999986e87Initial program 92.6%
Taylor expanded in a around 0 83.5%
Taylor expanded in t around inf 46.0%
if -3.49999999999999986e87 < b < 2.05e108Initial program 100.0%
Taylor expanded in a around 0 62.9%
Taylor expanded in b around 0 49.4%
Taylor expanded in y around 0 33.8%
sub-neg33.8%
neg-mul-133.8%
remove-double-neg33.8%
Simplified33.8%
if 2.05e108 < b Initial program 92.5%
Taylor expanded in y around inf 42.5%
Taylor expanded in b around inf 37.3%
Final simplification36.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -5.8e+66) x (if (<= x 1.45e+34) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -5.8e+66) {
tmp = x;
} else if (x <= 1.45e+34) {
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 <= (-5.8d+66)) then
tmp = x
else if (x <= 1.45d+34) 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 <= -5.8e+66) {
tmp = x;
} else if (x <= 1.45e+34) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -5.8e+66: tmp = x elif x <= 1.45e+34: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -5.8e+66) tmp = x; elseif (x <= 1.45e+34) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -5.8e+66) tmp = x; elseif (x <= 1.45e+34) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -5.8e+66], x, If[LessEqual[x, 1.45e+34], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+66}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+34}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5.79999999999999972e66 or 1.4500000000000001e34 < x Initial program 97.2%
Taylor expanded in x around inf 31.2%
if -5.79999999999999972e66 < x < 1.4500000000000001e34Initial 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)))