
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (- x (* z (+ y -1.0))) (* a (- 1.0 t))) (* b (- (+ y t) 2.0)))))
(if (<= t_1 INFINITY) t_1 (* t (- b a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (z * (y + -1.0))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (z * (y + -1.0))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x - (z * (y + -1.0))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * (b - a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(z * Float64(y + -1.0))) + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(b - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x - (z * (y + -1.0))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = t * (b - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x - z \cdot \left(y + -1\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in t around inf 67.9%
Final simplification98.8%
(FPCore (x y z t a b) :precision binary64 (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b) return fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Initial program 96.5%
+-commutative96.5%
fma-define97.2%
associate--l+97.2%
sub-neg97.2%
metadata-eval97.2%
sub-neg97.2%
associate-+l-97.2%
fmm-def97.6%
sub-neg97.6%
metadata-eval97.6%
remove-double-neg97.6%
sub-neg97.6%
metadata-eval97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -1.8e-27)
t_1
(if (<= y 1.06e-218)
(* t (- b a))
(if (<= y 1.9e-56)
(* b (- t 2.0))
(if (<= y 8.4e+21) (* 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 <= -1.8e-27) {
tmp = t_1;
} else if (y <= 1.06e-218) {
tmp = t * (b - a);
} else if (y <= 1.9e-56) {
tmp = b * (t - 2.0);
} else if (y <= 8.4e+21) {
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 <= (-1.8d-27)) then
tmp = t_1
else if (y <= 1.06d-218) then
tmp = t * (b - a)
else if (y <= 1.9d-56) then
tmp = b * (t - 2.0d0)
else if (y <= 8.4d+21) 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 <= -1.8e-27) {
tmp = t_1;
} else if (y <= 1.06e-218) {
tmp = t * (b - a);
} else if (y <= 1.9e-56) {
tmp = b * (t - 2.0);
} else if (y <= 8.4e+21) {
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 <= -1.8e-27: tmp = t_1 elif y <= 1.06e-218: tmp = t * (b - a) elif y <= 1.9e-56: tmp = b * (t - 2.0) elif y <= 8.4e+21: 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 <= -1.8e-27) tmp = t_1; elseif (y <= 1.06e-218) tmp = Float64(t * Float64(b - a)); elseif (y <= 1.9e-56) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= 8.4e+21) 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 <= -1.8e-27) tmp = t_1; elseif (y <= 1.06e-218) tmp = t * (b - a); elseif (y <= 1.9e-56) tmp = b * (t - 2.0); elseif (y <= 8.4e+21) 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, -1.8e-27], t$95$1, If[LessEqual[y, 1.06e-218], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-56], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.4e+21], 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 -1.8 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{-218}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-56}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 8.4 \cdot 10^{+21}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.7999999999999999e-27 or 8.4e21 < y Initial program 95.4%
Taylor expanded in y around inf 65.4%
if -1.7999999999999999e-27 < y < 1.0600000000000001e-218Initial program 96.2%
Taylor expanded in t around inf 45.8%
if 1.0600000000000001e-218 < y < 1.9000000000000001e-56Initial program 100.0%
Taylor expanded in y around inf 54.2%
associate-*r*54.2%
neg-mul-154.2%
Simplified54.2%
Taylor expanded in y around 0 54.3%
if 1.9000000000000001e-56 < y < 8.4e21Initial program 100.0%
Taylor expanded in a around inf 63.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.55e+28) (not (<= b 1560000000000.0))) (+ (- x (* b (- 2.0 (+ y t)))) (* z (- 1.0 y))) (+ x (- (* a (- 1.0 t)) (* z (+ y -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.55e+28) || !(b <= 1560000000000.0)) {
tmp = (x - (b * (2.0 - (y + t)))) + (z * (1.0 - y));
} else {
tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-2.55d+28)) .or. (.not. (b <= 1560000000000.0d0))) then
tmp = (x - (b * (2.0d0 - (y + t)))) + (z * (1.0d0 - y))
else
tmp = x + ((a * (1.0d0 - t)) - (z * (y + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.55e+28) || !(b <= 1560000000000.0)) {
tmp = (x - (b * (2.0 - (y + t)))) + (z * (1.0 - y));
} else {
tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.55e+28) or not (b <= 1560000000000.0): tmp = (x - (b * (2.0 - (y + t)))) + (z * (1.0 - y)) else: tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.55e+28) || !(b <= 1560000000000.0)) tmp = Float64(Float64(x - Float64(b * Float64(2.0 - Float64(y + t)))) + Float64(z * Float64(1.0 - y))); else tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) - Float64(z * Float64(y + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.55e+28) || ~((b <= 1560000000000.0))) tmp = (x - (b * (2.0 - (y + t)))) + (z * (1.0 - y)); else tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.55e+28], N[Not[LessEqual[b, 1560000000000.0]], $MachinePrecision]], N[(N[(x - N[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.55 \cdot 10^{+28} \lor \neg \left(b \leq 1560000000000\right):\\
\;\;\;\;\left(x - b \cdot \left(2 - \left(y + t\right)\right)\right) + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) - z \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if b < -2.5500000000000002e28 or 1.56e12 < b Initial program 91.8%
Taylor expanded in a around 0 91.2%
if -2.5500000000000002e28 < b < 1.56e12Initial program 100.0%
Taylor expanded in b around 0 95.8%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (* b (- 2.0 (+ y t))))))
(if (<= b -3.3e+65)
t_1
(if (<= b -4.2e-303)
(- x (* z (+ y -1.0)))
(if (<= b 1080000000000.0) (+ x (* a (- 1.0 t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (b * (2.0 - (y + t)));
double tmp;
if (b <= -3.3e+65) {
tmp = t_1;
} else if (b <= -4.2e-303) {
tmp = x - (z * (y + -1.0));
} else if (b <= 1080000000000.0) {
tmp = x + (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 = x - (b * (2.0d0 - (y + t)))
if (b <= (-3.3d+65)) then
tmp = t_1
else if (b <= (-4.2d-303)) then
tmp = x - (z * (y + (-1.0d0)))
else if (b <= 1080000000000.0d0) then
tmp = x + (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 = x - (b * (2.0 - (y + t)));
double tmp;
if (b <= -3.3e+65) {
tmp = t_1;
} else if (b <= -4.2e-303) {
tmp = x - (z * (y + -1.0));
} else if (b <= 1080000000000.0) {
tmp = x + (a * (1.0 - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (b * (2.0 - (y + t))) tmp = 0 if b <= -3.3e+65: tmp = t_1 elif b <= -4.2e-303: tmp = x - (z * (y + -1.0)) elif b <= 1080000000000.0: tmp = x + (a * (1.0 - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(b * Float64(2.0 - Float64(y + t)))) tmp = 0.0 if (b <= -3.3e+65) tmp = t_1; elseif (b <= -4.2e-303) tmp = Float64(x - Float64(z * Float64(y + -1.0))); elseif (b <= 1080000000000.0) tmp = Float64(x + 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 = x - (b * (2.0 - (y + t))); tmp = 0.0; if (b <= -3.3e+65) tmp = t_1; elseif (b <= -4.2e-303) tmp = x - (z * (y + -1.0)); elseif (b <= 1080000000000.0) tmp = x + (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[(x - N[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.3e+65], t$95$1, If[LessEqual[b, -4.2e-303], N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1080000000000.0], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - b \cdot \left(2 - \left(y + t\right)\right)\\
\mathbf{if}\;b \leq -3.3 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-303}:\\
\;\;\;\;x - z \cdot \left(y + -1\right)\\
\mathbf{elif}\;b \leq 1080000000000:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.30000000000000023e65 or 1.08e12 < b Initial program 92.0%
Taylor expanded in a around -inf 73.5%
associate-*r*73.5%
neg-mul-173.5%
sub-neg73.5%
mul-1-neg73.5%
div-sub73.4%
sub-neg73.4%
metadata-eval73.4%
div-sub73.5%
+-commutative73.5%
sub-neg73.5%
metadata-eval73.5%
mul-1-neg73.5%
remove-double-neg73.5%
+-commutative73.5%
Simplified73.5%
Taylor expanded in x around inf 79.8%
if -3.30000000000000023e65 < b < -4.2e-303Initial program 98.8%
Taylor expanded in b around 0 91.1%
Taylor expanded in a around 0 63.5%
if -4.2e-303 < b < 1.08e12Initial program 100.0%
Taylor expanded in b around 0 96.9%
Taylor expanded in a around inf 64.3%
Final simplification70.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.2e+27) (not (<= b 7.5e+30))) (+ (* b (- (+ y t) 2.0)) (* z (- 1.0 y))) (+ x (- (* a (- 1.0 t)) (* z (+ y -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.2e+27) || !(b <= 7.5e+30)) {
tmp = (b * ((y + t) - 2.0)) + (z * (1.0 - y));
} else {
tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-5.2d+27)) .or. (.not. (b <= 7.5d+30))) then
tmp = (b * ((y + t) - 2.0d0)) + (z * (1.0d0 - y))
else
tmp = x + ((a * (1.0d0 - t)) - (z * (y + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.2e+27) || !(b <= 7.5e+30)) {
tmp = (b * ((y + t) - 2.0)) + (z * (1.0 - y));
} else {
tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.2e+27) or not (b <= 7.5e+30): tmp = (b * ((y + t) - 2.0)) + (z * (1.0 - y)) else: tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.2e+27) || !(b <= 7.5e+30)) tmp = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) + Float64(z * Float64(1.0 - y))); else tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) - Float64(z * Float64(y + -1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5.2e+27) || ~((b <= 7.5e+30))) tmp = (b * ((y + t) - 2.0)) + (z * (1.0 - y)); else tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.2e+27], N[Not[LessEqual[b, 7.5e+30]], $MachinePrecision]], N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+27} \lor \neg \left(b \leq 7.5 \cdot 10^{+30}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) - z \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if b < -5.20000000000000018e27 or 7.49999999999999973e30 < b Initial program 91.4%
Taylor expanded in a around -inf 72.0%
associate-*r*72.0%
neg-mul-172.0%
sub-neg72.0%
mul-1-neg72.0%
div-sub71.8%
sub-neg71.8%
metadata-eval71.8%
div-sub72.0%
+-commutative72.0%
sub-neg72.0%
metadata-eval72.0%
mul-1-neg72.0%
remove-double-neg72.0%
+-commutative72.0%
Simplified72.0%
Taylor expanded in z around -inf 87.1%
associate-*r*87.1%
neg-mul-187.1%
sub-neg87.1%
metadata-eval87.1%
+-commutative87.1%
distribute-lft-neg-in87.1%
distribute-rgt-neg-in87.1%
distribute-neg-in87.1%
metadata-eval87.1%
sub-neg87.1%
Simplified87.1%
if -5.20000000000000018e27 < b < 7.49999999999999973e30Initial program 100.0%
Taylor expanded in b around 0 95.2%
Final simplification91.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.05e+27) (not (<= b 1.4e+29))) (+ (* b (- (+ y t) 2.0)) (* z (- 1.0 y))) (- x (- (* y z) (* a (- 1.0 t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.05e+27) || !(b <= 1.4e+29)) {
tmp = (b * ((y + t) - 2.0)) + (z * (1.0 - y));
} else {
tmp = x - ((y * z) - (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 <= (-2.05d+27)) .or. (.not. (b <= 1.4d+29))) then
tmp = (b * ((y + t) - 2.0d0)) + (z * (1.0d0 - y))
else
tmp = x - ((y * z) - (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 <= -2.05e+27) || !(b <= 1.4e+29)) {
tmp = (b * ((y + t) - 2.0)) + (z * (1.0 - y));
} else {
tmp = x - ((y * z) - (a * (1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.05e+27) or not (b <= 1.4e+29): tmp = (b * ((y + t) - 2.0)) + (z * (1.0 - y)) else: tmp = x - ((y * z) - (a * (1.0 - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.05e+27) || !(b <= 1.4e+29)) tmp = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) + Float64(z * Float64(1.0 - y))); else tmp = Float64(x - Float64(Float64(y * z) - 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 <= -2.05e+27) || ~((b <= 1.4e+29))) tmp = (b * ((y + t) - 2.0)) + (z * (1.0 - y)); else tmp = x - ((y * z) - (a * (1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.05e+27], N[Not[LessEqual[b, 1.4e+29]], $MachinePrecision]], N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] - N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.05 \cdot 10^{+27} \lor \neg \left(b \leq 1.4 \cdot 10^{+29}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(y \cdot z - a \cdot \left(1 - t\right)\right)\\
\end{array}
\end{array}
if b < -2.0500000000000001e27 or 1.4e29 < b Initial program 91.4%
Taylor expanded in a around -inf 72.0%
associate-*r*72.0%
neg-mul-172.0%
sub-neg72.0%
mul-1-neg72.0%
div-sub71.8%
sub-neg71.8%
metadata-eval71.8%
div-sub72.0%
+-commutative72.0%
sub-neg72.0%
metadata-eval72.0%
mul-1-neg72.0%
remove-double-neg72.0%
+-commutative72.0%
Simplified72.0%
Taylor expanded in z around -inf 87.1%
associate-*r*87.1%
neg-mul-187.1%
sub-neg87.1%
metadata-eval87.1%
+-commutative87.1%
distribute-lft-neg-in87.1%
distribute-rgt-neg-in87.1%
distribute-neg-in87.1%
metadata-eval87.1%
sub-neg87.1%
Simplified87.1%
if -2.0500000000000001e27 < b < 1.4e29Initial program 100.0%
Taylor expanded in b around 0 95.2%
Taylor expanded in y around inf 85.2%
*-commutative85.2%
Simplified85.2%
Final simplification86.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -7.5e+69)
t_1
(if (<= b -1e-302)
(- x (* z (+ y -1.0)))
(if (<= b 6.5e+33) (+ x (* a (- 1.0 t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -7.5e+69) {
tmp = t_1;
} else if (b <= -1e-302) {
tmp = x - (z * (y + -1.0));
} else if (b <= 6.5e+33) {
tmp = x + (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 = b * ((y + t) - 2.0d0)
if (b <= (-7.5d+69)) then
tmp = t_1
else if (b <= (-1d-302)) then
tmp = x - (z * (y + (-1.0d0)))
else if (b <= 6.5d+33) then
tmp = x + (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 = b * ((y + t) - 2.0);
double tmp;
if (b <= -7.5e+69) {
tmp = t_1;
} else if (b <= -1e-302) {
tmp = x - (z * (y + -1.0));
} else if (b <= 6.5e+33) {
tmp = x + (a * (1.0 - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((y + t) - 2.0) tmp = 0 if b <= -7.5e+69: tmp = t_1 elif b <= -1e-302: tmp = x - (z * (y + -1.0)) elif b <= 6.5e+33: tmp = x + (a * (1.0 - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -7.5e+69) tmp = t_1; elseif (b <= -1e-302) tmp = Float64(x - Float64(z * Float64(y + -1.0))); elseif (b <= 6.5e+33) tmp = Float64(x + 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 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -7.5e+69) tmp = t_1; elseif (b <= -1e-302) tmp = x - (z * (y + -1.0)); elseif (b <= 6.5e+33) tmp = x + (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[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.5e+69], t$95$1, If[LessEqual[b, -1e-302], N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.5e+33], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -7.5 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1 \cdot 10^{-302}:\\
\;\;\;\;x - z \cdot \left(y + -1\right)\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+33}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -7.49999999999999939e69 or 6.49999999999999993e33 < b Initial program 91.6%
Taylor expanded in b around inf 78.2%
if -7.49999999999999939e69 < b < -9.9999999999999996e-303Initial program 98.8%
Taylor expanded in b around 0 91.1%
Taylor expanded in a around 0 63.5%
if -9.9999999999999996e-303 < b < 6.49999999999999993e33Initial program 100.0%
Taylor expanded in b around 0 95.6%
Taylor expanded in a around inf 63.4%
Final simplification68.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -4.8e+97)
t_1
(if (<= b -1.05e-302)
(* z (- 1.0 y))
(if (<= b 1000000000000.0) (* a (- 1.0 t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -4.8e+97) {
tmp = t_1;
} else if (b <= -1.05e-302) {
tmp = z * (1.0 - y);
} else if (b <= 1000000000000.0) {
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 = b * ((y + t) - 2.0d0)
if (b <= (-4.8d+97)) then
tmp = t_1
else if (b <= (-1.05d-302)) then
tmp = z * (1.0d0 - y)
else if (b <= 1000000000000.0d0) 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 = b * ((y + t) - 2.0);
double tmp;
if (b <= -4.8e+97) {
tmp = t_1;
} else if (b <= -1.05e-302) {
tmp = z * (1.0 - y);
} else if (b <= 1000000000000.0) {
tmp = a * (1.0 - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((y + t) - 2.0) tmp = 0 if b <= -4.8e+97: tmp = t_1 elif b <= -1.05e-302: tmp = z * (1.0 - y) elif b <= 1000000000000.0: tmp = a * (1.0 - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -4.8e+97) tmp = t_1; elseif (b <= -1.05e-302) tmp = Float64(z * Float64(1.0 - y)); elseif (b <= 1000000000000.0) 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 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -4.8e+97) tmp = t_1; elseif (b <= -1.05e-302) tmp = z * (1.0 - y); elseif (b <= 1000000000000.0) 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[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.8e+97], t$95$1, If[LessEqual[b, -1.05e-302], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1000000000000.0], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -4.8 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.05 \cdot 10^{-302}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq 1000000000000:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.8e97 or 1e12 < b Initial program 92.5%
Taylor expanded in b around inf 78.0%
if -4.8e97 < b < -1.05000000000000006e-302Initial program 97.7%
Taylor expanded in z around inf 42.8%
if -1.05000000000000006e-302 < b < 1e12Initial program 100.0%
Taylor expanded in a around inf 49.8%
Final simplification57.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.25e+27) (not (<= b 8e+26))) (- (* b (- (+ y t) 2.0)) (* y z)) (- x (- (* y z) (* a (- 1.0 t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.25e+27) || !(b <= 8e+26)) {
tmp = (b * ((y + t) - 2.0)) - (y * z);
} else {
tmp = x - ((y * z) - (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 <= (-2.25d+27)) .or. (.not. (b <= 8d+26))) then
tmp = (b * ((y + t) - 2.0d0)) - (y * z)
else
tmp = x - ((y * z) - (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 <= -2.25e+27) || !(b <= 8e+26)) {
tmp = (b * ((y + t) - 2.0)) - (y * z);
} else {
tmp = x - ((y * z) - (a * (1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.25e+27) or not (b <= 8e+26): tmp = (b * ((y + t) - 2.0)) - (y * z) else: tmp = x - ((y * z) - (a * (1.0 - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.25e+27) || !(b <= 8e+26)) tmp = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) - Float64(y * z)); else tmp = Float64(x - Float64(Float64(y * z) - 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 <= -2.25e+27) || ~((b <= 8e+26))) tmp = (b * ((y + t) - 2.0)) - (y * z); else tmp = x - ((y * z) - (a * (1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.25e+27], N[Not[LessEqual[b, 8e+26]], $MachinePrecision]], N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] - N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.25 \cdot 10^{+27} \lor \neg \left(b \leq 8 \cdot 10^{+26}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x - \left(y \cdot z - a \cdot \left(1 - t\right)\right)\\
\end{array}
\end{array}
if b < -2.25e27 or 8.00000000000000038e26 < b Initial program 91.4%
Taylor expanded in y around inf 79.4%
associate-*r*79.4%
neg-mul-179.4%
Simplified79.4%
if -2.25e27 < b < 8.00000000000000038e26Initial program 100.0%
Taylor expanded in b around 0 95.2%
Taylor expanded in y around inf 85.2%
*-commutative85.2%
Simplified85.2%
Final simplification82.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.6e+97) (not (<= b 10500000000000.0))) (- x (* b (- 2.0 (+ y t)))) (- x (- (* y z) (* a (- 1.0 t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.6e+97) || !(b <= 10500000000000.0)) {
tmp = x - (b * (2.0 - (y + t)));
} else {
tmp = x - ((y * z) - (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 <= (-5.6d+97)) .or. (.not. (b <= 10500000000000.0d0))) then
tmp = x - (b * (2.0d0 - (y + t)))
else
tmp = x - ((y * z) - (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 <= -5.6e+97) || !(b <= 10500000000000.0)) {
tmp = x - (b * (2.0 - (y + t)));
} else {
tmp = x - ((y * z) - (a * (1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.6e+97) or not (b <= 10500000000000.0): tmp = x - (b * (2.0 - (y + t))) else: tmp = x - ((y * z) - (a * (1.0 - t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.6e+97) || !(b <= 10500000000000.0)) tmp = Float64(x - Float64(b * Float64(2.0 - Float64(y + t)))); else tmp = Float64(x - Float64(Float64(y * z) - 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 <= -5.6e+97) || ~((b <= 10500000000000.0))) tmp = x - (b * (2.0 - (y + t))); else tmp = x - ((y * z) - (a * (1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.6e+97], N[Not[LessEqual[b, 10500000000000.0]], $MachinePrecision]], N[(x - N[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] - N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.6 \cdot 10^{+97} \lor \neg \left(b \leq 10500000000000\right):\\
\;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(y \cdot z - a \cdot \left(1 - t\right)\right)\\
\end{array}
\end{array}
if b < -5.5999999999999998e97 or 1.05e13 < b Initial program 92.5%
Taylor expanded in a around -inf 75.7%
associate-*r*75.7%
neg-mul-175.7%
sub-neg75.7%
mul-1-neg75.7%
div-sub75.6%
sub-neg75.6%
metadata-eval75.6%
div-sub75.7%
+-commutative75.7%
sub-neg75.7%
metadata-eval75.7%
mul-1-neg75.7%
remove-double-neg75.7%
+-commutative75.7%
Simplified75.7%
Taylor expanded in x around inf 82.7%
if -5.5999999999999998e97 < b < 1.05e13Initial program 98.7%
Taylor expanded in b around 0 92.3%
Taylor expanded in y around inf 82.1%
*-commutative82.1%
Simplified82.1%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -1e+15)
t_1
(if (<= t 2.5e-250) (* y (- z)) (if (<= t 1e+41) (* y b) 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 <= -1e+15) {
tmp = t_1;
} else if (t <= 2.5e-250) {
tmp = y * -z;
} else if (t <= 1e+41) {
tmp = y * 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 = t * (b - a)
if (t <= (-1d+15)) then
tmp = t_1
else if (t <= 2.5d-250) then
tmp = y * -z
else if (t <= 1d+41) then
tmp = y * 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 = t * (b - a);
double tmp;
if (t <= -1e+15) {
tmp = t_1;
} else if (t <= 2.5e-250) {
tmp = y * -z;
} else if (t <= 1e+41) {
tmp = y * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -1e+15: tmp = t_1 elif t <= 2.5e-250: tmp = y * -z elif t <= 1e+41: tmp = y * b 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 <= -1e+15) tmp = t_1; elseif (t <= 2.5e-250) tmp = Float64(y * Float64(-z)); elseif (t <= 1e+41) tmp = Float64(y * b); 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 <= -1e+15) tmp = t_1; elseif (t <= 2.5e-250) tmp = y * -z; elseif (t <= 1e+41) tmp = y * b; 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, -1e+15], t$95$1, If[LessEqual[t, 2.5e-250], N[(y * (-z)), $MachinePrecision], If[LessEqual[t, 1e+41], N[(y * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-250}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;t \leq 10^{+41}:\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1e15 or 1.00000000000000001e41 < t Initial program 94.2%
Taylor expanded in t around inf 62.9%
if -1e15 < t < 2.50000000000000013e-250Initial program 97.6%
Taylor expanded in z around inf 44.3%
Taylor expanded in y around inf 34.0%
mul-1-neg34.0%
Simplified34.0%
if 2.50000000000000013e-250 < t < 1.00000000000000001e41Initial program 100.0%
Taylor expanded in y around inf 46.0%
Taylor expanded in b around inf 33.5%
*-commutative33.5%
Simplified33.5%
Final simplification47.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- t 2.0))))
(if (<= b -3.2e+71)
t_1
(if (<= b -1.55e-303)
(* y (- z))
(if (<= b 2400000000000.0) (* a (- 1.0 t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (t - 2.0);
double tmp;
if (b <= -3.2e+71) {
tmp = t_1;
} else if (b <= -1.55e-303) {
tmp = y * -z;
} else if (b <= 2400000000000.0) {
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 = b * (t - 2.0d0)
if (b <= (-3.2d+71)) then
tmp = t_1
else if (b <= (-1.55d-303)) then
tmp = y * -z
else if (b <= 2400000000000.0d0) 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 = b * (t - 2.0);
double tmp;
if (b <= -3.2e+71) {
tmp = t_1;
} else if (b <= -1.55e-303) {
tmp = y * -z;
} else if (b <= 2400000000000.0) {
tmp = a * (1.0 - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (t - 2.0) tmp = 0 if b <= -3.2e+71: tmp = t_1 elif b <= -1.55e-303: tmp = y * -z elif b <= 2400000000000.0: tmp = a * (1.0 - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(t - 2.0)) tmp = 0.0 if (b <= -3.2e+71) tmp = t_1; elseif (b <= -1.55e-303) tmp = Float64(y * Float64(-z)); elseif (b <= 2400000000000.0) 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 = b * (t - 2.0); tmp = 0.0; if (b <= -3.2e+71) tmp = t_1; elseif (b <= -1.55e-303) tmp = y * -z; elseif (b <= 2400000000000.0) 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[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e+71], t$95$1, If[LessEqual[b, -1.55e-303], N[(y * (-z)), $MachinePrecision], If[LessEqual[b, 2400000000000.0], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(t - 2\right)\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-303}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;b \leq 2400000000000:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.20000000000000023e71 or 2.4e12 < b Initial program 91.9%
Taylor expanded in y around inf 79.2%
associate-*r*79.2%
neg-mul-179.2%
Simplified79.2%
Taylor expanded in y around 0 51.1%
if -3.20000000000000023e71 < b < -1.55e-303Initial program 98.8%
Taylor expanded in z around inf 42.5%
Taylor expanded in y around inf 32.4%
mul-1-neg32.4%
Simplified32.4%
if -1.55e-303 < b < 2.4e12Initial program 100.0%
Taylor expanded in a around inf 49.8%
Final simplification44.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.75e+66) (not (<= b 1.06e+73))) (- x (* b (- 2.0 (+ y t)))) (- x (- (* z (+ y -1.0)) a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.75e+66) || !(b <= 1.06e+73)) {
tmp = x - (b * (2.0 - (y + t)));
} else {
tmp = x - ((z * (y + -1.0)) - a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.75d+66)) .or. (.not. (b <= 1.06d+73))) then
tmp = x - (b * (2.0d0 - (y + t)))
else
tmp = x - ((z * (y + (-1.0d0))) - a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.75e+66) || !(b <= 1.06e+73)) {
tmp = x - (b * (2.0 - (y + t)));
} else {
tmp = x - ((z * (y + -1.0)) - a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.75e+66) or not (b <= 1.06e+73): tmp = x - (b * (2.0 - (y + t))) else: tmp = x - ((z * (y + -1.0)) - a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.75e+66) || !(b <= 1.06e+73)) tmp = Float64(x - Float64(b * Float64(2.0 - Float64(y + t)))); else tmp = Float64(x - Float64(Float64(z * Float64(y + -1.0)) - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.75e+66) || ~((b <= 1.06e+73))) tmp = x - (b * (2.0 - (y + t))); else tmp = x - ((z * (y + -1.0)) - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.75e+66], N[Not[LessEqual[b, 1.06e+73]], $MachinePrecision]], N[(x - N[(b * N[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{+66} \lor \neg \left(b \leq 1.06 \cdot 10^{+73}\right):\\
\;\;\;\;x - b \cdot \left(2 - \left(y + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(z \cdot \left(y + -1\right) - a\right)\\
\end{array}
\end{array}
if b < -1.7499999999999999e66 or 1.0600000000000001e73 < b Initial program 90.9%
Taylor expanded in a around -inf 71.0%
associate-*r*71.0%
neg-mul-171.0%
sub-neg71.0%
mul-1-neg71.0%
div-sub70.9%
sub-neg70.9%
metadata-eval70.9%
div-sub71.0%
+-commutative71.0%
sub-neg71.0%
metadata-eval71.0%
mul-1-neg71.0%
remove-double-neg71.0%
+-commutative71.0%
Simplified71.0%
Taylor expanded in x around inf 83.0%
if -1.7499999999999999e66 < b < 1.0600000000000001e73Initial program 99.4%
Taylor expanded in b around 0 93.0%
Taylor expanded in t around 0 69.2%
+-commutative69.2%
sub-neg69.2%
metadata-eval69.2%
mul-1-neg69.2%
unsub-neg69.2%
+-commutative69.2%
Simplified69.2%
Final simplification73.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- a))))
(if (<= t -9.5e+124)
t_1
(if (<= t 1.12e-249) (* y (- z)) (if (<= t 1.45e+41) (* y b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * -a;
double tmp;
if (t <= -9.5e+124) {
tmp = t_1;
} else if (t <= 1.12e-249) {
tmp = y * -z;
} else if (t <= 1.45e+41) {
tmp = y * 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 = t * -a
if (t <= (-9.5d+124)) then
tmp = t_1
else if (t <= 1.12d-249) then
tmp = y * -z
else if (t <= 1.45d+41) then
tmp = y * 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 = t * -a;
double tmp;
if (t <= -9.5e+124) {
tmp = t_1;
} else if (t <= 1.12e-249) {
tmp = y * -z;
} else if (t <= 1.45e+41) {
tmp = y * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * -a tmp = 0 if t <= -9.5e+124: tmp = t_1 elif t <= 1.12e-249: tmp = y * -z elif t <= 1.45e+41: tmp = y * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(-a)) tmp = 0.0 if (t <= -9.5e+124) tmp = t_1; elseif (t <= 1.12e-249) tmp = Float64(y * Float64(-z)); elseif (t <= 1.45e+41) tmp = Float64(y * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * -a; tmp = 0.0; if (t <= -9.5e+124) tmp = t_1; elseif (t <= 1.12e-249) tmp = y * -z; elseif (t <= 1.45e+41) tmp = y * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[t, -9.5e+124], t$95$1, If[LessEqual[t, 1.12e-249], N[(y * (-z)), $MachinePrecision], If[LessEqual[t, 1.45e+41], N[(y * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-a\right)\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-249}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+41}:\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.50000000000000004e124 or 1.44999999999999994e41 < t Initial program 92.4%
Taylor expanded in t around inf 70.3%
Taylor expanded in b around 0 47.5%
associate-*r*47.5%
neg-mul-147.5%
Simplified47.5%
if -9.50000000000000004e124 < t < 1.12000000000000011e-249Initial program 98.2%
Taylor expanded in z around inf 41.2%
Taylor expanded in y around inf 31.8%
mul-1-neg31.8%
Simplified31.8%
if 1.12000000000000011e-249 < t < 1.44999999999999994e41Initial program 100.0%
Taylor expanded in y around inf 46.0%
Taylor expanded in b around inf 33.5%
*-commutative33.5%
Simplified33.5%
Final simplification37.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.4e+101) (* y b) (if (<= b 1.85e+68) (* y (- z)) (if (<= b 1.8e+237) (* y b) (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.4e+101) {
tmp = y * b;
} else if (b <= 1.85e+68) {
tmp = y * -z;
} else if (b <= 1.8e+237) {
tmp = y * b;
} 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 <= (-1.4d+101)) then
tmp = y * b
else if (b <= 1.85d+68) then
tmp = y * -z
else if (b <= 1.8d+237) then
tmp = y * b
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 <= -1.4e+101) {
tmp = y * b;
} else if (b <= 1.85e+68) {
tmp = y * -z;
} else if (b <= 1.8e+237) {
tmp = y * b;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.4e+101: tmp = y * b elif b <= 1.85e+68: tmp = y * -z elif b <= 1.8e+237: tmp = y * b else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.4e+101) tmp = Float64(y * b); elseif (b <= 1.85e+68) tmp = Float64(y * Float64(-z)); elseif (b <= 1.8e+237) tmp = Float64(y * b); else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.4e+101) tmp = y * b; elseif (b <= 1.85e+68) tmp = y * -z; elseif (b <= 1.8e+237) tmp = y * b; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.4e+101], N[(y * b), $MachinePrecision], If[LessEqual[b, 1.85e+68], N[(y * (-z)), $MachinePrecision], If[LessEqual[b, 1.8e+237], N[(y * b), $MachinePrecision], N[(t * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{+101}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;b \leq 1.85 \cdot 10^{+68}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{+237}:\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if b < -1.39999999999999991e101 or 1.84999999999999999e68 < b < 1.80000000000000007e237Initial program 90.9%
Taylor expanded in y around inf 43.0%
Taylor expanded in b around inf 39.6%
*-commutative39.6%
Simplified39.6%
if -1.39999999999999991e101 < b < 1.84999999999999999e68Initial program 98.8%
Taylor expanded in z around inf 38.8%
Taylor expanded in y around inf 28.9%
mul-1-neg28.9%
Simplified28.9%
if 1.80000000000000007e237 < b Initial program 93.8%
Taylor expanded in t around inf 73.2%
Taylor expanded in b around inf 67.4%
*-commutative67.4%
Simplified67.4%
Final simplification34.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.35e+60) (* y b) (if (<= b 1.35e-267) x (if (<= b 30000000000.0) a (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.35e+60) {
tmp = y * b;
} else if (b <= 1.35e-267) {
tmp = x;
} else if (b <= 30000000000.0) {
tmp = a;
} 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 <= (-2.35d+60)) then
tmp = y * b
else if (b <= 1.35d-267) then
tmp = x
else if (b <= 30000000000.0d0) then
tmp = a
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 <= -2.35e+60) {
tmp = y * b;
} else if (b <= 1.35e-267) {
tmp = x;
} else if (b <= 30000000000.0) {
tmp = a;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.35e+60: tmp = y * b elif b <= 1.35e-267: tmp = x elif b <= 30000000000.0: tmp = a else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.35e+60) tmp = Float64(y * b); elseif (b <= 1.35e-267) tmp = x; elseif (b <= 30000000000.0) tmp = a; else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.35e+60) tmp = y * b; elseif (b <= 1.35e-267) tmp = x; elseif (b <= 30000000000.0) tmp = a; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.35e+60], N[(y * b), $MachinePrecision], If[LessEqual[b, 1.35e-267], x, If[LessEqual[b, 30000000000.0], a, N[(t * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.35 \cdot 10^{+60}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{-267}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 30000000000:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if b < -2.3499999999999999e60Initial program 88.6%
Taylor expanded in y around inf 41.7%
Taylor expanded in b around inf 32.9%
*-commutative32.9%
Simplified32.9%
if -2.3499999999999999e60 < b < 1.34999999999999994e-267Initial program 98.9%
Taylor expanded in x around inf 24.5%
if 1.34999999999999994e-267 < b < 3e10Initial program 100.0%
Taylor expanded in a around inf 51.1%
Taylor expanded in t around 0 24.5%
if 3e10 < b Initial program 95.1%
Taylor expanded in t around inf 41.8%
Taylor expanded in b around inf 35.7%
*-commutative35.7%
Simplified35.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -8.2e+60) (* t b) (if (<= b 5.2e-271) x (if (<= b 28000000000.0) a (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.2e+60) {
tmp = t * b;
} else if (b <= 5.2e-271) {
tmp = x;
} else if (b <= 28000000000.0) {
tmp = a;
} 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 <= (-8.2d+60)) then
tmp = t * b
else if (b <= 5.2d-271) then
tmp = x
else if (b <= 28000000000.0d0) then
tmp = a
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 <= -8.2e+60) {
tmp = t * b;
} else if (b <= 5.2e-271) {
tmp = x;
} else if (b <= 28000000000.0) {
tmp = a;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8.2e+60: tmp = t * b elif b <= 5.2e-271: tmp = x elif b <= 28000000000.0: tmp = a else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.2e+60) tmp = Float64(t * b); elseif (b <= 5.2e-271) tmp = x; elseif (b <= 28000000000.0) tmp = a; else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -8.2e+60) tmp = t * b; elseif (b <= 5.2e-271) tmp = x; elseif (b <= 28000000000.0) tmp = a; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.2e+60], N[(t * b), $MachinePrecision], If[LessEqual[b, 5.2e-271], x, If[LessEqual[b, 28000000000.0], a, N[(t * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.2 \cdot 10^{+60}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-271}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 28000000000:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if b < -8.2e60 or 2.8e10 < b Initial program 92.3%
Taylor expanded in t around inf 38.5%
Taylor expanded in b around inf 33.9%
*-commutative33.9%
Simplified33.9%
if -8.2e60 < b < 5.2e-271Initial program 98.9%
Taylor expanded in x around inf 24.5%
if 5.2e-271 < b < 2.8e10Initial program 100.0%
Taylor expanded in a around inf 51.1%
Taylor expanded in t around 0 24.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.9e+59) (not (<= b 2.3e+32))) (* b (- (+ y t) 2.0)) (+ x (* a (- 1.0 t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.9e+59) || !(b <= 2.3e+32)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x + (a * (1.0 - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-7.9d+59)) .or. (.not. (b <= 2.3d+32))) then
tmp = b * ((y + t) - 2.0d0)
else
tmp = x + (a * (1.0d0 - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.9e+59) || !(b <= 2.3e+32)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x + (a * (1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.9e+59) or not (b <= 2.3e+32): tmp = b * ((y + t) - 2.0) else: tmp = x + (a * (1.0 - t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.9e+59) || !(b <= 2.3e+32)) tmp = Float64(b * Float64(Float64(y + t) - 2.0)); else tmp = Float64(x + Float64(a * Float64(1.0 - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7.9e+59) || ~((b <= 2.3e+32))) tmp = b * ((y + t) - 2.0); else tmp = x + (a * (1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.9e+59], N[Not[LessEqual[b, 2.3e+32]], $MachinePrecision]], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.9 \cdot 10^{+59} \lor \neg \left(b \leq 2.3 \cdot 10^{+32}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if b < -7.9000000000000001e59 or 2.3e32 < b Initial program 91.7%
Taylor expanded in b around inf 76.7%
if -7.9000000000000001e59 < b < 2.3e32Initial program 99.3%
Taylor expanded in b around 0 93.6%
Taylor expanded in a around inf 57.6%
Final simplification64.8%
(FPCore (x y z t a b) :precision binary64 (if (<= x -3.2e+30) x (if (<= x -2.1e-148) z (if (<= x 3.7e+146) a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.2e+30) {
tmp = x;
} else if (x <= -2.1e-148) {
tmp = z;
} else if (x <= 3.7e+146) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-3.2d+30)) then
tmp = x
else if (x <= (-2.1d-148)) then
tmp = z
else if (x <= 3.7d+146) then
tmp = a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.2e+30) {
tmp = x;
} else if (x <= -2.1e-148) {
tmp = z;
} else if (x <= 3.7e+146) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -3.2e+30: tmp = x elif x <= -2.1e-148: tmp = z elif x <= 3.7e+146: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.2e+30) tmp = x; elseif (x <= -2.1e-148) tmp = z; elseif (x <= 3.7e+146) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -3.2e+30) tmp = x; elseif (x <= -2.1e-148) tmp = z; elseif (x <= 3.7e+146) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.2e+30], x, If[LessEqual[x, -2.1e-148], z, If[LessEqual[x, 3.7e+146], a, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-148}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+146}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.19999999999999973e30 or 3.70000000000000004e146 < x Initial program 98.9%
Taylor expanded in x around inf 34.9%
if -3.19999999999999973e30 < x < -2.1e-148Initial program 89.7%
Taylor expanded in z around inf 35.1%
Taylor expanded in y around 0 23.6%
Taylor expanded in z around 0 23.6%
if -2.1e-148 < x < 3.70000000000000004e146Initial program 96.7%
Taylor expanded in a around inf 33.0%
Taylor expanded in t around 0 14.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.8e+15) (not (<= a 5.5e+37))) (* a (- 1.0 t)) (* y (- z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.8e+15) || !(a <= 5.5e+37)) {
tmp = a * (1.0 - t);
} else {
tmp = y * -z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.8d+15)) .or. (.not. (a <= 5.5d+37))) then
tmp = a * (1.0d0 - t)
else
tmp = y * -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.8e+15) || !(a <= 5.5e+37)) {
tmp = a * (1.0 - t);
} else {
tmp = y * -z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.8e+15) or not (a <= 5.5e+37): tmp = a * (1.0 - t) else: tmp = y * -z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.8e+15) || !(a <= 5.5e+37)) tmp = Float64(a * Float64(1.0 - t)); else tmp = Float64(y * Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.8e+15) || ~((a <= 5.5e+37))) tmp = a * (1.0 - t); else tmp = y * -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.8e+15], N[Not[LessEqual[a, 5.5e+37]], $MachinePrecision]], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(y * (-z)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+15} \lor \neg \left(a \leq 5.5 \cdot 10^{+37}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\end{array}
\end{array}
if a < -1.8e15 or 5.50000000000000016e37 < a Initial program 92.8%
Taylor expanded in a around inf 57.6%
if -1.8e15 < a < 5.50000000000000016e37Initial program 99.3%
Taylor expanded in z around inf 42.1%
Taylor expanded in y around inf 30.5%
mul-1-neg30.5%
Simplified30.5%
Final simplification42.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.2e-22) x (if (<= x 1.05e+147) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.2e-22) {
tmp = x;
} else if (x <= 1.05e+147) {
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 <= (-2.2d-22)) then
tmp = x
else if (x <= 1.05d+147) 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 <= -2.2e-22) {
tmp = x;
} else if (x <= 1.05e+147) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.2e-22: tmp = x elif x <= 1.05e+147: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.2e-22) tmp = x; elseif (x <= 1.05e+147) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.2e-22) tmp = x; elseif (x <= 1.05e+147) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.2e-22], x, If[LessEqual[x, 1.05e+147], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{-22}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+147}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.2000000000000001e-22 or 1.05000000000000003e147 < x Initial program 98.1%
Taylor expanded in x around inf 31.0%
if -2.2000000000000001e-22 < x < 1.05000000000000003e147Initial program 95.3%
Taylor expanded in a around inf 34.2%
Taylor expanded in t around 0 14.4%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 96.5%
Taylor expanded in a around inf 28.7%
Taylor expanded in t around 0 10.6%
herbie shell --seed 2024181
(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)))