
(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 27 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 (* (+ y -1.0) z))))
(if (<= (+ (+ t_1 (* a (- 1.0 t))) (* b (- (+ y t) 2.0))) INFINITY)
(- t_1 (fma (+ t -1.0) a (* b (- (- t) (+ y -2.0)))))
(* y (- b z)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((y + -1.0) * z);
double tmp;
if (((t_1 + (a * (1.0 - t))) + (b * ((y + t) - 2.0))) <= ((double) INFINITY)) {
tmp = t_1 - fma((t + -1.0), a, (b * (-t - (y + -2.0))));
} else {
tmp = y * (b - z);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(Float64(y + -1.0) * z)) tmp = 0.0 if (Float64(Float64(t_1 + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(y + t) - 2.0))) <= Inf) tmp = Float64(t_1 - fma(Float64(t + -1.0), a, Float64(b * Float64(Float64(-t) - Float64(y + -2.0))))); else tmp = Float64(y * Float64(b - z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(N[(y + -1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$1 + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 - N[(N[(t + -1.0), $MachinePrecision] * a + N[(b * N[((-t) - N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \left(y + -1\right) \cdot z\\
\mathbf{if}\;\left(t_1 + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right) \leq \infty:\\
\;\;\;\;t_1 - \mathsf{fma}\left(t + -1, a, b \cdot \left(\left(-t\right) - \left(y + -2\right)\right)\right)\\
\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%
associate-+l-100.0%
sub-neg100.0%
metadata-eval100.0%
*-commutative100.0%
fma-neg100.0%
sub-neg100.0%
metadata-eval100.0%
sub-neg100.0%
metadata-eval100.0%
associate-+r+100.0%
*-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+l+100.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 y around inf 71.9%
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.4%
associate--l+98.4%
sub-neg98.4%
metadata-eval98.4%
sub-neg98.4%
associate-+l-98.4%
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 (* a (- 1.0 t))) (t_2 (* z (- y))))
(if (<= y -4e+73)
t_2
(if (<= y -1.4e-88)
(+ x a)
(if (<= y -1.05e-214)
t_1
(if (<= y -4.7e-265)
(+ x a)
(if (<= y 5.8e-185)
(* t b)
(if (<= y 1.4e-130)
z
(if (<= y 3.3e+18)
t_1
(if (<= y 1.1e+108)
t_2
(if (<= y 2.2e+133) t_1 (* y b))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = z * -y;
double tmp;
if (y <= -4e+73) {
tmp = t_2;
} else if (y <= -1.4e-88) {
tmp = x + a;
} else if (y <= -1.05e-214) {
tmp = t_1;
} else if (y <= -4.7e-265) {
tmp = x + a;
} else if (y <= 5.8e-185) {
tmp = t * b;
} else if (y <= 1.4e-130) {
tmp = z;
} else if (y <= 3.3e+18) {
tmp = t_1;
} else if (y <= 1.1e+108) {
tmp = t_2;
} else if (y <= 2.2e+133) {
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) :: t_2
real(8) :: tmp
t_1 = a * (1.0d0 - t)
t_2 = z * -y
if (y <= (-4d+73)) then
tmp = t_2
else if (y <= (-1.4d-88)) then
tmp = x + a
else if (y <= (-1.05d-214)) then
tmp = t_1
else if (y <= (-4.7d-265)) then
tmp = x + a
else if (y <= 5.8d-185) then
tmp = t * b
else if (y <= 1.4d-130) then
tmp = z
else if (y <= 3.3d+18) then
tmp = t_1
else if (y <= 1.1d+108) then
tmp = t_2
else if (y <= 2.2d+133) 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 = a * (1.0 - t);
double t_2 = z * -y;
double tmp;
if (y <= -4e+73) {
tmp = t_2;
} else if (y <= -1.4e-88) {
tmp = x + a;
} else if (y <= -1.05e-214) {
tmp = t_1;
} else if (y <= -4.7e-265) {
tmp = x + a;
} else if (y <= 5.8e-185) {
tmp = t * b;
} else if (y <= 1.4e-130) {
tmp = z;
} else if (y <= 3.3e+18) {
tmp = t_1;
} else if (y <= 1.1e+108) {
tmp = t_2;
} else if (y <= 2.2e+133) {
tmp = t_1;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = z * -y tmp = 0 if y <= -4e+73: tmp = t_2 elif y <= -1.4e-88: tmp = x + a elif y <= -1.05e-214: tmp = t_1 elif y <= -4.7e-265: tmp = x + a elif y <= 5.8e-185: tmp = t * b elif y <= 1.4e-130: tmp = z elif y <= 3.3e+18: tmp = t_1 elif y <= 1.1e+108: tmp = t_2 elif y <= 2.2e+133: tmp = t_1 else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(z * Float64(-y)) tmp = 0.0 if (y <= -4e+73) tmp = t_2; elseif (y <= -1.4e-88) tmp = Float64(x + a); elseif (y <= -1.05e-214) tmp = t_1; elseif (y <= -4.7e-265) tmp = Float64(x + a); elseif (y <= 5.8e-185) tmp = Float64(t * b); elseif (y <= 1.4e-130) tmp = z; elseif (y <= 3.3e+18) tmp = t_1; elseif (y <= 1.1e+108) tmp = t_2; elseif (y <= 2.2e+133) tmp = t_1; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = z * -y; tmp = 0.0; if (y <= -4e+73) tmp = t_2; elseif (y <= -1.4e-88) tmp = x + a; elseif (y <= -1.05e-214) tmp = t_1; elseif (y <= -4.7e-265) tmp = x + a; elseif (y <= 5.8e-185) tmp = t * b; elseif (y <= 1.4e-130) tmp = z; elseif (y <= 3.3e+18) tmp = t_1; elseif (y <= 1.1e+108) tmp = t_2; elseif (y <= 2.2e+133) tmp = t_1; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -4e+73], t$95$2, If[LessEqual[y, -1.4e-88], N[(x + a), $MachinePrecision], If[LessEqual[y, -1.05e-214], t$95$1, If[LessEqual[y, -4.7e-265], N[(x + a), $MachinePrecision], If[LessEqual[y, 5.8e-185], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.4e-130], z, If[LessEqual[y, 3.3e+18], t$95$1, If[LessEqual[y, 1.1e+108], t$95$2, If[LessEqual[y, 2.2e+133], t$95$1, N[(y * b), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -4 \cdot 10^{+73}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-88}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-214}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-265}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-185}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-130}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+108}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+133}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -3.99999999999999993e73 or 3.3e18 < y < 1.1000000000000001e108Initial program 93.7%
Taylor expanded in z around inf 48.0%
Taylor expanded in y around inf 48.0%
mul-1-neg48.0%
*-commutative48.0%
distribute-rgt-neg-in48.0%
Simplified48.0%
if -3.99999999999999993e73 < y < -1.39999999999999988e-88 or -1.04999999999999996e-214 < y < -4.69999999999999986e-265Initial program 100.0%
Taylor expanded in z around 0 88.4%
Taylor expanded in b around 0 60.8%
Taylor expanded in t around 0 43.8%
cancel-sign-sub-inv43.8%
metadata-eval43.8%
*-lft-identity43.8%
+-commutative43.8%
Simplified43.8%
if -1.39999999999999988e-88 < y < -1.04999999999999996e-214 or 1.40000000000000008e-130 < y < 3.3e18 or 1.1000000000000001e108 < y < 2.2e133Initial program 96.9%
Taylor expanded in a around inf 47.9%
if -4.69999999999999986e-265 < y < 5.79999999999999989e-185Initial 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 t around 0 90.8%
Taylor expanded in t around inf 42.6%
if 5.79999999999999989e-185 < y < 1.40000000000000008e-130Initial program 100.0%
Taylor expanded in z around inf 58.3%
Taylor expanded in y around 0 58.3%
if 2.2e133 < y Initial program 97.2%
Taylor expanded in b around inf 58.8%
Taylor expanded in y around inf 50.3%
Final simplification47.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (- x (* (+ y -1.0) z)) (* 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 - ((y + -1.0) * z)) + (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 - ((y + -1.0) * z)) + (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 - ((y + -1.0) * z)) + (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(Float64(y + -1.0) * z)) + 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 - ((y + -1.0) * z)) + (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[(N[(y + -1.0), $MachinePrecision] * z), $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 - \left(y + -1\right) \cdot z\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.9%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (* z (- y))))
(if (<= y -4.35e+71)
t_2
(if (<= y -3e-164)
(+ x a)
(if (<= y 4.5e-179)
(* b (- t 2.0))
(if (<= y 1.25e-133)
z
(if (<= y 1.28e+17)
t_1
(if (<= y 3.7e+107) t_2 (if (<= y 4e+133) t_1 (* y b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = z * -y;
double tmp;
if (y <= -4.35e+71) {
tmp = t_2;
} else if (y <= -3e-164) {
tmp = x + a;
} else if (y <= 4.5e-179) {
tmp = b * (t - 2.0);
} else if (y <= 1.25e-133) {
tmp = z;
} else if (y <= 1.28e+17) {
tmp = t_1;
} else if (y <= 3.7e+107) {
tmp = t_2;
} else if (y <= 4e+133) {
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) :: t_2
real(8) :: tmp
t_1 = a * (1.0d0 - t)
t_2 = z * -y
if (y <= (-4.35d+71)) then
tmp = t_2
else if (y <= (-3d-164)) then
tmp = x + a
else if (y <= 4.5d-179) then
tmp = b * (t - 2.0d0)
else if (y <= 1.25d-133) then
tmp = z
else if (y <= 1.28d+17) then
tmp = t_1
else if (y <= 3.7d+107) then
tmp = t_2
else if (y <= 4d+133) 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 = a * (1.0 - t);
double t_2 = z * -y;
double tmp;
if (y <= -4.35e+71) {
tmp = t_2;
} else if (y <= -3e-164) {
tmp = x + a;
} else if (y <= 4.5e-179) {
tmp = b * (t - 2.0);
} else if (y <= 1.25e-133) {
tmp = z;
} else if (y <= 1.28e+17) {
tmp = t_1;
} else if (y <= 3.7e+107) {
tmp = t_2;
} else if (y <= 4e+133) {
tmp = t_1;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = z * -y tmp = 0 if y <= -4.35e+71: tmp = t_2 elif y <= -3e-164: tmp = x + a elif y <= 4.5e-179: tmp = b * (t - 2.0) elif y <= 1.25e-133: tmp = z elif y <= 1.28e+17: tmp = t_1 elif y <= 3.7e+107: tmp = t_2 elif y <= 4e+133: tmp = t_1 else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(z * Float64(-y)) tmp = 0.0 if (y <= -4.35e+71) tmp = t_2; elseif (y <= -3e-164) tmp = Float64(x + a); elseif (y <= 4.5e-179) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= 1.25e-133) tmp = z; elseif (y <= 1.28e+17) tmp = t_1; elseif (y <= 3.7e+107) tmp = t_2; elseif (y <= 4e+133) tmp = t_1; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = z * -y; tmp = 0.0; if (y <= -4.35e+71) tmp = t_2; elseif (y <= -3e-164) tmp = x + a; elseif (y <= 4.5e-179) tmp = b * (t - 2.0); elseif (y <= 1.25e-133) tmp = z; elseif (y <= 1.28e+17) tmp = t_1; elseif (y <= 3.7e+107) tmp = t_2; elseif (y <= 4e+133) tmp = t_1; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -4.35e+71], t$95$2, If[LessEqual[y, -3e-164], N[(x + a), $MachinePrecision], If[LessEqual[y, 4.5e-179], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-133], z, If[LessEqual[y, 1.28e+17], t$95$1, If[LessEqual[y, 3.7e+107], t$95$2, If[LessEqual[y, 4e+133], t$95$1, N[(y * b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -4.35 \cdot 10^{+71}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-164}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-179}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-133}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 1.28 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+107}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+133}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -4.3499999999999999e71 or 1.28e17 < y < 3.7e107Initial program 93.7%
Taylor expanded in z around inf 48.0%
Taylor expanded in y around inf 48.0%
mul-1-neg48.0%
*-commutative48.0%
distribute-rgt-neg-in48.0%
Simplified48.0%
if -4.3499999999999999e71 < y < -3.0000000000000001e-164Initial program 98.0%
Taylor expanded in z around 0 88.7%
Taylor expanded in b around 0 66.1%
Taylor expanded in t around 0 39.2%
cancel-sign-sub-inv39.2%
metadata-eval39.2%
*-lft-identity39.2%
+-commutative39.2%
Simplified39.2%
if -3.0000000000000001e-164 < y < 4.49999999999999992e-179Initial program 100.0%
Taylor expanded in b around inf 60.1%
Taylor expanded in y around 0 60.1%
if 4.49999999999999992e-179 < y < 1.25e-133Initial program 100.0%
Taylor expanded in z around inf 66.1%
Taylor expanded in y around 0 66.1%
if 1.25e-133 < y < 1.28e17 or 3.7e107 < y < 4.0000000000000001e133Initial program 97.5%
Taylor expanded in a around inf 49.7%
if 4.0000000000000001e133 < y Initial program 97.2%
Taylor expanded in b around inf 58.8%
Taylor expanded in y around inf 50.3%
Final simplification50.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (* t a))) (t_2 (* y (- b z))) (t_3 (+ x (+ z a))))
(if (<= y -7.5e+72)
t_2
(if (<= y -2e+52)
t_1
(if (<= y -125000000.0)
(* t (- b a))
(if (<= y -1.45e-90)
t_3
(if (<= y -4e-265)
t_1
(if (<= y 1.8e-186)
(* b (- t 2.0))
(if (<= y 500000000.0) t_3 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (t * a);
double t_2 = y * (b - z);
double t_3 = x + (z + a);
double tmp;
if (y <= -7.5e+72) {
tmp = t_2;
} else if (y <= -2e+52) {
tmp = t_1;
} else if (y <= -125000000.0) {
tmp = t * (b - a);
} else if (y <= -1.45e-90) {
tmp = t_3;
} else if (y <= -4e-265) {
tmp = t_1;
} else if (y <= 1.8e-186) {
tmp = b * (t - 2.0);
} else if (y <= 500000000.0) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x - (t * a)
t_2 = y * (b - z)
t_3 = x + (z + a)
if (y <= (-7.5d+72)) then
tmp = t_2
else if (y <= (-2d+52)) then
tmp = t_1
else if (y <= (-125000000.0d0)) then
tmp = t * (b - a)
else if (y <= (-1.45d-90)) then
tmp = t_3
else if (y <= (-4d-265)) then
tmp = t_1
else if (y <= 1.8d-186) then
tmp = b * (t - 2.0d0)
else if (y <= 500000000.0d0) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (t * a);
double t_2 = y * (b - z);
double t_3 = x + (z + a);
double tmp;
if (y <= -7.5e+72) {
tmp = t_2;
} else if (y <= -2e+52) {
tmp = t_1;
} else if (y <= -125000000.0) {
tmp = t * (b - a);
} else if (y <= -1.45e-90) {
tmp = t_3;
} else if (y <= -4e-265) {
tmp = t_1;
} else if (y <= 1.8e-186) {
tmp = b * (t - 2.0);
} else if (y <= 500000000.0) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (t * a) t_2 = y * (b - z) t_3 = x + (z + a) tmp = 0 if y <= -7.5e+72: tmp = t_2 elif y <= -2e+52: tmp = t_1 elif y <= -125000000.0: tmp = t * (b - a) elif y <= -1.45e-90: tmp = t_3 elif y <= -4e-265: tmp = t_1 elif y <= 1.8e-186: tmp = b * (t - 2.0) elif y <= 500000000.0: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(t * a)) t_2 = Float64(y * Float64(b - z)) t_3 = Float64(x + Float64(z + a)) tmp = 0.0 if (y <= -7.5e+72) tmp = t_2; elseif (y <= -2e+52) tmp = t_1; elseif (y <= -125000000.0) tmp = Float64(t * Float64(b - a)); elseif (y <= -1.45e-90) tmp = t_3; elseif (y <= -4e-265) tmp = t_1; elseif (y <= 1.8e-186) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= 500000000.0) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - (t * a); t_2 = y * (b - z); t_3 = x + (z + a); tmp = 0.0; if (y <= -7.5e+72) tmp = t_2; elseif (y <= -2e+52) tmp = t_1; elseif (y <= -125000000.0) tmp = t * (b - a); elseif (y <= -1.45e-90) tmp = t_3; elseif (y <= -4e-265) tmp = t_1; elseif (y <= 1.8e-186) tmp = b * (t - 2.0); elseif (y <= 500000000.0) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+72], t$95$2, If[LessEqual[y, -2e+52], t$95$1, If[LessEqual[y, -125000000.0], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e-90], t$95$3, If[LessEqual[y, -4e-265], t$95$1, If[LessEqual[y, 1.8e-186], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 500000000.0], t$95$3, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - t \cdot a\\
t_2 := y \cdot \left(b - z\right)\\
t_3 := x + \left(z + a\right)\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+72}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -125000000:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-90}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-265}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-186}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 500000000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -7.50000000000000027e72 or 5e8 < y Initial program 94.5%
Taylor expanded in y around inf 71.2%
if -7.50000000000000027e72 < y < -2e52 or -1.44999999999999992e-90 < y < -3.99999999999999994e-265Initial program 97.1%
Taylor expanded in z around 0 86.6%
Taylor expanded in b around 0 64.8%
Taylor expanded in t around inf 61.1%
*-commutative61.1%
Simplified61.1%
if -2e52 < y < -1.25e8Initial program 100.0%
Taylor expanded in t around inf 57.1%
if -1.25e8 < y < -1.44999999999999992e-90 or 1.7999999999999999e-186 < y < 5e8Initial program 99.9%
+-commutative99.9%
fma-def99.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%
Taylor expanded in t around 0 89.9%
Taylor expanded in b around 0 71.5%
associate--r+71.5%
sub-neg71.5%
mul-1-neg71.5%
remove-double-neg71.5%
sub-neg71.5%
metadata-eval71.5%
+-commutative71.5%
Simplified71.5%
Taylor expanded in y around 0 69.0%
cancel-sign-sub-inv69.0%
metadata-eval69.0%
*-lft-identity69.0%
+-commutative69.0%
associate-+l+69.0%
Simplified69.0%
if -3.99999999999999994e-265 < y < 1.7999999999999999e-186Initial program 100.0%
Taylor expanded in b around inf 72.7%
Taylor expanded in y around 0 72.7%
Final simplification68.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ x z) (* a (+ t -1.0)))) (t_2 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -1.9e+35)
t_2
(if (<= b -2.5e-6)
t_1
(if (<= b -2.3e-45)
(* y (- b z))
(if (<= b -2.9e-112)
t_1
(if (<= b -3.1e-165)
(+ a (* z (- 1.0 y)))
(if (<= b 2e+47) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + z) - (a * (t + -1.0));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.9e+35) {
tmp = t_2;
} else if (b <= -2.5e-6) {
tmp = t_1;
} else if (b <= -2.3e-45) {
tmp = y * (b - z);
} else if (b <= -2.9e-112) {
tmp = t_1;
} else if (b <= -3.1e-165) {
tmp = a + (z * (1.0 - y));
} else if (b <= 2e+47) {
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) - (a * (t + (-1.0d0)))
t_2 = x + (b * ((y + t) - 2.0d0))
if (b <= (-1.9d+35)) then
tmp = t_2
else if (b <= (-2.5d-6)) then
tmp = t_1
else if (b <= (-2.3d-45)) then
tmp = y * (b - z)
else if (b <= (-2.9d-112)) then
tmp = t_1
else if (b <= (-3.1d-165)) then
tmp = a + (z * (1.0d0 - y))
else if (b <= 2d+47) 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) - (a * (t + -1.0));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.9e+35) {
tmp = t_2;
} else if (b <= -2.5e-6) {
tmp = t_1;
} else if (b <= -2.3e-45) {
tmp = y * (b - z);
} else if (b <= -2.9e-112) {
tmp = t_1;
} else if (b <= -3.1e-165) {
tmp = a + (z * (1.0 - y));
} else if (b <= 2e+47) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + z) - (a * (t + -1.0)) t_2 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -1.9e+35: tmp = t_2 elif b <= -2.5e-6: tmp = t_1 elif b <= -2.3e-45: tmp = y * (b - z) elif b <= -2.9e-112: tmp = t_1 elif b <= -3.1e-165: tmp = a + (z * (1.0 - y)) elif b <= 2e+47: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + z) - Float64(a * Float64(t + -1.0))) t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -1.9e+35) tmp = t_2; elseif (b <= -2.5e-6) tmp = t_1; elseif (b <= -2.3e-45) tmp = Float64(y * Float64(b - z)); elseif (b <= -2.9e-112) tmp = t_1; elseif (b <= -3.1e-165) tmp = Float64(a + Float64(z * Float64(1.0 - y))); elseif (b <= 2e+47) 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) - (a * (t + -1.0)); t_2 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -1.9e+35) tmp = t_2; elseif (b <= -2.5e-6) tmp = t_1; elseif (b <= -2.3e-45) tmp = y * (b - z); elseif (b <= -2.9e-112) tmp = t_1; elseif (b <= -3.1e-165) tmp = a + (z * (1.0 - y)); elseif (b <= 2e+47) 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[(a * N[(t + -1.0), $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.9e+35], t$95$2, If[LessEqual[b, -2.5e-6], t$95$1, If[LessEqual[b, -2.3e-45], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.9e-112], t$95$1, If[LessEqual[b, -3.1e-165], N[(a + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e+47], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + z\right) - a \cdot \left(t + -1\right)\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.9 \cdot 10^{+35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2.5 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -2.3 \cdot 10^{-45}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;b \leq -2.9 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -3.1 \cdot 10^{-165}:\\
\;\;\;\;a + z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -1.9e35 or 2.0000000000000001e47 < b Initial program 93.0%
Taylor expanded in z around 0 90.1%
Taylor expanded in a around 0 82.3%
if -1.9e35 < b < -2.5000000000000002e-6 or -2.29999999999999992e-45 < b < -2.89999999999999992e-112 or -3.09999999999999996e-165 < b < 2.0000000000000001e47Initial program 100.0%
Taylor expanded in y around 0 78.4%
Taylor expanded in b around 0 74.9%
associate--r+74.9%
sub-neg74.9%
metadata-eval74.9%
+-commutative74.9%
*-commutative74.9%
cancel-sign-sub-inv74.9%
cancel-sign-sub-inv74.9%
metadata-eval74.9%
*-lft-identity74.9%
distribute-neg-in74.9%
metadata-eval74.9%
sub-neg74.9%
*-commutative74.9%
Simplified74.9%
if -2.5000000000000002e-6 < b < -2.29999999999999992e-45Initial program 100.0%
Taylor expanded in y around inf 80.3%
if -2.89999999999999992e-112 < b < -3.09999999999999996e-165Initial program 99.9%
+-commutative99.9%
fma-def99.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%
Taylor expanded in t around 0 99.9%
Taylor expanded in b around 0 86.8%
associate--r+86.8%
sub-neg86.8%
mul-1-neg86.8%
remove-double-neg86.8%
sub-neg86.8%
metadata-eval86.8%
+-commutative86.8%
Simplified86.8%
Taylor expanded in x around 0 70.2%
Final simplification77.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ x a) (* (+ y -1.0) z)))
(t_2 (- (+ x z) (* a (+ t -1.0))))
(t_3 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -1.9e+35)
t_3
(if (<= b -3.8e-8)
t_2
(if (<= b -9.8e-53)
(* y (- b z))
(if (<= b -3.8e-167)
t_1
(if (<= b 5.3e-179) t_2 (if (<= b 2.25e+17) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + a) - ((y + -1.0) * z);
double t_2 = (x + z) - (a * (t + -1.0));
double t_3 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.9e+35) {
tmp = t_3;
} else if (b <= -3.8e-8) {
tmp = t_2;
} else if (b <= -9.8e-53) {
tmp = y * (b - z);
} else if (b <= -3.8e-167) {
tmp = t_1;
} else if (b <= 5.3e-179) {
tmp = t_2;
} else if (b <= 2.25e+17) {
tmp = t_1;
} 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 = (x + a) - ((y + (-1.0d0)) * z)
t_2 = (x + z) - (a * (t + (-1.0d0)))
t_3 = x + (b * ((y + t) - 2.0d0))
if (b <= (-1.9d+35)) then
tmp = t_3
else if (b <= (-3.8d-8)) then
tmp = t_2
else if (b <= (-9.8d-53)) then
tmp = y * (b - z)
else if (b <= (-3.8d-167)) then
tmp = t_1
else if (b <= 5.3d-179) then
tmp = t_2
else if (b <= 2.25d+17) then
tmp = t_1
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 = (x + a) - ((y + -1.0) * z);
double t_2 = (x + z) - (a * (t + -1.0));
double t_3 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.9e+35) {
tmp = t_3;
} else if (b <= -3.8e-8) {
tmp = t_2;
} else if (b <= -9.8e-53) {
tmp = y * (b - z);
} else if (b <= -3.8e-167) {
tmp = t_1;
} else if (b <= 5.3e-179) {
tmp = t_2;
} else if (b <= 2.25e+17) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + a) - ((y + -1.0) * z) t_2 = (x + z) - (a * (t + -1.0)) t_3 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -1.9e+35: tmp = t_3 elif b <= -3.8e-8: tmp = t_2 elif b <= -9.8e-53: tmp = y * (b - z) elif b <= -3.8e-167: tmp = t_1 elif b <= 5.3e-179: tmp = t_2 elif b <= 2.25e+17: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + a) - Float64(Float64(y + -1.0) * z)) t_2 = Float64(Float64(x + z) - Float64(a * Float64(t + -1.0))) t_3 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -1.9e+35) tmp = t_3; elseif (b <= -3.8e-8) tmp = t_2; elseif (b <= -9.8e-53) tmp = Float64(y * Float64(b - z)); elseif (b <= -3.8e-167) tmp = t_1; elseif (b <= 5.3e-179) tmp = t_2; elseif (b <= 2.25e+17) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + a) - ((y + -1.0) * z); t_2 = (x + z) - (a * (t + -1.0)); t_3 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -1.9e+35) tmp = t_3; elseif (b <= -3.8e-8) tmp = t_2; elseif (b <= -9.8e-53) tmp = y * (b - z); elseif (b <= -3.8e-167) tmp = t_1; elseif (b <= 5.3e-179) tmp = t_2; elseif (b <= 2.25e+17) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + a), $MachinePrecision] - N[(N[(y + -1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + z), $MachinePrecision] - N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.9e+35], t$95$3, If[LessEqual[b, -3.8e-8], t$95$2, If[LessEqual[b, -9.8e-53], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.8e-167], t$95$1, If[LessEqual[b, 5.3e-179], t$95$2, If[LessEqual[b, 2.25e+17], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + a\right) - \left(y + -1\right) \cdot z\\
t_2 := \left(x + z\right) - a \cdot \left(t + -1\right)\\
t_3 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.9 \cdot 10^{+35}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -3.8 \cdot 10^{-8}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -9.8 \cdot 10^{-53}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;b \leq -3.8 \cdot 10^{-167}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5.3 \cdot 10^{-179}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 2.25 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if b < -1.9e35 or 2.25e17 < b Initial program 93.3%
Taylor expanded in z around 0 89.7%
Taylor expanded in a around 0 79.6%
if -1.9e35 < b < -3.80000000000000028e-8 or -3.79999999999999967e-167 < b < 5.29999999999999994e-179Initial program 100.0%
Taylor expanded in y around 0 85.8%
Taylor expanded in b around 0 84.4%
associate--r+84.4%
sub-neg84.4%
metadata-eval84.4%
+-commutative84.4%
*-commutative84.4%
cancel-sign-sub-inv84.4%
cancel-sign-sub-inv84.4%
metadata-eval84.4%
*-lft-identity84.4%
distribute-neg-in84.4%
metadata-eval84.4%
sub-neg84.4%
*-commutative84.4%
Simplified84.4%
if -3.80000000000000028e-8 < b < -9.79999999999999926e-53Initial program 100.0%
Taylor expanded in y around inf 73.5%
if -9.79999999999999926e-53 < b < -3.79999999999999967e-167 or 5.29999999999999994e-179 < b < 2.25e17Initial program 99.9%
+-commutative99.9%
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 t around 0 88.0%
Taylor expanded in b around 0 75.6%
associate--r+75.7%
sub-neg75.7%
mul-1-neg75.7%
remove-double-neg75.7%
sub-neg75.7%
metadata-eval75.7%
+-commutative75.7%
Simplified75.7%
Final simplification79.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ z a))) (t_2 (* y (- b z))))
(if (<= y -4.6e+71)
t_2
(if (<= y -6.8e-93)
t_1
(if (<= y -7.6e-243)
(* t (- b a))
(if (<= y -8.5e-266)
t_1
(if (<= y 1.85e-186)
(* b (- t 2.0))
(if (<= y 7000000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z + a);
double t_2 = y * (b - z);
double tmp;
if (y <= -4.6e+71) {
tmp = t_2;
} else if (y <= -6.8e-93) {
tmp = t_1;
} else if (y <= -7.6e-243) {
tmp = t * (b - a);
} else if (y <= -8.5e-266) {
tmp = t_1;
} else if (y <= 1.85e-186) {
tmp = b * (t - 2.0);
} else if (y <= 7000000000.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 = x + (z + a)
t_2 = y * (b - z)
if (y <= (-4.6d+71)) then
tmp = t_2
else if (y <= (-6.8d-93)) then
tmp = t_1
else if (y <= (-7.6d-243)) then
tmp = t * (b - a)
else if (y <= (-8.5d-266)) then
tmp = t_1
else if (y <= 1.85d-186) then
tmp = b * (t - 2.0d0)
else if (y <= 7000000000.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 = x + (z + a);
double t_2 = y * (b - z);
double tmp;
if (y <= -4.6e+71) {
tmp = t_2;
} else if (y <= -6.8e-93) {
tmp = t_1;
} else if (y <= -7.6e-243) {
tmp = t * (b - a);
} else if (y <= -8.5e-266) {
tmp = t_1;
} else if (y <= 1.85e-186) {
tmp = b * (t - 2.0);
} else if (y <= 7000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z + a) t_2 = y * (b - z) tmp = 0 if y <= -4.6e+71: tmp = t_2 elif y <= -6.8e-93: tmp = t_1 elif y <= -7.6e-243: tmp = t * (b - a) elif y <= -8.5e-266: tmp = t_1 elif y <= 1.85e-186: tmp = b * (t - 2.0) elif y <= 7000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z + a)) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -4.6e+71) tmp = t_2; elseif (y <= -6.8e-93) tmp = t_1; elseif (y <= -7.6e-243) tmp = Float64(t * Float64(b - a)); elseif (y <= -8.5e-266) tmp = t_1; elseif (y <= 1.85e-186) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= 7000000000.0) 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 + a); t_2 = y * (b - z); tmp = 0.0; if (y <= -4.6e+71) tmp = t_2; elseif (y <= -6.8e-93) tmp = t_1; elseif (y <= -7.6e-243) tmp = t * (b - a); elseif (y <= -8.5e-266) tmp = t_1; elseif (y <= 1.85e-186) tmp = b * (t - 2.0); elseif (y <= 7000000000.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[(x + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+71], t$95$2, If[LessEqual[y, -6.8e-93], t$95$1, If[LessEqual[y, -7.6e-243], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.5e-266], t$95$1, If[LessEqual[y, 1.85e-186], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7000000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z + a\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+71}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{-93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{-243}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-266}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-186}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 7000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.6000000000000005e71 or 7e9 < y Initial program 94.5%
Taylor expanded in y around inf 71.2%
if -4.6000000000000005e71 < y < -6.80000000000000002e-93 or -7.5999999999999996e-243 < y < -8.5000000000000002e-266 or 1.8500000000000001e-186 < y < 7e9Initial program 99.9%
+-commutative99.9%
fma-def99.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%
Taylor expanded in t around 0 87.6%
Taylor expanded in b around 0 67.4%
associate--r+67.4%
sub-neg67.4%
mul-1-neg67.4%
remove-double-neg67.4%
sub-neg67.4%
metadata-eval67.4%
+-commutative67.4%
Simplified67.4%
Taylor expanded in y around 0 64.4%
cancel-sign-sub-inv64.4%
metadata-eval64.4%
*-lft-identity64.4%
+-commutative64.4%
associate-+l+64.4%
Simplified64.4%
if -6.80000000000000002e-93 < y < -7.5999999999999996e-243Initial program 96.2%
Taylor expanded in t around inf 55.1%
if -8.5000000000000002e-266 < y < 1.8500000000000001e-186Initial program 100.0%
Taylor expanded in b around inf 74.8%
Taylor expanded in y around 0 74.8%
Final simplification67.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -2.7e+49)
t_1
(if (<= y -3.2e-165)
(* t (- b a))
(if (<= y 6e-180)
(* b (- t 2.0))
(if (<= y 2.6e-130) z (if (<= y 6.8e+15) (* a (- 1.0 t)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -2.7e+49) {
tmp = t_1;
} else if (y <= -3.2e-165) {
tmp = t * (b - a);
} else if (y <= 6e-180) {
tmp = b * (t - 2.0);
} else if (y <= 2.6e-130) {
tmp = z;
} else if (y <= 6.8e+15) {
tmp = a * (1.0 - t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * (b - z)
if (y <= (-2.7d+49)) then
tmp = t_1
else if (y <= (-3.2d-165)) then
tmp = t * (b - a)
else if (y <= 6d-180) then
tmp = b * (t - 2.0d0)
else if (y <= 2.6d-130) then
tmp = z
else if (y <= 6.8d+15) then
tmp = a * (1.0d0 - t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -2.7e+49) {
tmp = t_1;
} else if (y <= -3.2e-165) {
tmp = t * (b - a);
} else if (y <= 6e-180) {
tmp = b * (t - 2.0);
} else if (y <= 2.6e-130) {
tmp = z;
} else if (y <= 6.8e+15) {
tmp = a * (1.0 - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -2.7e+49: tmp = t_1 elif y <= -3.2e-165: tmp = t * (b - a) elif y <= 6e-180: tmp = b * (t - 2.0) elif y <= 2.6e-130: tmp = z elif y <= 6.8e+15: tmp = a * (1.0 - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -2.7e+49) tmp = t_1; elseif (y <= -3.2e-165) tmp = Float64(t * Float64(b - a)); elseif (y <= 6e-180) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= 2.6e-130) tmp = z; elseif (y <= 6.8e+15) tmp = Float64(a * Float64(1.0 - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -2.7e+49) tmp = t_1; elseif (y <= -3.2e-165) tmp = t * (b - a); elseif (y <= 6e-180) tmp = b * (t - 2.0); elseif (y <= 2.6e-130) tmp = z; elseif (y <= 6.8e+15) tmp = a * (1.0 - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+49], t$95$1, If[LessEqual[y, -3.2e-165], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-180], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e-130], z, If[LessEqual[y, 6.8e+15], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-165}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-180}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-130}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+15}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.7000000000000001e49 or 6.8e15 < y Initial program 94.7%
Taylor expanded in y around inf 69.4%
if -2.7000000000000001e49 < y < -3.20000000000000013e-165Initial program 97.7%
Taylor expanded in t around inf 47.1%
if -3.20000000000000013e-165 < y < 6.0000000000000001e-180Initial program 100.0%
Taylor expanded in b around inf 60.1%
Taylor expanded in y around 0 60.1%
if 6.0000000000000001e-180 < y < 2.6000000000000001e-130Initial program 100.0%
Taylor expanded in z around inf 66.1%
Taylor expanded in y around 0 66.1%
if 2.6000000000000001e-130 < y < 6.8e15Initial program 99.9%
Taylor expanded in a around inf 46.4%
Final simplification60.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- y))))
(if (<= y -1.4e+72)
t_1
(if (<= y -1.32e-264)
(+ x a)
(if (<= y 5.8e-185)
(* t b)
(if (<= y 3.6e+15) (+ x a) (if (<= y 2.45e+117) t_1 (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * -y;
double tmp;
if (y <= -1.4e+72) {
tmp = t_1;
} else if (y <= -1.32e-264) {
tmp = x + a;
} else if (y <= 5.8e-185) {
tmp = t * b;
} else if (y <= 3.6e+15) {
tmp = x + a;
} else if (y <= 2.45e+117) {
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 = z * -y
if (y <= (-1.4d+72)) then
tmp = t_1
else if (y <= (-1.32d-264)) then
tmp = x + a
else if (y <= 5.8d-185) then
tmp = t * b
else if (y <= 3.6d+15) then
tmp = x + a
else if (y <= 2.45d+117) 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 = z * -y;
double tmp;
if (y <= -1.4e+72) {
tmp = t_1;
} else if (y <= -1.32e-264) {
tmp = x + a;
} else if (y <= 5.8e-185) {
tmp = t * b;
} else if (y <= 3.6e+15) {
tmp = x + a;
} else if (y <= 2.45e+117) {
tmp = t_1;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * -y tmp = 0 if y <= -1.4e+72: tmp = t_1 elif y <= -1.32e-264: tmp = x + a elif y <= 5.8e-185: tmp = t * b elif y <= 3.6e+15: tmp = x + a elif y <= 2.45e+117: tmp = t_1 else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(-y)) tmp = 0.0 if (y <= -1.4e+72) tmp = t_1; elseif (y <= -1.32e-264) tmp = Float64(x + a); elseif (y <= 5.8e-185) tmp = Float64(t * b); elseif (y <= 3.6e+15) tmp = Float64(x + a); elseif (y <= 2.45e+117) tmp = t_1; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * -y; tmp = 0.0; if (y <= -1.4e+72) tmp = t_1; elseif (y <= -1.32e-264) tmp = x + a; elseif (y <= 5.8e-185) tmp = t * b; elseif (y <= 3.6e+15) tmp = x + a; elseif (y <= 2.45e+117) tmp = t_1; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -1.4e+72], t$95$1, If[LessEqual[y, -1.32e-264], N[(x + a), $MachinePrecision], If[LessEqual[y, 5.8e-185], N[(t * b), $MachinePrecision], If[LessEqual[y, 3.6e+15], N[(x + a), $MachinePrecision], If[LessEqual[y, 2.45e+117], t$95$1, N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.32 \cdot 10^{-264}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-185}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+15}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{+117}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.4e72 or 3.6e15 < y < 2.45e117Initial program 92.7%
Taylor expanded in z around inf 46.2%
Taylor expanded in y around inf 46.2%
mul-1-neg46.2%
*-commutative46.2%
distribute-rgt-neg-in46.2%
Simplified46.2%
if -1.4e72 < y < -1.32000000000000001e-264 or 5.79999999999999989e-185 < y < 3.6e15Initial program 99.1%
Taylor expanded in z around 0 77.8%
Taylor expanded in b around 0 56.6%
Taylor expanded in t around 0 37.6%
cancel-sign-sub-inv37.6%
metadata-eval37.6%
*-lft-identity37.6%
+-commutative37.6%
Simplified37.6%
if -1.32000000000000001e-264 < y < 5.79999999999999989e-185Initial 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 t around 0 90.8%
Taylor expanded in t around inf 42.6%
if 2.45e117 < y Initial program 97.5%
Taylor expanded in b around inf 55.8%
Taylor expanded in y around inf 48.0%
Final simplification42.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ x z) (* a (+ t -1.0)))) (t_2 (* y (- b z))))
(if (<= y -3.95e+73)
t_2
(if (<= y -3.5e-189)
t_1
(if (<= y 1.1e-122)
(+ z (+ x (* b (- t 2.0))))
(if (<= y 1.08e+17) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + z) - (a * (t + -1.0));
double t_2 = y * (b - z);
double tmp;
if (y <= -3.95e+73) {
tmp = t_2;
} else if (y <= -3.5e-189) {
tmp = t_1;
} else if (y <= 1.1e-122) {
tmp = z + (x + (b * (t - 2.0)));
} else if (y <= 1.08e+17) {
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) - (a * (t + (-1.0d0)))
t_2 = y * (b - z)
if (y <= (-3.95d+73)) then
tmp = t_2
else if (y <= (-3.5d-189)) then
tmp = t_1
else if (y <= 1.1d-122) then
tmp = z + (x + (b * (t - 2.0d0)))
else if (y <= 1.08d+17) 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) - (a * (t + -1.0));
double t_2 = y * (b - z);
double tmp;
if (y <= -3.95e+73) {
tmp = t_2;
} else if (y <= -3.5e-189) {
tmp = t_1;
} else if (y <= 1.1e-122) {
tmp = z + (x + (b * (t - 2.0)));
} else if (y <= 1.08e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + z) - (a * (t + -1.0)) t_2 = y * (b - z) tmp = 0 if y <= -3.95e+73: tmp = t_2 elif y <= -3.5e-189: tmp = t_1 elif y <= 1.1e-122: tmp = z + (x + (b * (t - 2.0))) elif y <= 1.08e+17: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + z) - Float64(a * Float64(t + -1.0))) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -3.95e+73) tmp = t_2; elseif (y <= -3.5e-189) tmp = t_1; elseif (y <= 1.1e-122) tmp = Float64(z + Float64(x + Float64(b * Float64(t - 2.0)))); elseif (y <= 1.08e+17) 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) - (a * (t + -1.0)); t_2 = y * (b - z); tmp = 0.0; if (y <= -3.95e+73) tmp = t_2; elseif (y <= -3.5e-189) tmp = t_1; elseif (y <= 1.1e-122) tmp = z + (x + (b * (t - 2.0))); elseif (y <= 1.08e+17) 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[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.95e+73], t$95$2, If[LessEqual[y, -3.5e-189], t$95$1, If[LessEqual[y, 1.1e-122], N[(z + N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e+17], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + z\right) - a \cdot \left(t + -1\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -3.95 \cdot 10^{+73}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-189}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-122}:\\
\;\;\;\;z + \left(x + b \cdot \left(t - 2\right)\right)\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -3.9499999999999997e73 or 1.08e17 < y Initial program 94.4%
Taylor expanded in y around inf 71.9%
if -3.9499999999999997e73 < y < -3.5000000000000001e-189 or 1.1e-122 < y < 1.08e17Initial program 98.8%
Taylor expanded in y around 0 91.5%
Taylor expanded in b around 0 75.3%
associate--r+75.3%
sub-neg75.3%
metadata-eval75.3%
+-commutative75.3%
*-commutative75.3%
cancel-sign-sub-inv75.3%
cancel-sign-sub-inv75.3%
metadata-eval75.3%
*-lft-identity75.3%
distribute-neg-in75.3%
metadata-eval75.3%
sub-neg75.3%
*-commutative75.3%
Simplified75.3%
if -3.5000000000000001e-189 < y < 1.1e-122Initial program 100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in a around 0 85.8%
Final simplification76.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -1.9e+35)
t_1
(if (<= b 0.034)
(+ x (+ (* z (- 1.0 y)) (* a (- 1.0 t))))
(if (<= b 1.75e+89)
(+ (- x (* (+ y -1.0) z)) (* t (- b a)))
(if (<= b 9.2e+95) (+ x (+ a (* -2.0 b))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.9e+35) {
tmp = t_1;
} else if (b <= 0.034) {
tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t)));
} else if (b <= 1.75e+89) {
tmp = (x - ((y + -1.0) * z)) + (t * (b - a));
} else if (b <= 9.2e+95) {
tmp = x + (a + (-2.0 * b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (b * ((y + t) - 2.0d0))
if (b <= (-1.9d+35)) then
tmp = t_1
else if (b <= 0.034d0) then
tmp = x + ((z * (1.0d0 - y)) + (a * (1.0d0 - t)))
else if (b <= 1.75d+89) then
tmp = (x - ((y + (-1.0d0)) * z)) + (t * (b - a))
else if (b <= 9.2d+95) then
tmp = x + (a + ((-2.0d0) * b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -1.9e+35) {
tmp = t_1;
} else if (b <= 0.034) {
tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t)));
} else if (b <= 1.75e+89) {
tmp = (x - ((y + -1.0) * z)) + (t * (b - a));
} else if (b <= 9.2e+95) {
tmp = x + (a + (-2.0 * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -1.9e+35: tmp = t_1 elif b <= 0.034: tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t))) elif b <= 1.75e+89: tmp = (x - ((y + -1.0) * z)) + (t * (b - a)) elif b <= 9.2e+95: tmp = x + (a + (-2.0 * b)) else: tmp = t_1 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 <= -1.9e+35) tmp = t_1; elseif (b <= 0.034) tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) + Float64(a * Float64(1.0 - t)))); elseif (b <= 1.75e+89) tmp = Float64(Float64(x - Float64(Float64(y + -1.0) * z)) + Float64(t * Float64(b - a))); elseif (b <= 9.2e+95) tmp = Float64(x + Float64(a + Float64(-2.0 * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -1.9e+35) tmp = t_1; elseif (b <= 0.034) tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t))); elseif (b <= 1.75e+89) tmp = (x - ((y + -1.0) * z)) + (t * (b - a)); elseif (b <= 9.2e+95) tmp = x + (a + (-2.0 * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.9e+35], t$95$1, If[LessEqual[b, 0.034], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.75e+89], N[(N[(x - N[(N[(y + -1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.2e+95], N[(x + N[(a + N[(-2.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.9 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 0.034:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\
\mathbf{elif}\;b \leq 1.75 \cdot 10^{+89}:\\
\;\;\;\;\left(x - \left(y + -1\right) \cdot z\right) + t \cdot \left(b - a\right)\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+95}:\\
\;\;\;\;x + \left(a + -2 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -1.9e35 or 9.19999999999999989e95 < b Initial program 92.1%
Taylor expanded in z around 0 90.0%
Taylor expanded in a around 0 84.6%
if -1.9e35 < b < 0.034000000000000002Initial program 100.0%
Taylor expanded in b around 0 91.0%
if 0.034000000000000002 < b < 1.75e89Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
metadata-eval99.8%
*-commutative99.8%
fma-neg99.9%
sub-neg99.9%
metadata-eval99.9%
sub-neg99.9%
metadata-eval99.9%
associate-+r+99.9%
*-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 92.3%
Taylor expanded in t around inf 87.0%
if 1.75e89 < b < 9.19999999999999989e95Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in t around 0 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
neg-mul-1100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification88.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ y -1.0) z)))
(if (or (<= t -7.5e+42) (not (<= t 1.2e+78)))
(+ (- x t_1) (* t (- b a)))
(+ (* b (- (+ y t) 2.0)) (- (+ x a) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + -1.0) * z;
double tmp;
if ((t <= -7.5e+42) || !(t <= 1.2e+78)) {
tmp = (x - t_1) + (t * (b - a));
} else {
tmp = (b * ((y + t) - 2.0)) + ((x + a) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y + (-1.0d0)) * z
if ((t <= (-7.5d+42)) .or. (.not. (t <= 1.2d+78))) then
tmp = (x - t_1) + (t * (b - a))
else
tmp = (b * ((y + t) - 2.0d0)) + ((x + a) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + -1.0) * z;
double tmp;
if ((t <= -7.5e+42) || !(t <= 1.2e+78)) {
tmp = (x - t_1) + (t * (b - a));
} else {
tmp = (b * ((y + t) - 2.0)) + ((x + a) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y + -1.0) * z tmp = 0 if (t <= -7.5e+42) or not (t <= 1.2e+78): tmp = (x - t_1) + (t * (b - a)) else: tmp = (b * ((y + t) - 2.0)) + ((x + a) - t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y + -1.0) * z) tmp = 0.0 if ((t <= -7.5e+42) || !(t <= 1.2e+78)) tmp = Float64(Float64(x - t_1) + Float64(t * Float64(b - a))); else tmp = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) + Float64(Float64(x + a) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y + -1.0) * z; tmp = 0.0; if ((t <= -7.5e+42) || ~((t <= 1.2e+78))) tmp = (x - t_1) + (t * (b - a)); else tmp = (b * ((y + t) - 2.0)) + ((x + a) - t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + -1.0), $MachinePrecision] * z), $MachinePrecision]}, If[Or[LessEqual[t, -7.5e+42], N[Not[LessEqual[t, 1.2e+78]], $MachinePrecision]], N[(N[(x - t$95$1), $MachinePrecision] + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x + a), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + -1\right) \cdot z\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+42} \lor \neg \left(t \leq 1.2 \cdot 10^{+78}\right):\\
\;\;\;\;\left(x - t_1\right) + t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) + \left(\left(x + a\right) - t_1\right)\\
\end{array}
\end{array}
if t < -7.50000000000000041e42 or 1.1999999999999999e78 < t Initial program 95.4%
associate-+l-95.4%
sub-neg95.4%
metadata-eval95.4%
*-commutative95.4%
fma-neg95.4%
sub-neg95.4%
metadata-eval95.4%
sub-neg95.4%
metadata-eval95.4%
associate-+r+95.4%
*-commutative95.4%
associate-+r+95.4%
+-commutative95.4%
associate-+l+95.4%
Applied egg-rr95.4%
Taylor expanded in t around inf 90.9%
Taylor expanded in t around inf 93.1%
if -7.50000000000000041e42 < t < 1.1999999999999999e78Initial program 98.2%
Taylor expanded in t around 0 96.0%
associate--r+96.0%
sub-neg96.0%
metadata-eval96.0%
sub-neg96.0%
cancel-sign-sub-inv96.0%
metadata-eval96.0%
*-lft-identity96.0%
distribute-rgt-in96.0%
+-commutative96.0%
distribute-neg-in96.0%
distribute-lft-neg-in96.0%
metadata-eval96.0%
mul-1-neg96.0%
associate-*r*96.0%
*-commutative96.0%
distribute-rgt-in96.0%
*-commutative96.0%
neg-mul-196.0%
sub-neg96.0%
Simplified96.0%
Final simplification95.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -2.25e+72)
t_1
(if (<= y -3.4e-265)
(- x (* a (+ t -1.0)))
(if (<= y 2.55e-186)
(* b (- t 2.0))
(if (<= y 108000000.0) (+ x (+ z a)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -2.25e+72) {
tmp = t_1;
} else if (y <= -3.4e-265) {
tmp = x - (a * (t + -1.0));
} else if (y <= 2.55e-186) {
tmp = b * (t - 2.0);
} else if (y <= 108000000.0) {
tmp = x + (z + 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 = y * (b - z)
if (y <= (-2.25d+72)) then
tmp = t_1
else if (y <= (-3.4d-265)) then
tmp = x - (a * (t + (-1.0d0)))
else if (y <= 2.55d-186) then
tmp = b * (t - 2.0d0)
else if (y <= 108000000.0d0) then
tmp = x + (z + 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 = y * (b - z);
double tmp;
if (y <= -2.25e+72) {
tmp = t_1;
} else if (y <= -3.4e-265) {
tmp = x - (a * (t + -1.0));
} else if (y <= 2.55e-186) {
tmp = b * (t - 2.0);
} else if (y <= 108000000.0) {
tmp = x + (z + a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -2.25e+72: tmp = t_1 elif y <= -3.4e-265: tmp = x - (a * (t + -1.0)) elif y <= 2.55e-186: tmp = b * (t - 2.0) elif y <= 108000000.0: tmp = x + (z + a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -2.25e+72) tmp = t_1; elseif (y <= -3.4e-265) tmp = Float64(x - Float64(a * Float64(t + -1.0))); elseif (y <= 2.55e-186) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= 108000000.0) tmp = Float64(x + Float64(z + a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -2.25e+72) tmp = t_1; elseif (y <= -3.4e-265) tmp = x - (a * (t + -1.0)); elseif (y <= 2.55e-186) tmp = b * (t - 2.0); elseif (y <= 108000000.0) tmp = x + (z + a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.25e+72], t$95$1, If[LessEqual[y, -3.4e-265], N[(x - N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.55e-186], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 108000000.0], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -2.25 \cdot 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-265}:\\
\;\;\;\;x - a \cdot \left(t + -1\right)\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-186}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 108000000:\\
\;\;\;\;x + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.2499999999999999e72 or 1.08e8 < y Initial program 94.5%
Taylor expanded in y around inf 71.2%
if -2.2499999999999999e72 < y < -3.4000000000000001e-265Initial program 98.5%
Taylor expanded in z around 0 87.2%
Taylor expanded in b around 0 61.0%
if -3.4000000000000001e-265 < y < 2.5500000000000002e-186Initial program 100.0%
Taylor expanded in b around inf 72.7%
Taylor expanded in y around 0 72.7%
if 2.5500000000000002e-186 < y < 1.08e8Initial program 99.9%
+-commutative99.9%
fma-def99.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%
Taylor expanded in t around 0 91.9%
Taylor expanded in b around 0 75.0%
associate--r+75.0%
sub-neg75.0%
mul-1-neg75.0%
remove-double-neg75.0%
sub-neg75.0%
metadata-eval75.0%
+-commutative75.0%
Simplified75.0%
Taylor expanded in y around 0 71.3%
cancel-sign-sub-inv71.3%
metadata-eval71.3%
*-lft-identity71.3%
+-commutative71.3%
associate-+l+71.3%
Simplified71.3%
Final simplification68.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -7e+71)
t_1
(if (<= y -1.36e-163)
(- x (* a (+ t -1.0)))
(if (<= y 2.8e-186)
(+ x (* b (- (+ y t) 2.0)))
(if (<= y 1500000000.0) (+ x (+ z a)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -7e+71) {
tmp = t_1;
} else if (y <= -1.36e-163) {
tmp = x - (a * (t + -1.0));
} else if (y <= 2.8e-186) {
tmp = x + (b * ((y + t) - 2.0));
} else if (y <= 1500000000.0) {
tmp = x + (z + 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 = y * (b - z)
if (y <= (-7d+71)) then
tmp = t_1
else if (y <= (-1.36d-163)) then
tmp = x - (a * (t + (-1.0d0)))
else if (y <= 2.8d-186) then
tmp = x + (b * ((y + t) - 2.0d0))
else if (y <= 1500000000.0d0) then
tmp = x + (z + 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 = y * (b - z);
double tmp;
if (y <= -7e+71) {
tmp = t_1;
} else if (y <= -1.36e-163) {
tmp = x - (a * (t + -1.0));
} else if (y <= 2.8e-186) {
tmp = x + (b * ((y + t) - 2.0));
} else if (y <= 1500000000.0) {
tmp = x + (z + a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -7e+71: tmp = t_1 elif y <= -1.36e-163: tmp = x - (a * (t + -1.0)) elif y <= 2.8e-186: tmp = x + (b * ((y + t) - 2.0)) elif y <= 1500000000.0: tmp = x + (z + a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -7e+71) tmp = t_1; elseif (y <= -1.36e-163) tmp = Float64(x - Float64(a * Float64(t + -1.0))); elseif (y <= 2.8e-186) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); elseif (y <= 1500000000.0) tmp = Float64(x + Float64(z + a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -7e+71) tmp = t_1; elseif (y <= -1.36e-163) tmp = x - (a * (t + -1.0)); elseif (y <= 2.8e-186) tmp = x + (b * ((y + t) - 2.0)); elseif (y <= 1500000000.0) tmp = x + (z + a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+71], t$95$1, If[LessEqual[y, -1.36e-163], N[(x - N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-186], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1500000000.0], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -7 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.36 \cdot 10^{-163}:\\
\;\;\;\;x - a \cdot \left(t + -1\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-186}:\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{elif}\;y \leq 1500000000:\\
\;\;\;\;x + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -6.9999999999999998e71 or 1.5e9 < y Initial program 94.5%
Taylor expanded in y around inf 71.2%
if -6.9999999999999998e71 < y < -1.36e-163Initial program 98.0%
Taylor expanded in z around 0 88.7%
Taylor expanded in b around 0 66.1%
if -1.36e-163 < y < 2.79999999999999983e-186Initial program 100.0%
Taylor expanded in z around 0 85.9%
Taylor expanded in a around 0 70.6%
if 2.79999999999999983e-186 < y < 1.5e9Initial program 99.9%
+-commutative99.9%
fma-def99.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%
Taylor expanded in t around 0 91.9%
Taylor expanded in b around 0 75.0%
associate--r+75.0%
sub-neg75.0%
mul-1-neg75.0%
remove-double-neg75.0%
sub-neg75.0%
metadata-eval75.0%
+-commutative75.0%
Simplified75.0%
Taylor expanded in y around 0 71.3%
cancel-sign-sub-inv71.3%
metadata-eval71.3%
*-lft-identity71.3%
+-commutative71.3%
associate-+l+71.3%
Simplified71.3%
Final simplification70.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -33000000000000.0) (not (<= z 1200000000.0))) (+ (- x (* (+ y -1.0) z)) (* t (- b a))) (+ (+ x (* b (- (+ y t) 2.0))) (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -33000000000000.0) || !(z <= 1200000000.0)) {
tmp = (x - ((y + -1.0) * z)) + (t * (b - a));
} else {
tmp = (x + (b * ((y + 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 ((z <= (-33000000000000.0d0)) .or. (.not. (z <= 1200000000.0d0))) then
tmp = (x - ((y + (-1.0d0)) * z)) + (t * (b - a))
else
tmp = (x + (b * ((y + 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 ((z <= -33000000000000.0) || !(z <= 1200000000.0)) {
tmp = (x - ((y + -1.0) * z)) + (t * (b - a));
} else {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -33000000000000.0) or not (z <= 1200000000.0): tmp = (x - ((y + -1.0) * z)) + (t * (b - a)) else: tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -33000000000000.0) || !(z <= 1200000000.0)) tmp = Float64(Float64(x - Float64(Float64(y + -1.0) * z)) + Float64(t * Float64(b - a))); else tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + 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 ((z <= -33000000000000.0) || ~((z <= 1200000000.0))) tmp = (x - ((y + -1.0) * z)) + (t * (b - a)); else tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -33000000000000.0], N[Not[LessEqual[z, 1200000000.0]], $MachinePrecision]], N[(N[(x - N[(N[(y + -1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -33000000000000 \lor \neg \left(z \leq 1200000000\right):\\
\;\;\;\;\left(x - \left(y + -1\right) \cdot z\right) + t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if z < -3.3e13 or 1.2e9 < z Initial program 95.2%
associate-+l-95.2%
sub-neg95.2%
metadata-eval95.2%
*-commutative95.2%
fma-neg95.2%
sub-neg95.2%
metadata-eval95.2%
sub-neg95.2%
metadata-eval95.2%
associate-+r+95.2%
*-commutative95.2%
associate-+r+95.2%
+-commutative95.2%
associate-+l+95.2%
Applied egg-rr95.2%
Taylor expanded in t around inf 89.8%
Taylor expanded in t around inf 85.1%
if -3.3e13 < z < 1.2e9Initial program 98.6%
Taylor expanded in z around 0 94.7%
Final simplification90.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 y)))
(t_2 (+ x (* b (- (+ y t) 2.0))))
(t_3 (* a (- 1.0 t))))
(if (<= b -2.5e+24)
(+ t_2 t_1)
(if (<= b 225000000000.0) (+ x (+ t_1 t_3)) (+ t_2 t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - y);
double t_2 = x + (b * ((y + t) - 2.0));
double t_3 = a * (1.0 - t);
double tmp;
if (b <= -2.5e+24) {
tmp = t_2 + t_1;
} else if (b <= 225000000000.0) {
tmp = x + (t_1 + t_3);
} else {
tmp = t_2 + t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * (1.0d0 - y)
t_2 = x + (b * ((y + t) - 2.0d0))
t_3 = a * (1.0d0 - t)
if (b <= (-2.5d+24)) then
tmp = t_2 + t_1
else if (b <= 225000000000.0d0) then
tmp = x + (t_1 + t_3)
else
tmp = t_2 + t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - y);
double t_2 = x + (b * ((y + t) - 2.0));
double t_3 = a * (1.0 - t);
double tmp;
if (b <= -2.5e+24) {
tmp = t_2 + t_1;
} else if (b <= 225000000000.0) {
tmp = x + (t_1 + t_3);
} else {
tmp = t_2 + t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - y) t_2 = x + (b * ((y + t) - 2.0)) t_3 = a * (1.0 - t) tmp = 0 if b <= -2.5e+24: tmp = t_2 + t_1 elif b <= 225000000000.0: tmp = x + (t_1 + t_3) else: tmp = t_2 + t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - y)) t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) t_3 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (b <= -2.5e+24) tmp = Float64(t_2 + t_1); elseif (b <= 225000000000.0) tmp = Float64(x + Float64(t_1 + t_3)); else tmp = Float64(t_2 + t_3); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - y); t_2 = x + (b * ((y + t) - 2.0)); t_3 = a * (1.0 - t); tmp = 0.0; if (b <= -2.5e+24) tmp = t_2 + t_1; elseif (b <= 225000000000.0) tmp = x + (t_1 + t_3); else tmp = t_2 + t_3; 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[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.5e+24], N[(t$95$2 + t$95$1), $MachinePrecision], If[LessEqual[b, 225000000000.0], N[(x + N[(t$95$1 + t$95$3), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + t$95$3), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
t_3 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{+24}:\\
\;\;\;\;t_2 + t_1\\
\mathbf{elif}\;b \leq 225000000000:\\
\;\;\;\;x + \left(t_1 + t_3\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 + t_3\\
\end{array}
\end{array}
if b < -2.50000000000000023e24Initial program 92.5%
Taylor expanded in a around 0 87.2%
if -2.50000000000000023e24 < b < 2.25e11Initial program 100.0%
Taylor expanded in b around 0 91.1%
if 2.25e11 < b Initial program 94.5%
Taylor expanded in z around 0 94.4%
Final simplification91.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.05e+157)
(* y b)
(if (<= y -4e-146)
x
(if (<= y 7.2e-186) (* t b) (if (<= y 45.0) z (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.05e+157) {
tmp = y * b;
} else if (y <= -4e-146) {
tmp = x;
} else if (y <= 7.2e-186) {
tmp = t * b;
} else if (y <= 45.0) {
tmp = z;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.05d+157)) then
tmp = y * b
else if (y <= (-4d-146)) then
tmp = x
else if (y <= 7.2d-186) then
tmp = t * b
else if (y <= 45.0d0) then
tmp = z
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.05e+157) {
tmp = y * b;
} else if (y <= -4e-146) {
tmp = x;
} else if (y <= 7.2e-186) {
tmp = t * b;
} else if (y <= 45.0) {
tmp = z;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.05e+157: tmp = y * b elif y <= -4e-146: tmp = x elif y <= 7.2e-186: tmp = t * b elif y <= 45.0: tmp = z else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.05e+157) tmp = Float64(y * b); elseif (y <= -4e-146) tmp = x; elseif (y <= 7.2e-186) tmp = Float64(t * b); elseif (y <= 45.0) tmp = z; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.05e+157) tmp = y * b; elseif (y <= -4e-146) tmp = x; elseif (y <= 7.2e-186) tmp = t * b; elseif (y <= 45.0) tmp = z; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.05e+157], N[(y * b), $MachinePrecision], If[LessEqual[y, -4e-146], x, If[LessEqual[y, 7.2e-186], N[(t * b), $MachinePrecision], If[LessEqual[y, 45.0], z, N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+157}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-146}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-186}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 45:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.05e157 or 45 < y Initial program 93.9%
Taylor expanded in b around inf 44.0%
Taylor expanded in y around inf 39.0%
if -1.05e157 < y < -4.0000000000000001e-146Initial program 98.3%
Taylor expanded in x around inf 28.1%
if -4.0000000000000001e-146 < y < 7.1999999999999997e-186Initial 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 t around 0 86.6%
Taylor expanded in t around inf 36.1%
if 7.1999999999999997e-186 < y < 45Initial program 100.0%
Taylor expanded in z around inf 36.5%
Taylor expanded in y around 0 34.6%
Final simplification35.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.5e+158)
(* y b)
(if (<= y -8.6e-265)
(+ x a)
(if (<= y 1.1e-186) (* t b) (if (<= y 4.4e+119) (+ x a) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.5e+158) {
tmp = y * b;
} else if (y <= -8.6e-265) {
tmp = x + a;
} else if (y <= 1.1e-186) {
tmp = t * b;
} else if (y <= 4.4e+119) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.5d+158)) then
tmp = y * b
else if (y <= (-8.6d-265)) then
tmp = x + a
else if (y <= 1.1d-186) then
tmp = t * b
else if (y <= 4.4d+119) then
tmp = x + a
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.5e+158) {
tmp = y * b;
} else if (y <= -8.6e-265) {
tmp = x + a;
} else if (y <= 1.1e-186) {
tmp = t * b;
} else if (y <= 4.4e+119) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.5e+158: tmp = y * b elif y <= -8.6e-265: tmp = x + a elif y <= 1.1e-186: tmp = t * b elif y <= 4.4e+119: tmp = x + a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.5e+158) tmp = Float64(y * b); elseif (y <= -8.6e-265) tmp = Float64(x + a); elseif (y <= 1.1e-186) tmp = Float64(t * b); elseif (y <= 4.4e+119) tmp = Float64(x + a); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.5e+158) tmp = y * b; elseif (y <= -8.6e-265) tmp = x + a; elseif (y <= 1.1e-186) tmp = t * b; elseif (y <= 4.4e+119) tmp = x + a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.5e+158], N[(y * b), $MachinePrecision], If[LessEqual[y, -8.6e-265], N[(x + a), $MachinePrecision], If[LessEqual[y, 1.1e-186], N[(t * b), $MachinePrecision], If[LessEqual[y, 4.4e+119], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+158}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -8.6 \cdot 10^{-265}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-186}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+119}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -4.50000000000000046e158 or 4.4000000000000003e119 < y Initial program 93.3%
Taylor expanded in b around inf 51.9%
Taylor expanded in y around inf 47.3%
if -4.50000000000000046e158 < y < -8.6000000000000003e-265 or 1.10000000000000007e-186 < y < 4.4000000000000003e119Initial program 98.6%
Taylor expanded in z around 0 71.8%
Taylor expanded in b around 0 52.6%
Taylor expanded in t around 0 34.1%
cancel-sign-sub-inv34.1%
metadata-eval34.1%
*-lft-identity34.1%
+-commutative34.1%
Simplified34.1%
if -8.6000000000000003e-265 < y < 1.10000000000000007e-186Initial 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 t around 0 90.8%
Taylor expanded in t around inf 42.6%
Final simplification39.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.9e+35) (not (<= b 2.85e+49))) (+ x (* b (- (+ y t) 2.0))) (+ x (+ (* z (- 1.0 y)) (* a (- 1.0 t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.9e+35) || !(b <= 2.85e+49)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.9d+35)) .or. (.not. (b <= 2.85d+49))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x + ((z * (1.0d0 - y)) + (a * (1.0d0 - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.9e+35) || !(b <= 2.85e+49)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.9e+35) or not (b <= 2.85e+49): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.9e+35) || !(b <= 2.85e+49)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) + Float64(a * Float64(1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.9e+35) || ~((b <= 2.85e+49))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x + ((z * (1.0 - y)) + (a * (1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.9e+35], N[Not[LessEqual[b, 2.85e+49]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{+35} \lor \neg \left(b \leq 2.85 \cdot 10^{+49}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) + a \cdot \left(1 - t\right)\right)\\
\end{array}
\end{array}
if b < -1.9e35 or 2.8499999999999999e49 < b Initial program 93.0%
Taylor expanded in z around 0 90.1%
Taylor expanded in a around 0 82.3%
if -1.9e35 < b < 2.8499999999999999e49Initial program 100.0%
Taylor expanded in b around 0 90.0%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -200000000.0)
t_1
(if (<= t -4.5e-182) (+ x a) (if (<= t 118.0) (* b (- y 2.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -200000000.0) {
tmp = t_1;
} else if (t <= -4.5e-182) {
tmp = x + a;
} else if (t <= 118.0) {
tmp = b * (y - 2.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b - a)
if (t <= (-200000000.0d0)) then
tmp = t_1
else if (t <= (-4.5d-182)) then
tmp = x + a
else if (t <= 118.0d0) then
tmp = b * (y - 2.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -200000000.0) {
tmp = t_1;
} else if (t <= -4.5e-182) {
tmp = x + a;
} else if (t <= 118.0) {
tmp = b * (y - 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -200000000.0: tmp = t_1 elif t <= -4.5e-182: tmp = x + a elif t <= 118.0: tmp = b * (y - 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -200000000.0) tmp = t_1; elseif (t <= -4.5e-182) tmp = Float64(x + a); elseif (t <= 118.0) tmp = Float64(b * Float64(y - 2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -200000000.0) tmp = t_1; elseif (t <= -4.5e-182) tmp = x + a; elseif (t <= 118.0) tmp = b * (y - 2.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -200000000.0], t$95$1, If[LessEqual[t, -4.5e-182], N[(x + a), $MachinePrecision], If[LessEqual[t, 118.0], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -200000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-182}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 118:\\
\;\;\;\;b \cdot \left(y - 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2e8 or 118 < t Initial program 95.5%
Taylor expanded in t around inf 66.4%
if -2e8 < t < -4.4999999999999999e-182Initial program 100.0%
Taylor expanded in z around 0 77.9%
Taylor expanded in b around 0 64.1%
Taylor expanded in t around 0 63.2%
cancel-sign-sub-inv63.2%
metadata-eval63.2%
*-lft-identity63.2%
+-commutative63.2%
Simplified63.2%
if -4.4999999999999999e-182 < t < 118Initial program 98.1%
Taylor expanded in b around inf 36.3%
Taylor expanded in t around 0 36.3%
Final simplification53.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.6e+35) (* t b) (if (<= b 9e-104) x (if (<= b 3.3e+47) z (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.6e+35) {
tmp = t * b;
} else if (b <= 9e-104) {
tmp = x;
} else if (b <= 3.3e+47) {
tmp = z;
} else {
tmp = t * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-7.6d+35)) then
tmp = t * b
else if (b <= 9d-104) then
tmp = x
else if (b <= 3.3d+47) then
tmp = z
else
tmp = t * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.6e+35) {
tmp = t * b;
} else if (b <= 9e-104) {
tmp = x;
} else if (b <= 3.3e+47) {
tmp = z;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.6e+35: tmp = t * b elif b <= 9e-104: tmp = x elif b <= 3.3e+47: tmp = z else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.6e+35) tmp = Float64(t * b); elseif (b <= 9e-104) tmp = x; elseif (b <= 3.3e+47) tmp = z; else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.6e+35) tmp = t * b; elseif (b <= 9e-104) tmp = x; elseif (b <= 3.3e+47) tmp = z; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.6e+35], N[(t * b), $MachinePrecision], If[LessEqual[b, 9e-104], x, If[LessEqual[b, 3.3e+47], z, N[(t * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.6 \cdot 10^{+35}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-104}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+47}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if b < -7.5999999999999999e35 or 3.2999999999999999e47 < b Initial program 92.9%
+-commutative92.9%
fma-def95.9%
associate--l+95.9%
sub-neg95.9%
metadata-eval95.9%
sub-neg95.9%
associate-+l-95.9%
fma-neg97.0%
sub-neg97.0%
metadata-eval97.0%
remove-double-neg97.0%
sub-neg97.0%
metadata-eval97.0%
Simplified97.0%
Taylor expanded in t around 0 93.6%
Taylor expanded in t around inf 35.8%
if -7.5999999999999999e35 < b < 8.9999999999999995e-104Initial program 100.0%
Taylor expanded in x around inf 24.7%
if 8.9999999999999995e-104 < b < 3.2999999999999999e47Initial program 99.9%
Taylor expanded in z around inf 48.5%
Taylor expanded in y around 0 22.8%
Final simplification28.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -7e-265) x (if (<= y 2.4e-182) (* -2.0 b) (if (<= y 0.00032) z a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7e-265) {
tmp = x;
} else if (y <= 2.4e-182) {
tmp = -2.0 * b;
} else if (y <= 0.00032) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-7d-265)) then
tmp = x
else if (y <= 2.4d-182) then
tmp = (-2.0d0) * b
else if (y <= 0.00032d0) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7e-265) {
tmp = x;
} else if (y <= 2.4e-182) {
tmp = -2.0 * b;
} else if (y <= 0.00032) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7e-265: tmp = x elif y <= 2.4e-182: tmp = -2.0 * b elif y <= 0.00032: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7e-265) tmp = x; elseif (y <= 2.4e-182) tmp = Float64(-2.0 * b); elseif (y <= 0.00032) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7e-265) tmp = x; elseif (y <= 2.4e-182) tmp = -2.0 * b; elseif (y <= 0.00032) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7e-265], x, If[LessEqual[y, 2.4e-182], N[(-2.0 * b), $MachinePrecision], If[LessEqual[y, 0.00032], z, a]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-265}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-182}:\\
\;\;\;\;-2 \cdot b\\
\mathbf{elif}\;y \leq 0.00032:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if y < -7.00000000000000031e-265Initial program 95.6%
Taylor expanded in x around inf 19.7%
if -7.00000000000000031e-265 < y < 2.3999999999999998e-182Initial program 100.0%
Taylor expanded in b around inf 68.8%
Taylor expanded in t around 0 29.2%
Taylor expanded in y around 0 29.2%
*-commutative29.2%
Simplified29.2%
if 2.3999999999999998e-182 < y < 3.20000000000000026e-4Initial program 100.0%
Taylor expanded in z around inf 40.6%
Taylor expanded in y around 0 38.4%
if 3.20000000000000026e-4 < y Initial program 96.9%
Taylor expanded in a around inf 26.5%
Taylor expanded in t around 0 14.1%
Final simplification22.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -7.5e-45) x (if (<= x 1.55e+84) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -7.5e-45) {
tmp = x;
} else if (x <= 1.55e+84) {
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 <= (-7.5d-45)) then
tmp = x
else if (x <= 1.55d+84) 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 <= -7.5e-45) {
tmp = x;
} else if (x <= 1.55e+84) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -7.5e-45: tmp = x elif x <= 1.55e+84: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -7.5e-45) tmp = x; elseif (x <= 1.55e+84) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -7.5e-45) tmp = x; elseif (x <= 1.55e+84) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -7.5e-45], x, If[LessEqual[x, 1.55e+84], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+84}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -7.5000000000000006e-45 or 1.55000000000000001e84 < x Initial program 97.3%
Taylor expanded in x around inf 28.0%
if -7.5000000000000006e-45 < x < 1.55000000000000001e84Initial program 97.2%
Taylor expanded in a around inf 31.1%
Taylor expanded in t around 0 14.5%
Final simplification20.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -8.8e-265) x (if (<= y 0.0026) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.8e-265) {
tmp = x;
} else if (y <= 0.0026) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-8.8d-265)) then
tmp = x
else if (y <= 0.0026d0) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -8.8e-265) {
tmp = x;
} else if (y <= 0.0026) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -8.8e-265: tmp = x elif y <= 0.0026: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -8.8e-265) tmp = x; elseif (y <= 0.0026) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -8.8e-265) tmp = x; elseif (y <= 0.0026) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -8.8e-265], x, If[LessEqual[y, 0.0026], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{-265}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.0026:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if y < -8.80000000000000042e-265Initial program 95.6%
Taylor expanded in x around inf 19.7%
if -8.80000000000000042e-265 < y < 0.0025999999999999999Initial program 100.0%
Taylor expanded in z around inf 28.5%
Taylor expanded in y around 0 27.3%
if 0.0025999999999999999 < y Initial program 96.9%
Taylor expanded in a around inf 26.5%
Taylor expanded in t around 0 14.1%
Final simplification20.5%
(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 27.1%
Taylor expanded in t around 0 11.9%
Final simplification11.9%
herbie shell --seed 2024020
(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)))