
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* b (- (+ y t) 2.0)))))
(if (<= t_1 INFINITY) t_1 (- (+ x (* t b)) (* z (+ y -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x + (t * b)) - (z * (y + -1.0));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (x + (t * b)) - (z * (y + -1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (x + (t * b)) - (z * (y + -1.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(x + Float64(t * b)) - Float64(z * Float64(y + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (b * ((y + t) - 2.0)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (x + (t * b)) - (z * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x + N[(t * b), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + t \cdot b\right) - z \cdot \left(y + -1\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 a around 0 31.3%
Taylor expanded in t around inf 62.5%
Final simplification97.6%
(FPCore (x y z t a b) :precision binary64 (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b) return fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Initial program 93.7%
+-commutative93.7%
fma-define97.2%
associate--l+97.2%
sub-neg97.2%
metadata-eval97.2%
sub-neg97.2%
associate-+l-97.2%
fma-neg97.3%
sub-neg97.3%
metadata-eval97.3%
remove-double-neg97.3%
sub-neg97.3%
metadata-eval97.3%
Simplified97.3%
Final simplification97.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 y))))
(if (or (<= a -1.5e+116) (not (<= a 8.8e+22)))
(+ x (+ t_1 (* a (- 1.0 t))))
(+ (+ x (* b (- (+ y t) 2.0))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - y);
double tmp;
if ((a <= -1.5e+116) || !(a <= 8.8e+22)) {
tmp = x + (t_1 + (a * (1.0 - t)));
} else {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * (1.0d0 - y)
if ((a <= (-1.5d+116)) .or. (.not. (a <= 8.8d+22))) then
tmp = x + (t_1 + (a * (1.0d0 - t)))
else
tmp = (x + (b * ((y + t) - 2.0d0))) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - y);
double tmp;
if ((a <= -1.5e+116) || !(a <= 8.8e+22)) {
tmp = x + (t_1 + (a * (1.0 - t)));
} else {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - y) tmp = 0 if (a <= -1.5e+116) or not (a <= 8.8e+22): tmp = x + (t_1 + (a * (1.0 - t))) else: tmp = (x + (b * ((y + t) - 2.0))) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - y)) tmp = 0.0 if ((a <= -1.5e+116) || !(a <= 8.8e+22)) tmp = Float64(x + Float64(t_1 + Float64(a * Float64(1.0 - t)))); else tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - y); tmp = 0.0; if ((a <= -1.5e+116) || ~((a <= 8.8e+22))) tmp = x + (t_1 + (a * (1.0 - t))); else tmp = (x + (b * ((y + t) - 2.0))) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -1.5e+116], N[Not[LessEqual[a, 8.8e+22]], $MachinePrecision]], N[(x + N[(t$95$1 + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;a \leq -1.5 \cdot 10^{+116} \lor \neg \left(a \leq 8.8 \cdot 10^{+22}\right):\\
\;\;\;\;x + \left(t\_1 + a \cdot \left(1 - t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t\_1\\
\end{array}
\end{array}
if a < -1.4999999999999999e116 or 8.8e22 < a Initial program 89.7%
Taylor expanded in b around 0 86.1%
if -1.4999999999999999e116 < a < 8.8e22Initial program 96.6%
Taylor expanded in a around 0 93.8%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (or (<= z -6.6e+49) (not (<= z 4e+62)))
(+ x (+ (* z (- 1.0 y)) t_1))
(+ (+ x (* b (- (+ y t) 2.0))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if ((z <= -6.6e+49) || !(z <= 4e+62)) {
tmp = x + ((z * (1.0 - y)) + t_1);
} else {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (1.0d0 - t)
if ((z <= (-6.6d+49)) .or. (.not. (z <= 4d+62))) then
tmp = x + ((z * (1.0d0 - y)) + t_1)
else
tmp = (x + (b * ((y + t) - 2.0d0))) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if ((z <= -6.6e+49) || !(z <= 4e+62)) {
tmp = x + ((z * (1.0 - y)) + t_1);
} else {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if (z <= -6.6e+49) or not (z <= 4e+62): tmp = x + ((z * (1.0 - y)) + t_1) else: tmp = (x + (b * ((y + t) - 2.0))) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if ((z <= -6.6e+49) || !(z <= 4e+62)) tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) + t_1)); else tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if ((z <= -6.6e+49) || ~((z <= 4e+62))) tmp = x + ((z * (1.0 - y)) + t_1); else tmp = (x + (b * ((y + t) - 2.0))) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -6.6e+49], N[Not[LessEqual[z, 4e+62]], $MachinePrecision]], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+49} \lor \neg \left(z \leq 4 \cdot 10^{+62}\right):\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t\_1\\
\end{array}
\end{array}
if z < -6.5999999999999997e49 or 4.00000000000000014e62 < z Initial program 91.3%
Taylor expanded in b around 0 85.2%
if -6.5999999999999997e49 < z < 4.00000000000000014e62Initial program 95.4%
Taylor expanded in z around 0 90.0%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -4.3e+18)
t_1
(if (<= b 1.55e-58)
(+ x (* a (- 1.0 t)))
(if (<= b 2.2e+30) (+ x (* z (- 1.0 y))) 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 <= -4.3e+18) {
tmp = t_1;
} else if (b <= 1.55e-58) {
tmp = x + (a * (1.0 - t));
} else if (b <= 2.2e+30) {
tmp = x + (z * (1.0 - y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (b * ((y + t) - 2.0d0))
if (b <= (-4.3d+18)) then
tmp = t_1
else if (b <= 1.55d-58) then
tmp = x + (a * (1.0d0 - t))
else if (b <= 2.2d+30) then
tmp = x + (z * (1.0d0 - y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -4.3e+18) {
tmp = t_1;
} else if (b <= 1.55e-58) {
tmp = x + (a * (1.0 - t));
} else if (b <= 2.2e+30) {
tmp = x + (z * (1.0 - y));
} 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 <= -4.3e+18: tmp = t_1 elif b <= 1.55e-58: tmp = x + (a * (1.0 - t)) elif b <= 2.2e+30: tmp = x + (z * (1.0 - y)) 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 <= -4.3e+18) tmp = t_1; elseif (b <= 1.55e-58) tmp = Float64(x + Float64(a * Float64(1.0 - t))); elseif (b <= 2.2e+30) tmp = Float64(x + Float64(z * Float64(1.0 - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -4.3e+18) tmp = t_1; elseif (b <= 1.55e-58) tmp = x + (a * (1.0 - t)); elseif (b <= 2.2e+30) tmp = x + (z * (1.0 - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.3e+18], t$95$1, If[LessEqual[b, 1.55e-58], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.2e+30], N[(x + N[(z * N[(1.0 - y), $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 -4.3 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{-58}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{+30}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.3e18 or 2.2e30 < b Initial program 86.3%
Taylor expanded in a around 0 81.7%
Taylor expanded in z around 0 70.9%
if -4.3e18 < b < 1.55e-58Initial program 99.9%
Taylor expanded in b around 0 95.4%
Taylor expanded in a around inf 67.1%
if 1.55e-58 < b < 2.2e30Initial program 100.0%
Taylor expanded in b around 0 93.6%
Taylor expanded in a around 0 80.4%
Final simplification69.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.95e+76) (not (<= b 1.02e+130))) (+ 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.95e+76) || !(b <= 1.02e+130)) {
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.95d+76)) .or. (.not. (b <= 1.02d+130))) 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.95e+76) || !(b <= 1.02e+130)) {
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.95e+76) or not (b <= 1.02e+130): 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.95e+76) || !(b <= 1.02e+130)) 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.95e+76) || ~((b <= 1.02e+130))) 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.95e+76], N[Not[LessEqual[b, 1.02e+130]], $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.95 \cdot 10^{+76} \lor \neg \left(b \leq 1.02 \cdot 10^{+130}\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.94999999999999995e76 or 1.01999999999999999e130 < b Initial program 88.1%
Taylor expanded in a around 0 87.0%
Taylor expanded in z around 0 82.3%
if -1.94999999999999995e76 < b < 1.01999999999999999e130Initial program 96.5%
Taylor expanded in b around 0 89.5%
Final simplification87.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -18000000000.0)
t_1
(if (<= t 7.8e-25)
(+ a (+ x (* b (+ y -2.0))))
(if (<= t 1.8e+54) (+ x (* z (- 1.0 y))) 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 <= -18000000000.0) {
tmp = t_1;
} else if (t <= 7.8e-25) {
tmp = a + (x + (b * (y + -2.0)));
} else if (t <= 1.8e+54) {
tmp = x + (z * (1.0 - y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b - a)
if (t <= (-18000000000.0d0)) then
tmp = t_1
else if (t <= 7.8d-25) then
tmp = a + (x + (b * (y + (-2.0d0))))
else if (t <= 1.8d+54) then
tmp = x + (z * (1.0d0 - y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -18000000000.0) {
tmp = t_1;
} else if (t <= 7.8e-25) {
tmp = a + (x + (b * (y + -2.0)));
} else if (t <= 1.8e+54) {
tmp = x + (z * (1.0 - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -18000000000.0: tmp = t_1 elif t <= 7.8e-25: tmp = a + (x + (b * (y + -2.0))) elif t <= 1.8e+54: tmp = x + (z * (1.0 - y)) 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 <= -18000000000.0) tmp = t_1; elseif (t <= 7.8e-25) tmp = Float64(a + Float64(x + Float64(b * Float64(y + -2.0)))); elseif (t <= 1.8e+54) tmp = Float64(x + Float64(z * Float64(1.0 - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -18000000000.0) tmp = t_1; elseif (t <= 7.8e-25) tmp = a + (x + (b * (y + -2.0))); elseif (t <= 1.8e+54) tmp = x + (z * (1.0 - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -18000000000.0], t$95$1, If[LessEqual[t, 7.8e-25], N[(a + N[(x + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+54], N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -18000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-25}:\\
\;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+54}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.8e10 or 1.8000000000000001e54 < t Initial program 87.8%
Taylor expanded in t around inf 71.5%
if -1.8e10 < t < 7.8e-25Initial program 97.8%
Taylor expanded in z around 0 75.1%
Taylor expanded in t around 0 74.5%
sub-neg74.5%
sub-neg74.5%
metadata-eval74.5%
+-commutative74.5%
neg-mul-174.5%
remove-double-neg74.5%
Simplified74.5%
if 7.8e-25 < t < 1.8000000000000001e54Initial program 94.4%
Taylor expanded in b around 0 85.5%
Taylor expanded in a around 0 63.8%
Final simplification72.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -5.4e+20)
t_1
(if (<= b 5e-53)
(+ x (* a (- 1.0 t)))
(if (<= b 3.8e+29) (+ x (* z (- 1.0 y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -5.4e+20) {
tmp = t_1;
} else if (b <= 5e-53) {
tmp = x + (a * (1.0 - t));
} else if (b <= 3.8e+29) {
tmp = x + (z * (1.0 - y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((y + t) - 2.0d0)
if (b <= (-5.4d+20)) then
tmp = t_1
else if (b <= 5d-53) then
tmp = x + (a * (1.0d0 - t))
else if (b <= 3.8d+29) then
tmp = x + (z * (1.0d0 - y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -5.4e+20) {
tmp = t_1;
} else if (b <= 5e-53) {
tmp = x + (a * (1.0 - t));
} else if (b <= 3.8e+29) {
tmp = x + (z * (1.0 - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((y + t) - 2.0) tmp = 0 if b <= -5.4e+20: tmp = t_1 elif b <= 5e-53: tmp = x + (a * (1.0 - t)) elif b <= 3.8e+29: tmp = x + (z * (1.0 - y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -5.4e+20) tmp = t_1; elseif (b <= 5e-53) tmp = Float64(x + Float64(a * Float64(1.0 - t))); elseif (b <= 3.8e+29) tmp = Float64(x + Float64(z * Float64(1.0 - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -5.4e+20) tmp = t_1; elseif (b <= 5e-53) tmp = x + (a * (1.0 - t)); elseif (b <= 3.8e+29) tmp = x + (z * (1.0 - y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.4e+20], t$95$1, If[LessEqual[b, 5e-53], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.8e+29], N[(x + N[(z * N[(1.0 - y), $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 -5.4 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-53}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{+29}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.4e20 or 3.79999999999999971e29 < b Initial program 86.3%
Taylor expanded in b around inf 64.8%
if -5.4e20 < b < 5e-53Initial program 99.9%
Taylor expanded in b around 0 95.4%
Taylor expanded in a around inf 67.1%
if 5e-53 < b < 3.79999999999999971e29Initial program 100.0%
Taylor expanded in b around 0 93.6%
Taylor expanded in a around 0 80.4%
Final simplification66.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -1.1e+20)
t_1
(if (<= b -2.2e-117) (* a (- 1.0 t)) (if (<= b 8.5e+27) (+ x z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -1.1e+20) {
tmp = t_1;
} else if (b <= -2.2e-117) {
tmp = a * (1.0 - t);
} else if (b <= 8.5e+27) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((y + t) - 2.0d0)
if (b <= (-1.1d+20)) then
tmp = t_1
else if (b <= (-2.2d-117)) then
tmp = a * (1.0d0 - t)
else if (b <= 8.5d+27) then
tmp = x + z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -1.1e+20) {
tmp = t_1;
} else if (b <= -2.2e-117) {
tmp = a * (1.0 - t);
} else if (b <= 8.5e+27) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((y + t) - 2.0) tmp = 0 if b <= -1.1e+20: tmp = t_1 elif b <= -2.2e-117: tmp = a * (1.0 - t) elif b <= 8.5e+27: tmp = x + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -1.1e+20) tmp = t_1; elseif (b <= -2.2e-117) tmp = Float64(a * Float64(1.0 - t)); elseif (b <= 8.5e+27) tmp = Float64(x + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -1.1e+20) tmp = t_1; elseif (b <= -2.2e-117) tmp = a * (1.0 - t); elseif (b <= 8.5e+27) tmp = x + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.1e+20], t$95$1, If[LessEqual[b, -2.2e-117], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e+27], N[(x + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.1 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.2 \cdot 10^{-117}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+27}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.1e20 or 8.5e27 < b Initial program 86.3%
Taylor expanded in b around inf 64.8%
if -1.1e20 < b < -2.2000000000000001e-117Initial program 99.9%
Taylor expanded in a around inf 58.0%
if -2.2000000000000001e-117 < b < 8.5e27Initial program 100.0%
Taylor expanded in b around 0 94.8%
Taylor expanded in a around 0 64.8%
Taylor expanded in y around 0 46.9%
cancel-sign-sub-inv46.9%
metadata-eval46.9%
*-lft-identity46.9%
Simplified46.9%
Final simplification56.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.5e+72) (not (<= b 3.9e+129))) (+ x (* b (- (+ y t) 2.0))) (- x (+ (* z (+ y -1.0)) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.5e+72) || !(b <= 3.9e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x - ((z * (y + -1.0)) + (t * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-7.5d+72)) .or. (.not. (b <= 3.9d+129))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x - ((z * (y + (-1.0d0))) + (t * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.5e+72) || !(b <= 3.9e+129)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x - ((z * (y + -1.0)) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.5e+72) or not (b <= 3.9e+129): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x - ((z * (y + -1.0)) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.5e+72) || !(b <= 3.9e+129)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(x - Float64(Float64(z * Float64(y + -1.0)) + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7.5e+72) || ~((b <= 3.9e+129))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x - ((z * (y + -1.0)) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.5e+72], N[Not[LessEqual[b, 3.9e+129]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+72} \lor \neg \left(b \leq 3.9 \cdot 10^{+129}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(z \cdot \left(y + -1\right) + t \cdot a\right)\\
\end{array}
\end{array}
if b < -7.50000000000000027e72 or 3.8999999999999997e129 < b Initial program 88.1%
Taylor expanded in a around 0 87.0%
Taylor expanded in z around 0 82.3%
if -7.50000000000000027e72 < b < 3.8999999999999997e129Initial program 96.5%
Taylor expanded in b around 0 89.5%
Taylor expanded in t around inf 74.5%
*-commutative74.5%
Simplified74.5%
Final simplification77.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -21500000.0)
t_1
(if (<= y 7.2e-206) (+ x z) (if (<= y 3.8e+118) (* t (- b 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 <= -21500000.0) {
tmp = t_1;
} else if (y <= 7.2e-206) {
tmp = x + z;
} else if (y <= 3.8e+118) {
tmp = t * (b - 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 <= (-21500000.0d0)) then
tmp = t_1
else if (y <= 7.2d-206) then
tmp = x + z
else if (y <= 3.8d+118) then
tmp = t * (b - 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 <= -21500000.0) {
tmp = t_1;
} else if (y <= 7.2e-206) {
tmp = x + z;
} else if (y <= 3.8e+118) {
tmp = t * (b - a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -21500000.0: tmp = t_1 elif y <= 7.2e-206: tmp = x + z elif y <= 3.8e+118: tmp = t * (b - 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 <= -21500000.0) tmp = t_1; elseif (y <= 7.2e-206) tmp = Float64(x + z); elseif (y <= 3.8e+118) tmp = Float64(t * Float64(b - 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 <= -21500000.0) tmp = t_1; elseif (y <= 7.2e-206) tmp = x + z; elseif (y <= 3.8e+118) tmp = t * (b - 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, -21500000.0], t$95$1, If[LessEqual[y, 7.2e-206], N[(x + z), $MachinePrecision], If[LessEqual[y, 3.8e+118], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -21500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-206}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+118}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.15e7 or 3.80000000000000016e118 < y Initial program 89.3%
Taylor expanded in y around inf 62.2%
if -2.15e7 < y < 7.19999999999999987e-206Initial program 98.8%
Taylor expanded in b around 0 75.3%
Taylor expanded in a around 0 49.2%
Taylor expanded in y around 0 48.9%
cancel-sign-sub-inv48.9%
metadata-eval48.9%
*-lft-identity48.9%
Simplified48.9%
if 7.19999999999999987e-206 < y < 3.80000000000000016e118Initial program 94.0%
Taylor expanded in t around inf 47.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2300000000000.0) (* y b) (if (<= b -7e-80) a (if (<= b 82000000.0) x (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2300000000000.0) {
tmp = y * b;
} else if (b <= -7e-80) {
tmp = a;
} else if (b <= 82000000.0) {
tmp = x;
} 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 <= (-2300000000000.0d0)) then
tmp = y * b
else if (b <= (-7d-80)) then
tmp = a
else if (b <= 82000000.0d0) then
tmp = x
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 <= -2300000000000.0) {
tmp = y * b;
} else if (b <= -7e-80) {
tmp = a;
} else if (b <= 82000000.0) {
tmp = x;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2300000000000.0: tmp = y * b elif b <= -7e-80: tmp = a elif b <= 82000000.0: tmp = x else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2300000000000.0) tmp = Float64(y * b); elseif (b <= -7e-80) tmp = a; elseif (b <= 82000000.0) tmp = x; else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2300000000000.0) tmp = y * b; elseif (b <= -7e-80) tmp = a; elseif (b <= 82000000.0) tmp = x; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2300000000000.0], N[(y * b), $MachinePrecision], If[LessEqual[b, -7e-80], a, If[LessEqual[b, 82000000.0], x, N[(t * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2300000000000:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-80}:\\
\;\;\;\;a\\
\mathbf{elif}\;b \leq 82000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if b < -2.3e12Initial program 91.8%
Taylor expanded in z around 0 80.1%
Taylor expanded in y around inf 32.8%
if -2.3e12 < b < -7.00000000000000029e-80Initial program 100.0%
Taylor expanded in a around inf 65.9%
Taylor expanded in t around 0 36.8%
if -7.00000000000000029e-80 < b < 8.2e7Initial program 99.9%
Taylor expanded in x around inf 30.9%
if 8.2e7 < b Initial program 82.9%
Taylor expanded in t around inf 43.8%
Taylor expanded in b around inf 35.8%
Final simplification33.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.2e+16) (not (<= b 88000000000000.0))) (* 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 <= -2.2e+16) || !(b <= 88000000000000.0)) {
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 <= (-2.2d+16)) .or. (.not. (b <= 88000000000000.0d0))) 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 <= -2.2e+16) || !(b <= 88000000000000.0)) {
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 <= -2.2e+16) or not (b <= 88000000000000.0): 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 <= -2.2e+16) || !(b <= 88000000000000.0)) 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 <= -2.2e+16) || ~((b <= 88000000000000.0))) 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, -2.2e+16], N[Not[LessEqual[b, 88000000000000.0]], $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 -2.2 \cdot 10^{+16} \lor \neg \left(b \leq 88000000000000\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 < -2.2e16 or 8.8e13 < b Initial program 86.6%
Taylor expanded in b around inf 63.8%
if -2.2e16 < b < 8.8e13Initial program 100.0%
Taylor expanded in b around 0 95.2%
Taylor expanded in a around inf 64.5%
Final simplification64.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.6e+186) (not (<= a 1.15e+36))) (* a (- 1.0 t)) (+ x (* b (- t 2.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.6e+186) || !(a <= 1.15e+36)) {
tmp = a * (1.0 - t);
} else {
tmp = x + (b * (t - 2.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 ((a <= (-2.6d+186)) .or. (.not. (a <= 1.15d+36))) then
tmp = a * (1.0d0 - t)
else
tmp = x + (b * (t - 2.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 ((a <= -2.6e+186) || !(a <= 1.15e+36)) {
tmp = a * (1.0 - t);
} else {
tmp = x + (b * (t - 2.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.6e+186) or not (a <= 1.15e+36): tmp = a * (1.0 - t) else: tmp = x + (b * (t - 2.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.6e+186) || !(a <= 1.15e+36)) tmp = Float64(a * Float64(1.0 - t)); else tmp = Float64(x + Float64(b * Float64(t - 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.6e+186) || ~((a <= 1.15e+36))) tmp = a * (1.0 - t); else tmp = x + (b * (t - 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.6e+186], N[Not[LessEqual[a, 1.15e+36]], $MachinePrecision]], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{+186} \lor \neg \left(a \leq 1.15 \cdot 10^{+36}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(t - 2\right)\\
\end{array}
\end{array}
if a < -2.6000000000000001e186 or 1.14999999999999998e36 < a Initial program 89.0%
Taylor expanded in a around inf 64.9%
if -2.6000000000000001e186 < a < 1.14999999999999998e36Initial program 96.3%
Taylor expanded in a around 0 92.0%
Taylor expanded in y around 0 65.9%
associate--l+65.9%
sub-neg65.9%
metadata-eval65.9%
neg-mul-165.9%
Simplified65.9%
Taylor expanded in z around 0 50.7%
Final simplification55.8%
(FPCore (x y z t a b) :precision binary64 (if (<= x -8e+91) x (if (<= x 6e-194) a (if (<= x 2.5e+95) z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8e+91) {
tmp = x;
} else if (x <= 6e-194) {
tmp = a;
} else if (x <= 2.5e+95) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-8d+91)) then
tmp = x
else if (x <= 6d-194) then
tmp = a
else if (x <= 2.5d+95) then
tmp = z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8e+91) {
tmp = x;
} else if (x <= 6e-194) {
tmp = a;
} else if (x <= 2.5e+95) {
tmp = z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -8e+91: tmp = x elif x <= 6e-194: tmp = a elif x <= 2.5e+95: tmp = z else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -8e+91) tmp = x; elseif (x <= 6e-194) tmp = a; elseif (x <= 2.5e+95) tmp = z; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -8e+91) tmp = x; elseif (x <= 6e-194) tmp = a; elseif (x <= 2.5e+95) tmp = z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8e+91], x, If[LessEqual[x, 6e-194], a, If[LessEqual[x, 2.5e+95], z, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+91}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-194}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8.00000000000000064e91 or 2.50000000000000012e95 < x Initial program 95.1%
Taylor expanded in x around inf 41.5%
if -8.00000000000000064e91 < x < 6e-194Initial program 93.0%
Taylor expanded in a around inf 38.7%
Taylor expanded in t around 0 20.0%
if 6e-194 < x < 2.50000000000000012e95Initial program 92.5%
Taylor expanded in z around inf 37.8%
Taylor expanded in y around 0 25.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.65e+14) (not (<= t 4.2e+53))) (* t (- b a)) (+ x z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.65e+14) || !(t <= 4.2e+53)) {
tmp = t * (b - a);
} else {
tmp = x + 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 ((t <= (-2.65d+14)) .or. (.not. (t <= 4.2d+53))) then
tmp = t * (b - a)
else
tmp = x + 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 ((t <= -2.65e+14) || !(t <= 4.2e+53)) {
tmp = t * (b - a);
} else {
tmp = x + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.65e+14) or not (t <= 4.2e+53): tmp = t * (b - a) else: tmp = x + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.65e+14) || !(t <= 4.2e+53)) tmp = Float64(t * Float64(b - a)); else tmp = Float64(x + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.65e+14) || ~((t <= 4.2e+53))) tmp = t * (b - a); else tmp = x + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.65e+14], N[Not[LessEqual[t, 4.2e+53]], $MachinePrecision]], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.65 \cdot 10^{+14} \lor \neg \left(t \leq 4.2 \cdot 10^{+53}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\end{array}
if t < -2.65e14 or 4.2000000000000004e53 < t Initial program 87.7%
Taylor expanded in t around inf 72.2%
if -2.65e14 < t < 4.2000000000000004e53Initial program 97.4%
Taylor expanded in b around 0 75.3%
Taylor expanded in a around 0 55.0%
Taylor expanded in y around 0 37.4%
cancel-sign-sub-inv37.4%
metadata-eval37.4%
*-lft-identity37.4%
Simplified37.4%
Final simplification50.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -6.5e+80) (not (<= a 1.8e+30))) (* a (- 1.0 t)) (+ x z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -6.5e+80) || !(a <= 1.8e+30)) {
tmp = a * (1.0 - t);
} else {
tmp = x + 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 <= (-6.5d+80)) .or. (.not. (a <= 1.8d+30))) then
tmp = a * (1.0d0 - t)
else
tmp = x + 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 <= -6.5e+80) || !(a <= 1.8e+30)) {
tmp = a * (1.0 - t);
} else {
tmp = x + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -6.5e+80) or not (a <= 1.8e+30): tmp = a * (1.0 - t) else: tmp = x + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -6.5e+80) || !(a <= 1.8e+30)) tmp = Float64(a * Float64(1.0 - t)); else tmp = Float64(x + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -6.5e+80) || ~((a <= 1.8e+30))) tmp = a * (1.0 - t); else tmp = x + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -6.5e+80], N[Not[LessEqual[a, 1.8e+30]], $MachinePrecision]], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{+80} \lor \neg \left(a \leq 1.8 \cdot 10^{+30}\right):\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\end{array}
if a < -6.4999999999999998e80 or 1.8000000000000001e30 < a Initial program 90.2%
Taylor expanded in a around inf 59.6%
if -6.4999999999999998e80 < a < 1.8000000000000001e30Initial program 96.5%
Taylor expanded in b around 0 59.9%
Taylor expanded in a around 0 57.5%
Taylor expanded in y around 0 41.8%
cancel-sign-sub-inv41.8%
metadata-eval41.8%
*-lft-identity41.8%
Simplified41.8%
Final simplification49.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.15e+75) (* t b) (if (<= t 6.5e+71) (+ x z) (* t (- a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.15e+75) {
tmp = t * b;
} else if (t <= 6.5e+71) {
tmp = x + z;
} else {
tmp = t * -a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.15d+75)) then
tmp = t * b
else if (t <= 6.5d+71) then
tmp = x + z
else
tmp = t * -a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.15e+75) {
tmp = t * b;
} else if (t <= 6.5e+71) {
tmp = x + z;
} else {
tmp = t * -a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.15e+75: tmp = t * b elif t <= 6.5e+71: tmp = x + z else: tmp = t * -a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.15e+75) tmp = Float64(t * b); elseif (t <= 6.5e+71) tmp = Float64(x + z); else tmp = Float64(t * Float64(-a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.15e+75) tmp = t * b; elseif (t <= 6.5e+71) tmp = x + z; else tmp = t * -a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.15e+75], N[(t * b), $MachinePrecision], If[LessEqual[t, 6.5e+71], N[(x + z), $MachinePrecision], N[(t * (-a)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+75}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+71}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\end{array}
\end{array}
if t < -1.1499999999999999e75Initial program 88.6%
Taylor expanded in t around inf 75.8%
Taylor expanded in b around inf 47.8%
if -1.1499999999999999e75 < t < 6.49999999999999954e71Initial program 97.0%
Taylor expanded in b around 0 74.5%
Taylor expanded in a around 0 54.5%
Taylor expanded in y around 0 36.9%
cancel-sign-sub-inv36.9%
metadata-eval36.9%
*-lft-identity36.9%
Simplified36.9%
if 6.49999999999999954e71 < t Initial program 86.0%
Taylor expanded in t around inf 74.9%
Taylor expanded in b around 0 43.2%
neg-mul-143.2%
Simplified43.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -14200000.0) (* y (- z)) (if (<= y 4.4e+27) (+ x z) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -14200000.0) {
tmp = y * -z;
} else if (y <= 4.4e+27) {
tmp = x + z;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-14200000.0d0)) then
tmp = y * -z
else if (y <= 4.4d+27) then
tmp = x + z
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -14200000.0) {
tmp = y * -z;
} else if (y <= 4.4e+27) {
tmp = x + z;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -14200000.0: tmp = y * -z elif y <= 4.4e+27: tmp = x + z else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -14200000.0) tmp = Float64(y * Float64(-z)); elseif (y <= 4.4e+27) tmp = Float64(x + z); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -14200000.0) tmp = y * -z; elseif (y <= 4.4e+27) tmp = x + z; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -14200000.0], N[(y * (-z)), $MachinePrecision], If[LessEqual[y, 4.4e+27], N[(x + z), $MachinePrecision], N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -14200000:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+27}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.42e7Initial program 89.7%
Taylor expanded in z around inf 41.1%
Taylor expanded in y around inf 40.7%
neg-mul-140.7%
Simplified40.7%
if -1.42e7 < y < 4.3999999999999997e27Initial program 96.2%
Taylor expanded in b around 0 72.1%
Taylor expanded in a around 0 43.7%
Taylor expanded in y around 0 43.1%
cancel-sign-sub-inv43.1%
metadata-eval43.1%
*-lft-identity43.1%
Simplified43.1%
if 4.3999999999999997e27 < y Initial program 92.5%
Taylor expanded in z around 0 75.8%
Taylor expanded in y around inf 34.2%
Final simplification40.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.5e+122) (* y b) (if (<= b 6.2e+36) (+ x z) (* t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.5e+122) {
tmp = y * b;
} else if (b <= 6.2e+36) {
tmp = x + 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 <= (-1.5d+122)) then
tmp = y * b
else if (b <= 6.2d+36) then
tmp = x + 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 <= -1.5e+122) {
tmp = y * b;
} else if (b <= 6.2e+36) {
tmp = x + z;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.5e+122: tmp = y * b elif b <= 6.2e+36: tmp = x + z else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.5e+122) tmp = Float64(y * b); elseif (b <= 6.2e+36) tmp = Float64(x + 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 <= -1.5e+122) tmp = y * b; elseif (b <= 6.2e+36) tmp = x + z; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.5e+122], N[(y * b), $MachinePrecision], If[LessEqual[b, 6.2e+36], N[(x + z), $MachinePrecision], N[(t * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5 \cdot 10^{+122}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+36}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if b < -1.49999999999999993e122Initial program 87.1%
Taylor expanded in z around 0 87.3%
Taylor expanded in y around inf 41.3%
if -1.49999999999999993e122 < b < 6.1999999999999999e36Initial program 100.0%
Taylor expanded in b around 0 91.3%
Taylor expanded in a around 0 58.1%
Taylor expanded in y around 0 40.2%
cancel-sign-sub-inv40.2%
metadata-eval40.2%
*-lft-identity40.2%
Simplified40.2%
if 6.1999999999999999e36 < b Initial program 81.8%
Taylor expanded in t around inf 45.0%
Taylor expanded in b around inf 36.5%
Final simplification39.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.42e+91) a (if (<= a 4.8e+67) x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.42e+91) {
tmp = a;
} else if (a <= 4.8e+67) {
tmp = x;
} 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 (a <= (-1.42d+91)) then
tmp = a
else if (a <= 4.8d+67) then
tmp = x
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 (a <= -1.42e+91) {
tmp = a;
} else if (a <= 4.8e+67) {
tmp = x;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.42e+91: tmp = a elif a <= 4.8e+67: tmp = x else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.42e+91) tmp = a; elseif (a <= 4.8e+67) tmp = x; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.42e+91) tmp = a; elseif (a <= 4.8e+67) tmp = x; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.42e+91], a, If[LessEqual[a, 4.8e+67], x, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.42 \cdot 10^{+91}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{+67}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.41999999999999995e91 or 4.80000000000000004e67 < a Initial program 89.4%
Taylor expanded in a around inf 60.2%
Taylor expanded in t around 0 28.5%
if -1.41999999999999995e91 < a < 4.80000000000000004e67Initial program 96.7%
Taylor expanded in x around inf 25.8%
(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 93.7%
Taylor expanded in a around inf 28.6%
Taylor expanded in t around 0 13.4%
herbie shell --seed 2024136
(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)))