
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(if (<=
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* b (- (+ y t) 2.0)))
INFINITY)
(+ (- x (fma z (+ y -1.0) (* a (+ t -1.0)))) (* (+ y (+ t -2.0)) b))
(* t (- b a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0))) <= ((double) INFINITY)) {
tmp = (x - fma(z, (y + -1.0), (a * (t + -1.0)))) + ((y + (t + -2.0)) * b);
} else {
tmp = t * (b - a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(y + t) - 2.0))) <= Inf) tmp = Float64(Float64(x - fma(z, Float64(y + -1.0), Float64(a * Float64(t + -1.0)))) + Float64(Float64(y + Float64(t + -2.0)) * b)); else tmp = Float64(t * Float64(b - a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], Infinity], N[(N[(x - N[(z * N[(y + -1.0), $MachinePrecision] + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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) \leq \infty:\\
\;\;\;\;\left(x - \mathsf{fma}\left(z, y + -1, a \cdot \left(t + -1\right)\right)\right) + \left(y + \left(t + -2\right)\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) < +inf.0Initial program 99.9%
+-commutative99.9%
fma-define100.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%
Applied egg-rr100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) Initial program 0.0%
Taylor expanded in t around inf 87.5%
Final simplification99.6%
(FPCore (x y z t a b) :precision binary64 (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b) return fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Initial program 96.8%
+-commutative96.8%
fma-define98.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 (- 1.0 y))) (* a (- 1.0 t))) (* b (- (+ y t) 2.0)))))
(if (<= t_1 INFINITY) t_1 (* t (- b a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * (b - a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(b - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = t * (b - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) < +inf.0Initial program 99.9%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) Initial program 0.0%
Taylor expanded in t around inf 87.5%
Final simplification99.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (+ a (+ x z))) (t_3 (* t (- b a))))
(if (<= t -6.7e+47)
t_3
(if (<= t -4600000000.0)
t_1
(if (<= t -4.5e-209)
t_2
(if (<= t -1.92e-268)
t_1
(if (<= t 8e-39)
t_2
(if (<= t 4.2e-10) t_1 (if (<= t 3.2e+31) t_2 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = a + (x + z);
double t_3 = t * (b - a);
double tmp;
if (t <= -6.7e+47) {
tmp = t_3;
} else if (t <= -4600000000.0) {
tmp = t_1;
} else if (t <= -4.5e-209) {
tmp = t_2;
} else if (t <= -1.92e-268) {
tmp = t_1;
} else if (t <= 8e-39) {
tmp = t_2;
} else if (t <= 4.2e-10) {
tmp = t_1;
} else if (t <= 3.2e+31) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y * (b - z)
t_2 = a + (x + z)
t_3 = t * (b - a)
if (t <= (-6.7d+47)) then
tmp = t_3
else if (t <= (-4600000000.0d0)) then
tmp = t_1
else if (t <= (-4.5d-209)) then
tmp = t_2
else if (t <= (-1.92d-268)) then
tmp = t_1
else if (t <= 8d-39) then
tmp = t_2
else if (t <= 4.2d-10) then
tmp = t_1
else if (t <= 3.2d+31) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = a + (x + z);
double t_3 = t * (b - a);
double tmp;
if (t <= -6.7e+47) {
tmp = t_3;
} else if (t <= -4600000000.0) {
tmp = t_1;
} else if (t <= -4.5e-209) {
tmp = t_2;
} else if (t <= -1.92e-268) {
tmp = t_1;
} else if (t <= 8e-39) {
tmp = t_2;
} else if (t <= 4.2e-10) {
tmp = t_1;
} else if (t <= 3.2e+31) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = a + (x + z) t_3 = t * (b - a) tmp = 0 if t <= -6.7e+47: tmp = t_3 elif t <= -4600000000.0: tmp = t_1 elif t <= -4.5e-209: tmp = t_2 elif t <= -1.92e-268: tmp = t_1 elif t <= 8e-39: tmp = t_2 elif t <= 4.2e-10: tmp = t_1 elif t <= 3.2e+31: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) t_2 = Float64(a + Float64(x + z)) t_3 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -6.7e+47) tmp = t_3; elseif (t <= -4600000000.0) tmp = t_1; elseif (t <= -4.5e-209) tmp = t_2; elseif (t <= -1.92e-268) tmp = t_1; elseif (t <= 8e-39) tmp = t_2; elseif (t <= 4.2e-10) tmp = t_1; elseif (t <= 3.2e+31) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); t_2 = a + (x + z); t_3 = t * (b - a); tmp = 0.0; if (t <= -6.7e+47) tmp = t_3; elseif (t <= -4600000000.0) tmp = t_1; elseif (t <= -4.5e-209) tmp = t_2; elseif (t <= -1.92e-268) tmp = t_1; elseif (t <= 8e-39) tmp = t_2; elseif (t <= 4.2e-10) tmp = t_1; elseif (t <= 3.2e+31) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(x + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.7e+47], t$95$3, If[LessEqual[t, -4600000000.0], t$95$1, If[LessEqual[t, -4.5e-209], t$95$2, If[LessEqual[t, -1.92e-268], t$95$1, If[LessEqual[t, 8e-39], t$95$2, If[LessEqual[t, 4.2e-10], t$95$1, If[LessEqual[t, 3.2e+31], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := a + \left(x + z\right)\\
t_3 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -6.7 \cdot 10^{+47}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -4600000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-209}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.92 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -6.69999999999999973e47 or 3.2000000000000001e31 < t Initial program 93.4%
Taylor expanded in t around inf 70.9%
if -6.69999999999999973e47 < t < -4.6e9 or -4.4999999999999998e-209 < t < -1.92000000000000008e-268 or 7.99999999999999943e-39 < t < 4.2e-10Initial program 99.8%
Taylor expanded in y around inf 71.1%
if -4.6e9 < t < -4.4999999999999998e-209 or -1.92000000000000008e-268 < t < 7.99999999999999943e-39 or 4.2e-10 < t < 3.2000000000000001e31Initial program 99.9%
Taylor expanded in b around 0 75.3%
Taylor expanded in t around 0 73.7%
+-commutative73.7%
sub-neg73.7%
metadata-eval73.7%
neg-mul-173.7%
fma-undefine73.7%
Simplified73.7%
Taylor expanded in y around 0 58.2%
associate--l+58.2%
cancel-sign-sub-inv58.2%
metadata-eval58.2%
*-lft-identity58.2%
Simplified58.2%
Final simplification65.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (* z (- 1.0 y))))
(t_2 (* b (- (+ y t) 2.0)))
(t_3 (+ x (* a (- 1.0 t)))))
(if (<= b -6.2e+60)
t_2
(if (<= b -3.2e+20)
t_1
(if (<= b -3.2e-12)
t_3
(if (<= b -4e-84)
t_1
(if (<= b 235.0) t_3 (if (<= b 1.55e+126) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z * (1.0 - y));
double t_2 = b * ((y + t) - 2.0);
double t_3 = x + (a * (1.0 - t));
double tmp;
if (b <= -6.2e+60) {
tmp = t_2;
} else if (b <= -3.2e+20) {
tmp = t_1;
} else if (b <= -3.2e-12) {
tmp = t_3;
} else if (b <= -4e-84) {
tmp = t_1;
} else if (b <= 235.0) {
tmp = t_3;
} else if (b <= 1.55e+126) {
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 = a + (z * (1.0d0 - y))
t_2 = b * ((y + t) - 2.0d0)
t_3 = x + (a * (1.0d0 - t))
if (b <= (-6.2d+60)) then
tmp = t_2
else if (b <= (-3.2d+20)) then
tmp = t_1
else if (b <= (-3.2d-12)) then
tmp = t_3
else if (b <= (-4d-84)) then
tmp = t_1
else if (b <= 235.0d0) then
tmp = t_3
else if (b <= 1.55d+126) 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 * (1.0 - y));
double t_2 = b * ((y + t) - 2.0);
double t_3 = x + (a * (1.0 - t));
double tmp;
if (b <= -6.2e+60) {
tmp = t_2;
} else if (b <= -3.2e+20) {
tmp = t_1;
} else if (b <= -3.2e-12) {
tmp = t_3;
} else if (b <= -4e-84) {
tmp = t_1;
} else if (b <= 235.0) {
tmp = t_3;
} else if (b <= 1.55e+126) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (z * (1.0 - y)) t_2 = b * ((y + t) - 2.0) t_3 = x + (a * (1.0 - t)) tmp = 0 if b <= -6.2e+60: tmp = t_2 elif b <= -3.2e+20: tmp = t_1 elif b <= -3.2e-12: tmp = t_3 elif b <= -4e-84: tmp = t_1 elif b <= 235.0: tmp = t_3 elif b <= 1.55e+126: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(z * Float64(1.0 - y))) t_2 = Float64(b * Float64(Float64(y + t) - 2.0)) t_3 = Float64(x + Float64(a * Float64(1.0 - t))) tmp = 0.0 if (b <= -6.2e+60) tmp = t_2; elseif (b <= -3.2e+20) tmp = t_1; elseif (b <= -3.2e-12) tmp = t_3; elseif (b <= -4e-84) tmp = t_1; elseif (b <= 235.0) tmp = t_3; elseif (b <= 1.55e+126) 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 * (1.0 - y)); t_2 = b * ((y + t) - 2.0); t_3 = x + (a * (1.0 - t)); tmp = 0.0; if (b <= -6.2e+60) tmp = t_2; elseif (b <= -3.2e+20) tmp = t_1; elseif (b <= -3.2e-12) tmp = t_3; elseif (b <= -4e-84) tmp = t_1; elseif (b <= 235.0) tmp = t_3; elseif (b <= 1.55e+126) 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[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.2e+60], t$95$2, If[LessEqual[b, -3.2e+20], t$95$1, If[LessEqual[b, -3.2e-12], t$95$3, If[LessEqual[b, -4e-84], t$95$1, If[LessEqual[b, 235.0], t$95$3, If[LessEqual[b, 1.55e+126], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + z \cdot \left(1 - y\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_3 := x + a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -6.2 \cdot 10^{+60}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -3.2 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.2 \cdot 10^{-12}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq -4 \cdot 10^{-84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 235:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -6.2000000000000001e60 or 1.55e126 < b Initial program 92.0%
Taylor expanded in b around inf 83.0%
if -6.2000000000000001e60 < b < -3.2e20 or -3.2000000000000001e-12 < b < -4.0000000000000001e-84 or 235 < b < 1.55e126Initial program 98.0%
Taylor expanded in b around 0 87.1%
Taylor expanded in t around 0 75.1%
+-commutative75.1%
sub-neg75.1%
metadata-eval75.1%
neg-mul-175.1%
fma-undefine75.1%
Simplified75.1%
Taylor expanded in x around 0 63.8%
if -3.2e20 < b < -3.2000000000000001e-12 or -4.0000000000000001e-84 < b < 235Initial program 99.2%
Taylor expanded in b around 0 89.5%
Taylor expanded in z around 0 64.4%
Final simplification69.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))) (t_2 (+ a (+ x z))))
(if (<= t -1.5e+54)
t_1
(if (<= t -6.5e-265)
(+ a (* z (- 1.0 y)))
(if (<= t 5.2e-39)
t_2
(if (<= t 2.95e-8) (* y (- b z)) (if (<= t 6e+32) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double t_2 = a + (x + z);
double tmp;
if (t <= -1.5e+54) {
tmp = t_1;
} else if (t <= -6.5e-265) {
tmp = a + (z * (1.0 - y));
} else if (t <= 5.2e-39) {
tmp = t_2;
} else if (t <= 2.95e-8) {
tmp = y * (b - z);
} else if (t <= 6e+32) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = t * (b - a)
t_2 = a + (x + z)
if (t <= (-1.5d+54)) then
tmp = t_1
else if (t <= (-6.5d-265)) then
tmp = a + (z * (1.0d0 - y))
else if (t <= 5.2d-39) then
tmp = t_2
else if (t <= 2.95d-8) then
tmp = y * (b - z)
else if (t <= 6d+32) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double t_2 = a + (x + z);
double tmp;
if (t <= -1.5e+54) {
tmp = t_1;
} else if (t <= -6.5e-265) {
tmp = a + (z * (1.0 - y));
} else if (t <= 5.2e-39) {
tmp = t_2;
} else if (t <= 2.95e-8) {
tmp = y * (b - z);
} else if (t <= 6e+32) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) t_2 = a + (x + z) tmp = 0 if t <= -1.5e+54: tmp = t_1 elif t <= -6.5e-265: tmp = a + (z * (1.0 - y)) elif t <= 5.2e-39: tmp = t_2 elif t <= 2.95e-8: tmp = y * (b - z) elif t <= 6e+32: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) t_2 = Float64(a + Float64(x + z)) tmp = 0.0 if (t <= -1.5e+54) tmp = t_1; elseif (t <= -6.5e-265) tmp = Float64(a + Float64(z * Float64(1.0 - y))); elseif (t <= 5.2e-39) tmp = t_2; elseif (t <= 2.95e-8) tmp = Float64(y * Float64(b - z)); elseif (t <= 6e+32) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); t_2 = a + (x + z); tmp = 0.0; if (t <= -1.5e+54) tmp = t_1; elseif (t <= -6.5e-265) tmp = a + (z * (1.0 - y)); elseif (t <= 5.2e-39) tmp = t_2; elseif (t <= 2.95e-8) tmp = y * (b - z); elseif (t <= 6e+32) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(x + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e+54], t$95$1, If[LessEqual[t, -6.5e-265], N[(a + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-39], t$95$2, If[LessEqual[t, 2.95e-8], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+32], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
t_2 := a + \left(x + z\right)\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-265}:\\
\;\;\;\;a + z \cdot \left(1 - y\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{-8}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.4999999999999999e54 or 6e32 < t Initial program 93.3%
Taylor expanded in t around inf 71.2%
if -1.4999999999999999e54 < t < -6.5000000000000005e-265Initial program 99.9%
Taylor expanded in b around 0 71.5%
Taylor expanded in t around 0 69.7%
+-commutative69.7%
sub-neg69.7%
metadata-eval69.7%
neg-mul-169.7%
fma-undefine69.7%
Simplified69.7%
Taylor expanded in x around 0 55.5%
if -6.5000000000000005e-265 < t < 5.2e-39 or 2.9499999999999999e-8 < t < 6e32Initial program 100.0%
Taylor expanded in b around 0 75.2%
Taylor expanded in t around 0 72.9%
+-commutative72.9%
sub-neg72.9%
metadata-eval72.9%
neg-mul-172.9%
fma-undefine72.9%
Simplified72.9%
Taylor expanded in y around 0 62.1%
associate--l+62.1%
cancel-sign-sub-inv62.1%
metadata-eval62.1%
*-lft-identity62.1%
Simplified62.1%
if 5.2e-39 < t < 2.9499999999999999e-8Initial program 99.8%
Taylor expanded in y around inf 81.1%
Final simplification65.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -4.4e+14)
t_1
(if (<= t 3.7e-38)
(+ x a)
(if (<= t 1.32e-11) (* y (- z)) (if (<= t 12600000.0) (+ x a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -4.4e+14) {
tmp = t_1;
} else if (t <= 3.7e-38) {
tmp = x + a;
} else if (t <= 1.32e-11) {
tmp = y * -z;
} else if (t <= 12600000.0) {
tmp = x + a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b - a)
if (t <= (-4.4d+14)) then
tmp = t_1
else if (t <= 3.7d-38) then
tmp = x + a
else if (t <= 1.32d-11) then
tmp = y * -z
else if (t <= 12600000.0d0) then
tmp = x + a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -4.4e+14) {
tmp = t_1;
} else if (t <= 3.7e-38) {
tmp = x + a;
} else if (t <= 1.32e-11) {
tmp = y * -z;
} else if (t <= 12600000.0) {
tmp = x + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -4.4e+14: tmp = t_1 elif t <= 3.7e-38: tmp = x + a elif t <= 1.32e-11: tmp = y * -z elif t <= 12600000.0: tmp = x + a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -4.4e+14) tmp = t_1; elseif (t <= 3.7e-38) tmp = Float64(x + a); elseif (t <= 1.32e-11) tmp = Float64(y * Float64(-z)); elseif (t <= 12600000.0) tmp = Float64(x + a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -4.4e+14) tmp = t_1; elseif (t <= 3.7e-38) tmp = x + a; elseif (t <= 1.32e-11) tmp = y * -z; elseif (t <= 12600000.0) tmp = x + a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+14], t$95$1, If[LessEqual[t, 3.7e-38], N[(x + a), $MachinePrecision], If[LessEqual[t, 1.32e-11], N[(y * (-z)), $MachinePrecision], If[LessEqual[t, 12600000.0], N[(x + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-38}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{-11}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;t \leq 12600000:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.4e14 or 1.26e7 < t Initial program 93.8%
Taylor expanded in t around inf 67.4%
if -4.4e14 < t < 3.7e-38 or 1.32e-11 < t < 1.26e7Initial program 99.9%
Taylor expanded in b around 0 73.1%
Taylor expanded in t around 0 72.5%
+-commutative72.5%
sub-neg72.5%
metadata-eval72.5%
neg-mul-172.5%
fma-undefine72.5%
Simplified72.5%
Taylor expanded in z around 0 39.5%
if 3.7e-38 < t < 1.32e-11Initial program 99.7%
Taylor expanded in y around inf 77.9%
Taylor expanded in b around 0 78.2%
mul-1-neg78.2%
distribute-rgt-neg-in78.2%
Simplified78.2%
Final simplification54.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
(if (<= t -7.6e+46)
t_2
(if (<= t -9e-269)
t_1
(if (<= t 7.5e-39) (+ x a) (if (<= t 76000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (t <= -7.6e+46) {
tmp = t_2;
} else if (t <= -9e-269) {
tmp = t_1;
} else if (t <= 7.5e-39) {
tmp = x + a;
} else if (t <= 76000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (b - z)
t_2 = t * (b - a)
if (t <= (-7.6d+46)) then
tmp = t_2
else if (t <= (-9d-269)) then
tmp = t_1
else if (t <= 7.5d-39) then
tmp = x + a
else if (t <= 76000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (t <= -7.6e+46) {
tmp = t_2;
} else if (t <= -9e-269) {
tmp = t_1;
} else if (t <= 7.5e-39) {
tmp = x + a;
} else if (t <= 76000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = t * (b - a) tmp = 0 if t <= -7.6e+46: tmp = t_2 elif t <= -9e-269: tmp = t_1 elif t <= 7.5e-39: tmp = x + a elif t <= 76000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -7.6e+46) tmp = t_2; elseif (t <= -9e-269) tmp = t_1; elseif (t <= 7.5e-39) tmp = Float64(x + a); elseif (t <= 76000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); t_2 = t * (b - a); tmp = 0.0; if (t <= -7.6e+46) tmp = t_2; elseif (t <= -9e-269) tmp = t_1; elseif (t <= 7.5e-39) tmp = x + a; elseif (t <= 76000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.6e+46], t$95$2, If[LessEqual[t, -9e-269], t$95$1, If[LessEqual[t, 7.5e-39], N[(x + a), $MachinePrecision], If[LessEqual[t, 76000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{+46}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-39}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 76000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -7.5999999999999998e46 or 7.6e7 < t Initial program 93.6%
Taylor expanded in t around inf 69.5%
if -7.5999999999999998e46 < t < -9.0000000000000003e-269 or 7.49999999999999971e-39 < t < 7.6e7Initial program 99.9%
Taylor expanded in y around inf 48.4%
if -9.0000000000000003e-269 < t < 7.49999999999999971e-39Initial program 99.9%
Taylor expanded in b around 0 75.2%
Taylor expanded in t around 0 75.2%
+-commutative75.2%
sub-neg75.2%
metadata-eval75.2%
neg-mul-175.2%
fma-undefine75.2%
Simplified75.2%
Taylor expanded in z around 0 47.5%
Final simplification58.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 y))))
(if (or (<= a -1.42e-78) (not (<= a 7.5e+159)))
(+ x (+ (* a (- 1.0 t)) t_1))
(+ (+ x (* b (- (+ y t) 2.0))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - y);
double tmp;
if ((a <= -1.42e-78) || !(a <= 7.5e+159)) {
tmp = x + ((a * (1.0 - t)) + t_1);
} else {
tmp = (x + (b * ((y + t) - 2.0))) + 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 = z * (1.0d0 - y)
if ((a <= (-1.42d-78)) .or. (.not. (a <= 7.5d+159))) then
tmp = x + ((a * (1.0d0 - t)) + t_1)
else
tmp = (x + (b * ((y + t) - 2.0d0))) + 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 = z * (1.0 - y);
double tmp;
if ((a <= -1.42e-78) || !(a <= 7.5e+159)) {
tmp = x + ((a * (1.0 - t)) + t_1);
} else {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - y) tmp = 0 if (a <= -1.42e-78) or not (a <= 7.5e+159): tmp = x + ((a * (1.0 - t)) + t_1) else: tmp = (x + (b * ((y + t) - 2.0))) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - y)) tmp = 0.0 if ((a <= -1.42e-78) || !(a <= 7.5e+159)) tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + t_1)); else tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - y); tmp = 0.0; if ((a <= -1.42e-78) || ~((a <= 7.5e+159))) tmp = x + ((a * (1.0 - t)) + t_1); else tmp = (x + (b * ((y + t) - 2.0))) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -1.42e-78], N[Not[LessEqual[a, 7.5e+159]], $MachinePrecision]], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;a \leq -1.42 \cdot 10^{-78} \lor \neg \left(a \leq 7.5 \cdot 10^{+159}\right):\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t\_1\\
\end{array}
\end{array}
if a < -1.41999999999999999e-78 or 7.4999999999999997e159 < a Initial program 94.0%
Taylor expanded in b around 0 85.9%
if -1.41999999999999999e-78 < a < 7.4999999999999997e159Initial program 99.9%
Taylor expanded in a around 0 96.0%
Final simplification90.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- a))))
(if (<= t -6.5e+38)
t_1
(if (<= t 3.9e-38)
(+ x a)
(if (<= t 3.3e-11) (* y (- z)) (if (<= t 1.55e+38) (+ x a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * -a;
double tmp;
if (t <= -6.5e+38) {
tmp = t_1;
} else if (t <= 3.9e-38) {
tmp = x + a;
} else if (t <= 3.3e-11) {
tmp = y * -z;
} else if (t <= 1.55e+38) {
tmp = x + a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * -a
if (t <= (-6.5d+38)) then
tmp = t_1
else if (t <= 3.9d-38) then
tmp = x + a
else if (t <= 3.3d-11) then
tmp = y * -z
else if (t <= 1.55d+38) then
tmp = x + a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * -a;
double tmp;
if (t <= -6.5e+38) {
tmp = t_1;
} else if (t <= 3.9e-38) {
tmp = x + a;
} else if (t <= 3.3e-11) {
tmp = y * -z;
} else if (t <= 1.55e+38) {
tmp = x + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * -a tmp = 0 if t <= -6.5e+38: tmp = t_1 elif t <= 3.9e-38: tmp = x + a elif t <= 3.3e-11: tmp = y * -z elif t <= 1.55e+38: tmp = x + a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(-a)) tmp = 0.0 if (t <= -6.5e+38) tmp = t_1; elseif (t <= 3.9e-38) tmp = Float64(x + a); elseif (t <= 3.3e-11) tmp = Float64(y * Float64(-z)); elseif (t <= 1.55e+38) tmp = Float64(x + a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * -a; tmp = 0.0; if (t <= -6.5e+38) tmp = t_1; elseif (t <= 3.9e-38) tmp = x + a; elseif (t <= 3.3e-11) tmp = y * -z; elseif (t <= 1.55e+38) tmp = x + a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[t, -6.5e+38], t$95$1, If[LessEqual[t, 3.9e-38], N[(x + a), $MachinePrecision], If[LessEqual[t, 3.3e-11], N[(y * (-z)), $MachinePrecision], If[LessEqual[t, 1.55e+38], N[(x + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-a\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-38}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-11}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+38}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.5e38 or 1.55000000000000009e38 < t Initial program 93.5%
Taylor expanded in b around 0 70.8%
Taylor expanded in t around inf 48.4%
associate-*r*48.4%
neg-mul-148.4%
Simplified48.4%
if -6.5e38 < t < 3.8999999999999999e-38 or 3.3000000000000002e-11 < t < 1.55000000000000009e38Initial program 99.9%
Taylor expanded in b around 0 73.1%
Taylor expanded in t around 0 71.7%
+-commutative71.7%
sub-neg71.7%
metadata-eval71.7%
neg-mul-171.7%
fma-undefine71.7%
Simplified71.7%
Taylor expanded in z around 0 38.2%
if 3.8999999999999999e-38 < t < 3.3000000000000002e-11Initial program 99.7%
Taylor expanded in y around inf 77.9%
Taylor expanded in b around 0 78.2%
mul-1-neg78.2%
distribute-rgt-neg-in78.2%
Simplified78.2%
Final simplification44.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -1.35e+45)
t_1
(if (<= b 250.0)
(+ x (+ z (* a (- 1.0 t))))
(if (<= b 1e+124) (+ x (+ a (* z (- 1.0 y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -1.35e+45) {
tmp = t_1;
} else if (b <= 250.0) {
tmp = x + (z + (a * (1.0 - t)));
} else if (b <= 1e+124) {
tmp = x + (a + (z * (1.0 - y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((y + t) - 2.0d0)
if (b <= (-1.35d+45)) then
tmp = t_1
else if (b <= 250.0d0) then
tmp = x + (z + (a * (1.0d0 - t)))
else if (b <= 1d+124) then
tmp = x + (a + (z * (1.0d0 - y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -1.35e+45) {
tmp = t_1;
} else if (b <= 250.0) {
tmp = x + (z + (a * (1.0 - t)));
} else if (b <= 1e+124) {
tmp = x + (a + (z * (1.0 - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((y + t) - 2.0) tmp = 0 if b <= -1.35e+45: tmp = t_1 elif b <= 250.0: tmp = x + (z + (a * (1.0 - t))) elif b <= 1e+124: tmp = x + (a + (z * (1.0 - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -1.35e+45) tmp = t_1; elseif (b <= 250.0) tmp = Float64(x + Float64(z + Float64(a * Float64(1.0 - t)))); elseif (b <= 1e+124) tmp = Float64(x + Float64(a + Float64(z * Float64(1.0 - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -1.35e+45) tmp = t_1; elseif (b <= 250.0) tmp = x + (z + (a * (1.0 - t))); elseif (b <= 1e+124) tmp = x + (a + (z * (1.0 - y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.35e+45], t$95$1, If[LessEqual[b, 250.0], N[(x + N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e+124], N[(x + N[(a + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.35 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 250:\\
\;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\
\mathbf{elif}\;b \leq 10^{+124}:\\
\;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.34999999999999992e45 or 9.99999999999999948e123 < b Initial program 92.4%
Taylor expanded in b around inf 81.6%
if -1.34999999999999992e45 < b < 250Initial program 99.3%
Taylor expanded in b around 0 90.6%
Taylor expanded in y around 0 71.2%
mul-1-neg71.2%
Simplified71.2%
if 250 < b < 9.99999999999999948e123Initial program 95.6%
Taylor expanded in b around 0 79.0%
Taylor expanded in t around 0 74.7%
sub-neg74.7%
sub-neg74.7%
metadata-eval74.7%
distribute-neg-in74.7%
neg-mul-174.7%
remove-double-neg74.7%
distribute-rgt-in74.7%
+-commutative74.7%
distribute-neg-in74.7%
distribute-lft-neg-in74.7%
metadata-eval74.7%
mul-1-neg74.7%
associate-*r*74.7%
distribute-rgt-in74.7%
neg-mul-174.7%
sub-neg74.7%
Simplified74.7%
Final simplification74.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.3e+33) (not (<= a 5.5e+135))) (+ x (+ z (* a (- 1.0 t)))) (+ (* (+ y (+ t -2.0)) b) (- x (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.3e+33) || !(a <= 5.5e+135)) {
tmp = x + (z + (a * (1.0 - t)));
} else {
tmp = ((y + (t + -2.0)) * b) + (x - (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-2.3d+33)) .or. (.not. (a <= 5.5d+135))) then
tmp = x + (z + (a * (1.0d0 - t)))
else
tmp = ((y + (t + (-2.0d0))) * b) + (x - (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.3e+33) || !(a <= 5.5e+135)) {
tmp = x + (z + (a * (1.0 - t)));
} else {
tmp = ((y + (t + -2.0)) * b) + (x - (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.3e+33) or not (a <= 5.5e+135): tmp = x + (z + (a * (1.0 - t))) else: tmp = ((y + (t + -2.0)) * b) + (x - (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.3e+33) || !(a <= 5.5e+135)) tmp = Float64(x + Float64(z + Float64(a * Float64(1.0 - t)))); else tmp = Float64(Float64(Float64(y + Float64(t + -2.0)) * b) + Float64(x - Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.3e+33) || ~((a <= 5.5e+135))) tmp = x + (z + (a * (1.0 - t))); else tmp = ((y + (t + -2.0)) * b) + (x - (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.3e+33], N[Not[LessEqual[a, 5.5e+135]], $MachinePrecision]], N[(x + N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] + N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+33} \lor \neg \left(a \leq 5.5 \cdot 10^{+135}\right):\\
\;\;\;\;x + \left(z + a \cdot \left(1 - t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(t + -2\right)\right) \cdot b + \left(x - y \cdot z\right)\\
\end{array}
\end{array}
if a < -2.30000000000000011e33 or 5.4999999999999999e135 < a Initial program 93.0%
Taylor expanded in b around 0 85.4%
Taylor expanded in y around 0 73.7%
mul-1-neg73.7%
Simplified73.7%
if -2.30000000000000011e33 < a < 5.4999999999999999e135Initial program 99.9%
+-commutative99.9%
fma-define99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
sub-neg99.9%
associate-+l-99.9%
fma-neg99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 80.6%
Final simplification77.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7e+44) (not (<= b 9.5e+122))) (+ (* (+ y (+ t -2.0)) b) (- x (* y z))) (+ x (+ (* a (- 1.0 t)) (* z (- 1.0 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7e+44) || !(b <= 9.5e+122)) {
tmp = ((y + (t + -2.0)) * b) + (x - (y * z));
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-7d+44)) .or. (.not. (b <= 9.5d+122))) then
tmp = ((y + (t + (-2.0d0))) * b) + (x - (y * z))
else
tmp = x + ((a * (1.0d0 - t)) + (z * (1.0d0 - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7e+44) || !(b <= 9.5e+122)) {
tmp = ((y + (t + -2.0)) * b) + (x - (y * z));
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7e+44) or not (b <= 9.5e+122): tmp = ((y + (t + -2.0)) * b) + (x - (y * z)) else: tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7e+44) || !(b <= 9.5e+122)) tmp = Float64(Float64(Float64(y + Float64(t + -2.0)) * b) + Float64(x - Float64(y * z))); else tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7e+44) || ~((b <= 9.5e+122))) tmp = ((y + (t + -2.0)) * b) + (x - (y * z)); else tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7e+44], N[Not[LessEqual[b, 9.5e+122]], $MachinePrecision]], N[(N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] + N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+44} \lor \neg \left(b \leq 9.5 \cdot 10^{+122}\right):\\
\;\;\;\;\left(y + \left(t + -2\right)\right) \cdot b + \left(x - y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if b < -6.9999999999999998e44 or 9.49999999999999986e122 < b Initial program 92.6%
+-commutative92.6%
fma-define97.5%
associate--l+97.5%
sub-neg97.5%
metadata-eval97.5%
sub-neg97.5%
associate-+l-97.5%
fma-neg97.5%
sub-neg97.5%
metadata-eval97.5%
remove-double-neg97.5%
sub-neg97.5%
metadata-eval97.5%
Simplified97.5%
Applied egg-rr92.6%
Taylor expanded in y around inf 86.7%
if -6.9999999999999998e44 < b < 9.49999999999999986e122Initial program 98.8%
Taylor expanded in b around 0 89.5%
Final simplification88.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -3.4e+44)
(+ a (+ x (* b (+ t (+ y -2.0)))))
(if (<= b 9e+122)
(+ x (+ (* a (- 1.0 t)) (* z (- 1.0 y))))
(+ (* (+ y (+ t -2.0)) b) (- x (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.4e+44) {
tmp = a + (x + (b * (t + (y + -2.0))));
} else if (b <= 9e+122) {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
} else {
tmp = ((y + (t + -2.0)) * b) + (x - (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-3.4d+44)) then
tmp = a + (x + (b * (t + (y + (-2.0d0)))))
else if (b <= 9d+122) then
tmp = x + ((a * (1.0d0 - t)) + (z * (1.0d0 - y)))
else
tmp = ((y + (t + (-2.0d0))) * b) + (x - (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.4e+44) {
tmp = a + (x + (b * (t + (y + -2.0))));
} else if (b <= 9e+122) {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
} else {
tmp = ((y + (t + -2.0)) * b) + (x - (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.4e+44: tmp = a + (x + (b * (t + (y + -2.0)))) elif b <= 9e+122: tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))) else: tmp = ((y + (t + -2.0)) * b) + (x - (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.4e+44) tmp = Float64(a + Float64(x + Float64(b * Float64(t + Float64(y + -2.0))))); elseif (b <= 9e+122) tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z * Float64(1.0 - y)))); else tmp = Float64(Float64(Float64(y + Float64(t + -2.0)) * b) + Float64(x - Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.4e+44) tmp = a + (x + (b * (t + (y + -2.0)))); elseif (b <= 9e+122) tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))); else tmp = ((y + (t + -2.0)) * b) + (x - (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.4e+44], N[(a + N[(x + N[(b * N[(t + N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9e+122], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] + N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+44}:\\
\;\;\;\;a + \left(x + b \cdot \left(t + \left(y + -2\right)\right)\right)\\
\mathbf{elif}\;b \leq 9 \cdot 10^{+122}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(t + -2\right)\right) \cdot b + \left(x - y \cdot z\right)\\
\end{array}
\end{array}
if b < -3.4e44Initial program 93.7%
Taylor expanded in t around 0 89.6%
Taylor expanded in z around 0 85.8%
Taylor expanded in a around 0 79.7%
sub-neg79.7%
metadata-eval79.7%
distribute-lft-out88.0%
Simplified88.0%
if -3.4e44 < b < 8.99999999999999995e122Initial program 98.8%
Taylor expanded in b around 0 89.5%
if 8.99999999999999995e122 < b Initial program 90.9%
+-commutative90.9%
fma-define96.9%
associate--l+96.9%
sub-neg96.9%
metadata-eval96.9%
sub-neg96.9%
associate-+l-96.9%
fma-neg96.9%
sub-neg96.9%
metadata-eval96.9%
remove-double-neg96.9%
sub-neg96.9%
metadata-eval96.9%
Simplified96.9%
Applied egg-rr90.9%
Taylor expanded in y around inf 91.1%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1e+45)
(+ a (+ x (* b (+ t (+ y -2.0)))))
(if (<= b 1.9e+122)
(+ x (+ (* a (- 1.0 t)) (- z (* y z))))
(+ (* (+ y (+ t -2.0)) b) (- x (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e+45) {
tmp = a + (x + (b * (t + (y + -2.0))));
} else if (b <= 1.9e+122) {
tmp = x + ((a * (1.0 - t)) + (z - (y * z)));
} else {
tmp = ((y + (t + -2.0)) * b) + (x - (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1d+45)) then
tmp = a + (x + (b * (t + (y + (-2.0d0)))))
else if (b <= 1.9d+122) then
tmp = x + ((a * (1.0d0 - t)) + (z - (y * z)))
else
tmp = ((y + (t + (-2.0d0))) * b) + (x - (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1e+45) {
tmp = a + (x + (b * (t + (y + -2.0))));
} else if (b <= 1.9e+122) {
tmp = x + ((a * (1.0 - t)) + (z - (y * z)));
} else {
tmp = ((y + (t + -2.0)) * b) + (x - (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1e+45: tmp = a + (x + (b * (t + (y + -2.0)))) elif b <= 1.9e+122: tmp = x + ((a * (1.0 - t)) + (z - (y * z))) else: tmp = ((y + (t + -2.0)) * b) + (x - (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1e+45) tmp = Float64(a + Float64(x + Float64(b * Float64(t + Float64(y + -2.0))))); elseif (b <= 1.9e+122) tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z - Float64(y * z)))); else tmp = Float64(Float64(Float64(y + Float64(t + -2.0)) * b) + Float64(x - Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1e+45) tmp = a + (x + (b * (t + (y + -2.0)))); elseif (b <= 1.9e+122) tmp = x + ((a * (1.0 - t)) + (z - (y * z))); else tmp = ((y + (t + -2.0)) * b) + (x - (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1e+45], N[(a + N[(x + N[(b * N[(t + N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.9e+122], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] + N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+45}:\\
\;\;\;\;a + \left(x + b \cdot \left(t + \left(y + -2\right)\right)\right)\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+122}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + \left(z - y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(t + -2\right)\right) \cdot b + \left(x - y \cdot z\right)\\
\end{array}
\end{array}
if b < -9.9999999999999993e44Initial program 93.7%
Taylor expanded in t around 0 89.6%
Taylor expanded in z around 0 85.8%
Taylor expanded in a around 0 79.7%
sub-neg79.7%
metadata-eval79.7%
distribute-lft-out88.0%
Simplified88.0%
if -9.9999999999999993e44 < b < 1.8999999999999999e122Initial program 98.8%
Taylor expanded in b around 0 89.5%
Taylor expanded in y around 0 89.5%
if 1.8999999999999999e122 < b Initial program 90.9%
+-commutative90.9%
fma-define96.9%
associate--l+96.9%
sub-neg96.9%
metadata-eval96.9%
sub-neg96.9%
associate-+l-96.9%
fma-neg96.9%
sub-neg96.9%
metadata-eval96.9%
remove-double-neg96.9%
sub-neg96.9%
metadata-eval96.9%
Simplified96.9%
Applied egg-rr90.9%
Taylor expanded in y around inf 91.1%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.05e+55) (not (<= t 1.9e+34))) (* t (- b a)) (+ x (+ a (* z (- 1.0 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.05e+55) || !(t <= 1.9e+34)) {
tmp = t * (b - a);
} else {
tmp = x + (a + (z * (1.0 - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.05d+55)) .or. (.not. (t <= 1.9d+34))) then
tmp = t * (b - a)
else
tmp = x + (a + (z * (1.0d0 - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.05e+55) || !(t <= 1.9e+34)) {
tmp = t * (b - a);
} else {
tmp = x + (a + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.05e+55) or not (t <= 1.9e+34): tmp = t * (b - a) else: tmp = x + (a + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.05e+55) || !(t <= 1.9e+34)) tmp = Float64(t * Float64(b - a)); else tmp = Float64(x + Float64(a + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.05e+55) || ~((t <= 1.9e+34))) tmp = t * (b - a); else tmp = x + (a + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.05e+55], N[Not[LessEqual[t, 1.9e+34]], $MachinePrecision]], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(x + N[(a + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+55} \lor \neg \left(t \leq 1.9 \cdot 10^{+34}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if t < -1.05e55 or 1.9000000000000001e34 < t Initial program 93.3%
Taylor expanded in t around inf 71.2%
if -1.05e55 < t < 1.9000000000000001e34Initial program 99.9%
Taylor expanded in b around 0 73.4%
Taylor expanded in t around 0 71.4%
sub-neg71.4%
sub-neg71.4%
metadata-eval71.4%
distribute-neg-in71.4%
neg-mul-171.4%
remove-double-neg71.4%
distribute-rgt-in71.5%
+-commutative71.5%
distribute-neg-in71.5%
distribute-lft-neg-in71.5%
metadata-eval71.5%
mul-1-neg71.5%
associate-*r*71.5%
distribute-rgt-in71.4%
neg-mul-171.4%
sub-neg71.4%
Simplified71.4%
Final simplification71.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.3e+135) (not (<= y 2.8e+112))) (* y (- z)) (* a (- 1.0 t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.3e+135) || !(y <= 2.8e+112)) {
tmp = y * -z;
} else {
tmp = 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.3d+135)) .or. (.not. (y <= 2.8d+112))) then
tmp = y * -z
else
tmp = 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.3e+135) || !(y <= 2.8e+112)) {
tmp = y * -z;
} else {
tmp = a * (1.0 - t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.3e+135) or not (y <= 2.8e+112): tmp = y * -z else: tmp = a * (1.0 - t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.3e+135) || !(y <= 2.8e+112)) tmp = Float64(y * Float64(-z)); else tmp = 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.3e+135) || ~((y <= 2.8e+112))) tmp = y * -z; else tmp = a * (1.0 - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.3e+135], N[Not[LessEqual[y, 2.8e+112]], $MachinePrecision]], N[(y * (-z)), $MachinePrecision], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+135} \lor \neg \left(y \leq 2.8 \cdot 10^{+112}\right):\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if y < -2.3000000000000001e135 or 2.8000000000000001e112 < y Initial program 94.0%
Taylor expanded in y around inf 71.2%
Taylor expanded in b around 0 48.1%
mul-1-neg48.1%
distribute-rgt-neg-in48.1%
Simplified48.1%
if -2.3000000000000001e135 < y < 2.8000000000000001e112Initial program 98.2%
Taylor expanded in a around inf 39.2%
Final simplification42.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.7e+95) (not (<= z 24.0))) (* y (- z)) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.7e+95) || !(z <= 24.0)) {
tmp = y * -z;
} else {
tmp = x + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.7d+95)) .or. (.not. (z <= 24.0d0))) then
tmp = y * -z
else
tmp = x + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.7e+95) || !(z <= 24.0)) {
tmp = y * -z;
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.7e+95) or not (z <= 24.0): tmp = y * -z else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.7e+95) || !(z <= 24.0)) tmp = Float64(y * Float64(-z)); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.7e+95) || ~((z <= 24.0))) tmp = y * -z; else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.7e+95], N[Not[LessEqual[z, 24.0]], $MachinePrecision]], N[(y * (-z)), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+95} \lor \neg \left(z \leq 24\right):\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if z < -2.7e95 or 24 < z Initial program 95.7%
Taylor expanded in y around inf 44.1%
Taylor expanded in b around 0 39.2%
mul-1-neg39.2%
distribute-rgt-neg-in39.2%
Simplified39.2%
if -2.7e95 < z < 24Initial program 97.8%
Taylor expanded in b around 0 62.9%
Taylor expanded in t around 0 34.4%
+-commutative34.4%
sub-neg34.4%
metadata-eval34.4%
neg-mul-134.4%
fma-undefine34.4%
Simplified34.4%
Taylor expanded in z around 0 31.7%
Final simplification35.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -9e+130) z (if (<= z 2.6e+181) (+ x a) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -9e+130) {
tmp = z;
} else if (z <= 2.6e+181) {
tmp = x + a;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-9d+130)) then
tmp = z
else if (z <= 2.6d+181) then
tmp = x + a
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -9e+130) {
tmp = z;
} else if (z <= 2.6e+181) {
tmp = x + a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -9e+130: tmp = z elif z <= 2.6e+181: tmp = x + a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -9e+130) tmp = z; elseif (z <= 2.6e+181) tmp = Float64(x + a); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -9e+130) tmp = z; elseif (z <= 2.6e+181) tmp = x + a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -9e+130], z, If[LessEqual[z, 2.6e+181], N[(x + a), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+130}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+181}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -9.00000000000000078e130 or 2.6e181 < z Initial program 95.6%
Taylor expanded in z around inf 76.7%
Taylor expanded in y around 0 76.7%
Taylor expanded in y around 0 34.8%
if -9.00000000000000078e130 < z < 2.6e181Initial program 97.3%
Taylor expanded in b around 0 64.8%
Taylor expanded in t around 0 40.0%
+-commutative40.0%
sub-neg40.0%
metadata-eval40.0%
neg-mul-140.0%
fma-undefine40.0%
Simplified40.0%
Taylor expanded in z around 0 28.8%
Final simplification30.4%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.75e+111) z (if (<= z 1.4e+152) x z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+111) {
tmp = z;
} else if (z <= 1.4e+152) {
tmp = x;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.75d+111)) then
tmp = z
else if (z <= 1.4d+152) then
tmp = x
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.75e+111) {
tmp = z;
} else if (z <= 1.4e+152) {
tmp = x;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.75e+111: tmp = z elif z <= 1.4e+152: tmp = x else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.75e+111) tmp = z; elseif (z <= 1.4e+152) tmp = x; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.75e+111) tmp = z; elseif (z <= 1.4e+152) tmp = x; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.75e+111], z, If[LessEqual[z, 1.4e+152], x, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+111}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+152}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.7500000000000001e111 or 1.4000000000000001e152 < z Initial program 94.9%
Taylor expanded in z around inf 74.6%
Taylor expanded in y around 0 74.6%
Taylor expanded in y around 0 30.8%
if -1.7500000000000001e111 < z < 1.4000000000000001e152Initial program 97.7%
Taylor expanded in x around inf 20.5%
Final simplification23.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a -7.6e+49) a x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.6e+49) {
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 (a <= (-7.6d+49)) 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 (a <= -7.6e+49) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -7.6e+49: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -7.6e+49) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -7.6e+49) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7.6e+49], a, x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{+49}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.5999999999999997e49Initial program 94.9%
Taylor expanded in b around 0 84.5%
Taylor expanded in t around 0 47.7%
+-commutative47.7%
sub-neg47.7%
metadata-eval47.7%
neg-mul-147.7%
fma-undefine47.7%
Simplified47.7%
Taylor expanded in a around inf 25.5%
if -7.5999999999999997e49 < a Initial program 97.4%
Taylor expanded in x around inf 18.5%
Final simplification20.1%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 96.8%
Taylor expanded in b around 0 72.2%
Taylor expanded in t around 0 51.5%
+-commutative51.5%
sub-neg51.5%
metadata-eval51.5%
neg-mul-151.5%
fma-undefine51.5%
Simplified51.5%
Taylor expanded in a around inf 10.4%
Final simplification10.4%
herbie shell --seed 2024046
(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)))