
(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 (- 1.0 y))) (* a (- 1.0 t))) (* b (- 2.0 (+ y t))))))
(if (<= t_1 INFINITY) t_1 (* t (+ (- b a) (/ (* b (+ y -2.0)) t))))))
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 * (2.0 - (y + t)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * ((b - a) + ((b * (y + -2.0)) / t));
}
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 * (2.0 - (y + t)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * ((b - a) + ((b * (y + -2.0)) / t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) - (b * (2.0 - (y + t))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * ((b - a) + ((b * (y + -2.0)) / t)) 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(2.0 - Float64(y + t)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(Float64(b - a) + Float64(Float64(b * Float64(y + -2.0)) / t))); 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 * (2.0 - (y + t))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = t * ((b - a) + ((b * (y + -2.0)) / t)); 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[(2.0 - N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(N[(b - a), $MachinePrecision] + N[(N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision] / t), $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(2 - \left(y + t\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(b - a\right) + \frac{b \cdot \left(y + -2\right)}{t}\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 63.6%
mul-1-neg63.6%
distribute-rgt-neg-in63.6%
Simplified63.6%
Taylor expanded in t around inf 90.9%
associate-+r+90.9%
mul-1-neg90.9%
sub-neg90.9%
sub-neg90.9%
metadata-eval90.9%
Simplified90.9%
Final simplification99.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (* b (- t 2.0))))
(if (<= b -2.5e+193)
(* y b)
(if (<= b -3.9e+39)
t_2
(if (<= b 1.35e-260)
t_1
(if (<= b 6.5e-210)
x
(if (<= b 2.1e-158)
t_1
(if (<= b 2.45e-67)
(* z (- y))
(if (<= b 6.5e+113) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = b * (t - 2.0);
double tmp;
if (b <= -2.5e+193) {
tmp = y * b;
} else if (b <= -3.9e+39) {
tmp = t_2;
} else if (b <= 1.35e-260) {
tmp = t_1;
} else if (b <= 6.5e-210) {
tmp = x;
} else if (b <= 2.1e-158) {
tmp = t_1;
} else if (b <= 2.45e-67) {
tmp = z * -y;
} else if (b <= 6.5e+113) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (1.0d0 - t)
t_2 = b * (t - 2.0d0)
if (b <= (-2.5d+193)) then
tmp = y * b
else if (b <= (-3.9d+39)) then
tmp = t_2
else if (b <= 1.35d-260) then
tmp = t_1
else if (b <= 6.5d-210) then
tmp = x
else if (b <= 2.1d-158) then
tmp = t_1
else if (b <= 2.45d-67) then
tmp = z * -y
else if (b <= 6.5d+113) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = b * (t - 2.0);
double tmp;
if (b <= -2.5e+193) {
tmp = y * b;
} else if (b <= -3.9e+39) {
tmp = t_2;
} else if (b <= 1.35e-260) {
tmp = t_1;
} else if (b <= 6.5e-210) {
tmp = x;
} else if (b <= 2.1e-158) {
tmp = t_1;
} else if (b <= 2.45e-67) {
tmp = z * -y;
} else if (b <= 6.5e+113) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = b * (t - 2.0) tmp = 0 if b <= -2.5e+193: tmp = y * b elif b <= -3.9e+39: tmp = t_2 elif b <= 1.35e-260: tmp = t_1 elif b <= 6.5e-210: tmp = x elif b <= 2.1e-158: tmp = t_1 elif b <= 2.45e-67: tmp = z * -y elif b <= 6.5e+113: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(b * Float64(t - 2.0)) tmp = 0.0 if (b <= -2.5e+193) tmp = Float64(y * b); elseif (b <= -3.9e+39) tmp = t_2; elseif (b <= 1.35e-260) tmp = t_1; elseif (b <= 6.5e-210) tmp = x; elseif (b <= 2.1e-158) tmp = t_1; elseif (b <= 2.45e-67) tmp = Float64(z * Float64(-y)); elseif (b <= 6.5e+113) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = b * (t - 2.0); tmp = 0.0; if (b <= -2.5e+193) tmp = y * b; elseif (b <= -3.9e+39) tmp = t_2; elseif (b <= 1.35e-260) tmp = t_1; elseif (b <= 6.5e-210) tmp = x; elseif (b <= 2.1e-158) tmp = t_1; elseif (b <= 2.45e-67) tmp = z * -y; elseif (b <= 6.5e+113) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.5e+193], N[(y * b), $MachinePrecision], If[LessEqual[b, -3.9e+39], t$95$2, If[LessEqual[b, 1.35e-260], t$95$1, If[LessEqual[b, 6.5e-210], x, If[LessEqual[b, 2.1e-158], t$95$1, If[LessEqual[b, 2.45e-67], N[(z * (-y)), $MachinePrecision], If[LessEqual[b, 6.5e+113], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(t - 2\right)\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{+193}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;b \leq -3.9 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{-210}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.45 \cdot 10^{-67}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -2.49999999999999986e193Initial program 85.7%
Taylor expanded in y around inf 68.3%
Taylor expanded in b around inf 74.5%
if -2.49999999999999986e193 < b < -3.9000000000000001e39 or 6.5000000000000001e113 < b Initial program 93.9%
Taylor expanded in b around inf 69.2%
Taylor expanded in y around 0 45.9%
if -3.9000000000000001e39 < b < 1.35000000000000003e-260 or 6.49999999999999961e-210 < b < 2.09999999999999991e-158 or 2.44999999999999997e-67 < b < 6.5000000000000001e113Initial program 97.7%
Taylor expanded in a around inf 42.2%
if 1.35000000000000003e-260 < b < 6.49999999999999961e-210Initial program 100.0%
Taylor expanded in x around inf 41.0%
if 2.09999999999999991e-158 < b < 2.44999999999999997e-67Initial program 99.9%
Taylor expanded in b around 0 98.1%
Taylor expanded in y around inf 51.7%
associate-*r*51.7%
mul-1-neg51.7%
Simplified51.7%
Final simplification47.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= b -1e+64)
(not (or (<= b 1.85e-42) (and (not (<= b 2.5e-18)) (<= b 7.8e+95)))))
(+ (+ x (* (- (+ y t) 2.0) b)) (* a (- 1.0 t)))
(+ x (- (* z (- 1.0 y)) (* (+ t -1.0) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1e+64) || !((b <= 1.85e-42) || (!(b <= 2.5e-18) && (b <= 7.8e+95)))) {
tmp = (x + (((y + t) - 2.0) * b)) + (a * (1.0 - t));
} else {
tmp = x + ((z * (1.0 - y)) - ((t + -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 <= (-1d+64)) .or. (.not. (b <= 1.85d-42) .or. (.not. (b <= 2.5d-18)) .and. (b <= 7.8d+95))) then
tmp = (x + (((y + t) - 2.0d0) * b)) + (a * (1.0d0 - t))
else
tmp = x + ((z * (1.0d0 - y)) - ((t + (-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 <= -1e+64) || !((b <= 1.85e-42) || (!(b <= 2.5e-18) && (b <= 7.8e+95)))) {
tmp = (x + (((y + t) - 2.0) * b)) + (a * (1.0 - t));
} else {
tmp = x + ((z * (1.0 - y)) - ((t + -1.0) * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1e+64) or not ((b <= 1.85e-42) or (not (b <= 2.5e-18) and (b <= 7.8e+95))): tmp = (x + (((y + t) - 2.0) * b)) + (a * (1.0 - t)) else: tmp = x + ((z * (1.0 - y)) - ((t + -1.0) * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1e+64) || !((b <= 1.85e-42) || (!(b <= 2.5e-18) && (b <= 7.8e+95)))) tmp = Float64(Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) + Float64(a * Float64(1.0 - t))); else tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) - Float64(Float64(t + -1.0) * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1e+64) || ~(((b <= 1.85e-42) || (~((b <= 2.5e-18)) && (b <= 7.8e+95))))) tmp = (x + (((y + t) - 2.0) * b)) + (a * (1.0 - t)); else tmp = x + ((z * (1.0 - y)) - ((t + -1.0) * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1e+64], N[Not[Or[LessEqual[b, 1.85e-42], And[N[Not[LessEqual[b, 2.5e-18]], $MachinePrecision], LessEqual[b, 7.8e+95]]]], $MachinePrecision]], N[(N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] - N[(N[(t + -1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+64} \lor \neg \left(b \leq 1.85 \cdot 10^{-42} \lor \neg \left(b \leq 2.5 \cdot 10^{-18}\right) \land b \leq 7.8 \cdot 10^{+95}\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) - \left(t + -1\right) \cdot a\right)\\
\end{array}
\end{array}
if b < -1.00000000000000002e64 or 1.8500000000000001e-42 < b < 2.50000000000000018e-18 or 7.7999999999999994e95 < b Initial program 90.9%
Taylor expanded in z around 0 93.7%
if -1.00000000000000002e64 < b < 1.8500000000000001e-42 or 2.50000000000000018e-18 < b < 7.7999999999999994e95Initial program 98.7%
Taylor expanded in b around 0 93.8%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- y 2.0))) (t_2 (* a (- 1.0 t))))
(if (<= b -2.75e+193)
t_1
(if (<= b -2.7e+70)
(* b (- t 2.0))
(if (<= b -2.1e+37)
(* y b)
(if (<= b 1.05e-158)
t_2
(if (<= b 1e-67) (* z (- y)) (if (<= b 1.2e+64) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y - 2.0);
double t_2 = a * (1.0 - t);
double tmp;
if (b <= -2.75e+193) {
tmp = t_1;
} else if (b <= -2.7e+70) {
tmp = b * (t - 2.0);
} else if (b <= -2.1e+37) {
tmp = y * b;
} else if (b <= 1.05e-158) {
tmp = t_2;
} else if (b <= 1e-67) {
tmp = z * -y;
} else if (b <= 1.2e+64) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * (y - 2.0d0)
t_2 = a * (1.0d0 - t)
if (b <= (-2.75d+193)) then
tmp = t_1
else if (b <= (-2.7d+70)) then
tmp = b * (t - 2.0d0)
else if (b <= (-2.1d+37)) then
tmp = y * b
else if (b <= 1.05d-158) then
tmp = t_2
else if (b <= 1d-67) then
tmp = z * -y
else if (b <= 1.2d+64) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y - 2.0);
double t_2 = a * (1.0 - t);
double tmp;
if (b <= -2.75e+193) {
tmp = t_1;
} else if (b <= -2.7e+70) {
tmp = b * (t - 2.0);
} else if (b <= -2.1e+37) {
tmp = y * b;
} else if (b <= 1.05e-158) {
tmp = t_2;
} else if (b <= 1e-67) {
tmp = z * -y;
} else if (b <= 1.2e+64) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (y - 2.0) t_2 = a * (1.0 - t) tmp = 0 if b <= -2.75e+193: tmp = t_1 elif b <= -2.7e+70: tmp = b * (t - 2.0) elif b <= -2.1e+37: tmp = y * b elif b <= 1.05e-158: tmp = t_2 elif b <= 1e-67: tmp = z * -y elif b <= 1.2e+64: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y - 2.0)) t_2 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (b <= -2.75e+193) tmp = t_1; elseif (b <= -2.7e+70) tmp = Float64(b * Float64(t - 2.0)); elseif (b <= -2.1e+37) tmp = Float64(y * b); elseif (b <= 1.05e-158) tmp = t_2; elseif (b <= 1e-67) tmp = Float64(z * Float64(-y)); elseif (b <= 1.2e+64) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (y - 2.0); t_2 = a * (1.0 - t); tmp = 0.0; if (b <= -2.75e+193) tmp = t_1; elseif (b <= -2.7e+70) tmp = b * (t - 2.0); elseif (b <= -2.1e+37) tmp = y * b; elseif (b <= 1.05e-158) tmp = t_2; elseif (b <= 1e-67) tmp = z * -y; elseif (b <= 1.2e+64) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.75e+193], t$95$1, If[LessEqual[b, -2.7e+70], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.1e+37], N[(y * b), $MachinePrecision], If[LessEqual[b, 1.05e-158], t$95$2, If[LessEqual[b, 1e-67], N[(z * (-y)), $MachinePrecision], If[LessEqual[b, 1.2e+64], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y - 2\right)\\
t_2 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -2.75 \cdot 10^{+193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.7 \cdot 10^{+70}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;b \leq -2.1 \cdot 10^{+37}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{-158}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 10^{-67}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.7500000000000001e193 or 1.2e64 < b Initial program 92.9%
Taylor expanded in t around inf 81.4%
mul-1-neg81.4%
distribute-rgt-neg-in81.4%
Simplified81.4%
Taylor expanded in t around 0 66.7%
if -2.7500000000000001e193 < b < -2.7e70Initial program 88.0%
Taylor expanded in b around inf 61.1%
Taylor expanded in y around 0 53.2%
if -2.7e70 < b < -2.1000000000000001e37Initial program 100.0%
Taylor expanded in y around inf 100.0%
Taylor expanded in b around inf 44.9%
if -2.1000000000000001e37 < b < 1.04999999999999996e-158 or 9.99999999999999943e-68 < b < 1.2e64Initial program 97.8%
Taylor expanded in a around inf 40.8%
if 1.04999999999999996e-158 < b < 9.99999999999999943e-68Initial program 99.9%
Taylor expanded in b around 0 98.1%
Taylor expanded in y around inf 51.7%
associate-*r*51.7%
mul-1-neg51.7%
Simplified51.7%
Final simplification50.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- y))))
(if (<= y -6.8e+209)
t_1
(if (<= y -5.8e+83)
(* y b)
(if (<= y 1.8e-117)
(* t (- a))
(if (<= y 4.3e+18)
x
(if (or (<= y 1.7e+125) (not (<= y 2.35e+222))) t_1 (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * -y;
double tmp;
if (y <= -6.8e+209) {
tmp = t_1;
} else if (y <= -5.8e+83) {
tmp = y * b;
} else if (y <= 1.8e-117) {
tmp = t * -a;
} else if (y <= 4.3e+18) {
tmp = x;
} else if ((y <= 1.7e+125) || !(y <= 2.35e+222)) {
tmp = t_1;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * -y
if (y <= (-6.8d+209)) then
tmp = t_1
else if (y <= (-5.8d+83)) then
tmp = y * b
else if (y <= 1.8d-117) then
tmp = t * -a
else if (y <= 4.3d+18) then
tmp = x
else if ((y <= 1.7d+125) .or. (.not. (y <= 2.35d+222))) then
tmp = t_1
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * -y;
double tmp;
if (y <= -6.8e+209) {
tmp = t_1;
} else if (y <= -5.8e+83) {
tmp = y * b;
} else if (y <= 1.8e-117) {
tmp = t * -a;
} else if (y <= 4.3e+18) {
tmp = x;
} else if ((y <= 1.7e+125) || !(y <= 2.35e+222)) {
tmp = t_1;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * -y tmp = 0 if y <= -6.8e+209: tmp = t_1 elif y <= -5.8e+83: tmp = y * b elif y <= 1.8e-117: tmp = t * -a elif y <= 4.3e+18: tmp = x elif (y <= 1.7e+125) or not (y <= 2.35e+222): tmp = t_1 else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(-y)) tmp = 0.0 if (y <= -6.8e+209) tmp = t_1; elseif (y <= -5.8e+83) tmp = Float64(y * b); elseif (y <= 1.8e-117) tmp = Float64(t * Float64(-a)); elseif (y <= 4.3e+18) tmp = x; elseif ((y <= 1.7e+125) || !(y <= 2.35e+222)) tmp = t_1; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * -y; tmp = 0.0; if (y <= -6.8e+209) tmp = t_1; elseif (y <= -5.8e+83) tmp = y * b; elseif (y <= 1.8e-117) tmp = t * -a; elseif (y <= 4.3e+18) tmp = x; elseif ((y <= 1.7e+125) || ~((y <= 2.35e+222))) tmp = t_1; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -6.8e+209], t$95$1, If[LessEqual[y, -5.8e+83], N[(y * b), $MachinePrecision], If[LessEqual[y, 1.8e-117], N[(t * (-a)), $MachinePrecision], If[LessEqual[y, 4.3e+18], x, If[Or[LessEqual[y, 1.7e+125], N[Not[LessEqual[y, 2.35e+222]], $MachinePrecision]], t$95$1, N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -6.8 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{+83}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-117}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+18}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+125} \lor \neg \left(y \leq 2.35 \cdot 10^{+222}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -6.7999999999999993e209 or 4.3e18 < y < 1.6999999999999999e125 or 2.3499999999999999e222 < y Initial program 94.2%
Taylor expanded in b around 0 78.0%
Taylor expanded in y around inf 51.1%
associate-*r*51.1%
mul-1-neg51.1%
Simplified51.1%
if -6.7999999999999993e209 < y < -5.79999999999999999e83 or 1.6999999999999999e125 < y < 2.3499999999999999e222Initial program 91.3%
Taylor expanded in y around inf 89.2%
Taylor expanded in b around inf 60.3%
if -5.79999999999999999e83 < y < 1.8e-117Initial program 97.4%
Taylor expanded in y around inf 76.3%
Taylor expanded in t around inf 25.1%
associate-*r*25.1%
mul-1-neg25.1%
Simplified25.1%
if 1.8e-117 < y < 4.3e18Initial program 100.0%
Taylor expanded in x around inf 38.5%
Final simplification39.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x z) (* a (- 1.0 t))))
(t_2 (* (- (+ y t) 2.0) b))
(t_3 (+ x (+ a (* z (- 1.0 y))))))
(if (<= b -7.2e+61)
t_2
(if (<= b 1.15e-260)
t_1
(if (<= b 1.7e-67)
t_3
(if (<= b 2e+61) t_1 (if (<= b 1.12e+133) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + z) + (a * (1.0 - t));
double t_2 = ((y + t) - 2.0) * b;
double t_3 = x + (a + (z * (1.0 - y)));
double tmp;
if (b <= -7.2e+61) {
tmp = t_2;
} else if (b <= 1.15e-260) {
tmp = t_1;
} else if (b <= 1.7e-67) {
tmp = t_3;
} else if (b <= 2e+61) {
tmp = t_1;
} else if (b <= 1.12e+133) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x + z) + (a * (1.0d0 - t))
t_2 = ((y + t) - 2.0d0) * b
t_3 = x + (a + (z * (1.0d0 - y)))
if (b <= (-7.2d+61)) then
tmp = t_2
else if (b <= 1.15d-260) then
tmp = t_1
else if (b <= 1.7d-67) then
tmp = t_3
else if (b <= 2d+61) then
tmp = t_1
else if (b <= 1.12d+133) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + z) + (a * (1.0 - t));
double t_2 = ((y + t) - 2.0) * b;
double t_3 = x + (a + (z * (1.0 - y)));
double tmp;
if (b <= -7.2e+61) {
tmp = t_2;
} else if (b <= 1.15e-260) {
tmp = t_1;
} else if (b <= 1.7e-67) {
tmp = t_3;
} else if (b <= 2e+61) {
tmp = t_1;
} else if (b <= 1.12e+133) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + z) + (a * (1.0 - t)) t_2 = ((y + t) - 2.0) * b t_3 = x + (a + (z * (1.0 - y))) tmp = 0 if b <= -7.2e+61: tmp = t_2 elif b <= 1.15e-260: tmp = t_1 elif b <= 1.7e-67: tmp = t_3 elif b <= 2e+61: tmp = t_1 elif b <= 1.12e+133: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + z) + Float64(a * Float64(1.0 - t))) t_2 = Float64(Float64(Float64(y + t) - 2.0) * b) t_3 = Float64(x + Float64(a + Float64(z * Float64(1.0 - y)))) tmp = 0.0 if (b <= -7.2e+61) tmp = t_2; elseif (b <= 1.15e-260) tmp = t_1; elseif (b <= 1.7e-67) tmp = t_3; elseif (b <= 2e+61) tmp = t_1; elseif (b <= 1.12e+133) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + z) + (a * (1.0 - t)); t_2 = ((y + t) - 2.0) * b; t_3 = x + (a + (z * (1.0 - y))); tmp = 0.0; if (b <= -7.2e+61) tmp = t_2; elseif (b <= 1.15e-260) tmp = t_1; elseif (b <= 1.7e-67) tmp = t_3; elseif (b <= 2e+61) tmp = t_1; elseif (b <= 1.12e+133) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + z), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.2e+61], t$95$2, If[LessEqual[b, 1.15e-260], t$95$1, If[LessEqual[b, 1.7e-67], t$95$3, If[LessEqual[b, 2e+61], t$95$1, If[LessEqual[b, 1.12e+133], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + z\right) + a \cdot \left(1 - t\right)\\
t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\
t_3 := x + \left(a + z \cdot \left(1 - y\right)\right)\\
\mathbf{if}\;b \leq -7.2 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-67}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{+133}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -7.20000000000000021e61 or 1.12e133 < b Initial program 90.8%
Taylor expanded in b around inf 81.8%
if -7.20000000000000021e61 < b < 1.15e-260 or 1.70000000000000005e-67 < b < 1.9999999999999999e61Initial program 98.2%
Taylor expanded in y around inf 95.0%
Taylor expanded in y around 0 73.8%
associate--r+73.8%
*-commutative73.8%
cancel-sign-sub-inv73.8%
cancel-sign-sub-inv73.8%
metadata-eval73.8%
*-lft-identity73.8%
+-commutative73.8%
sub-neg73.8%
metadata-eval73.8%
+-commutative73.8%
distribute-neg-in73.8%
metadata-eval73.8%
sub-neg73.8%
*-commutative73.8%
Simplified73.8%
if 1.15e-260 < b < 1.70000000000000005e-67 or 1.9999999999999999e61 < b < 1.12e133Initial program 98.1%
Taylor expanded in b around 0 95.2%
Taylor expanded in t around 0 84.7%
+-commutative84.7%
sub-neg84.7%
metadata-eval84.7%
neg-mul-184.7%
unsub-neg84.7%
Simplified84.7%
Final simplification78.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x z) (* a (- 1.0 t))))
(t_2 (* (- (+ y t) 2.0) b))
(t_3 (+ x (* z (- 1.0 y)))))
(if (<= b -5.4e+61)
t_2
(if (<= b 4e-158)
t_1
(if (<= b 1e-67)
t_3
(if (<= b 3.7e+61) t_1 (if (<= b 3.15e+133) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + z) + (a * (1.0 - t));
double t_2 = ((y + t) - 2.0) * b;
double t_3 = x + (z * (1.0 - y));
double tmp;
if (b <= -5.4e+61) {
tmp = t_2;
} else if (b <= 4e-158) {
tmp = t_1;
} else if (b <= 1e-67) {
tmp = t_3;
} else if (b <= 3.7e+61) {
tmp = t_1;
} else if (b <= 3.15e+133) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x + z) + (a * (1.0d0 - t))
t_2 = ((y + t) - 2.0d0) * b
t_3 = x + (z * (1.0d0 - y))
if (b <= (-5.4d+61)) then
tmp = t_2
else if (b <= 4d-158) then
tmp = t_1
else if (b <= 1d-67) then
tmp = t_3
else if (b <= 3.7d+61) then
tmp = t_1
else if (b <= 3.15d+133) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + z) + (a * (1.0 - t));
double t_2 = ((y + t) - 2.0) * b;
double t_3 = x + (z * (1.0 - y));
double tmp;
if (b <= -5.4e+61) {
tmp = t_2;
} else if (b <= 4e-158) {
tmp = t_1;
} else if (b <= 1e-67) {
tmp = t_3;
} else if (b <= 3.7e+61) {
tmp = t_1;
} else if (b <= 3.15e+133) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + z) + (a * (1.0 - t)) t_2 = ((y + t) - 2.0) * b t_3 = x + (z * (1.0 - y)) tmp = 0 if b <= -5.4e+61: tmp = t_2 elif b <= 4e-158: tmp = t_1 elif b <= 1e-67: tmp = t_3 elif b <= 3.7e+61: tmp = t_1 elif b <= 3.15e+133: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + z) + Float64(a * Float64(1.0 - t))) t_2 = Float64(Float64(Float64(y + t) - 2.0) * b) t_3 = Float64(x + Float64(z * Float64(1.0 - y))) tmp = 0.0 if (b <= -5.4e+61) tmp = t_2; elseif (b <= 4e-158) tmp = t_1; elseif (b <= 1e-67) tmp = t_3; elseif (b <= 3.7e+61) tmp = t_1; elseif (b <= 3.15e+133) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + z) + (a * (1.0 - t)); t_2 = ((y + t) - 2.0) * b; t_3 = x + (z * (1.0 - y)); tmp = 0.0; if (b <= -5.4e+61) tmp = t_2; elseif (b <= 4e-158) tmp = t_1; elseif (b <= 1e-67) tmp = t_3; elseif (b <= 3.7e+61) tmp = t_1; elseif (b <= 3.15e+133) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + z), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.4e+61], t$95$2, If[LessEqual[b, 4e-158], t$95$1, If[LessEqual[b, 1e-67], t$95$3, If[LessEqual[b, 3.7e+61], t$95$1, If[LessEqual[b, 3.15e+133], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + z\right) + a \cdot \left(1 - t\right)\\
t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\
t_3 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -5.4 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 4 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 10^{-67}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.15 \cdot 10^{+133}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -5.4000000000000004e61 or 3.15000000000000025e133 < b Initial program 90.8%
Taylor expanded in b around inf 81.8%
if -5.4000000000000004e61 < b < 4.00000000000000026e-158 or 9.99999999999999943e-68 < b < 3.70000000000000003e61Initial program 98.6%
Taylor expanded in y around inf 95.3%
Taylor expanded in y around 0 73.8%
associate--r+73.8%
*-commutative73.8%
cancel-sign-sub-inv73.8%
cancel-sign-sub-inv73.8%
metadata-eval73.8%
*-lft-identity73.8%
+-commutative73.8%
sub-neg73.8%
metadata-eval73.8%
+-commutative73.8%
distribute-neg-in73.8%
metadata-eval73.8%
sub-neg73.8%
*-commutative73.8%
Simplified73.8%
if 4.00000000000000026e-158 < b < 9.99999999999999943e-68 or 3.70000000000000003e61 < b < 3.15000000000000025e133Initial program 96.5%
Taylor expanded in b around 0 94.1%
Taylor expanded in a around 0 87.9%
Final simplification78.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (- 1.0 y)))) (t_2 (* t (- b a))))
(if (<= t -3e+216)
t_2
(if (<= t -1.75e+92)
(- x (* t a))
(if (<= t -7.2e-22)
t_1
(if (<= t 5.2e-71)
(+ a (+ x (* b (+ y -2.0))))
(if (<= t 2.8e+117) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (1.0 - y));
double t_2 = t * (b - a);
double tmp;
if (t <= -3e+216) {
tmp = t_2;
} else if (t <= -1.75e+92) {
tmp = x - (t * a);
} else if (t <= -7.2e-22) {
tmp = t_1;
} else if (t <= 5.2e-71) {
tmp = a + (x + (b * (y + -2.0)));
} else if (t <= 2.8e+117) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (z * (1.0d0 - y))
t_2 = t * (b - a)
if (t <= (-3d+216)) then
tmp = t_2
else if (t <= (-1.75d+92)) then
tmp = x - (t * a)
else if (t <= (-7.2d-22)) then
tmp = t_1
else if (t <= 5.2d-71) then
tmp = a + (x + (b * (y + (-2.0d0))))
else if (t <= 2.8d+117) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (1.0 - y));
double t_2 = t * (b - a);
double tmp;
if (t <= -3e+216) {
tmp = t_2;
} else if (t <= -1.75e+92) {
tmp = x - (t * a);
} else if (t <= -7.2e-22) {
tmp = t_1;
} else if (t <= 5.2e-71) {
tmp = a + (x + (b * (y + -2.0)));
} else if (t <= 2.8e+117) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (1.0 - y)) t_2 = t * (b - a) tmp = 0 if t <= -3e+216: tmp = t_2 elif t <= -1.75e+92: tmp = x - (t * a) elif t <= -7.2e-22: tmp = t_1 elif t <= 5.2e-71: tmp = a + (x + (b * (y + -2.0))) elif t <= 2.8e+117: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(1.0 - y))) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -3e+216) tmp = t_2; elseif (t <= -1.75e+92) tmp = Float64(x - Float64(t * a)); elseif (t <= -7.2e-22) tmp = t_1; elseif (t <= 5.2e-71) tmp = Float64(a + Float64(x + Float64(b * Float64(y + -2.0)))); elseif (t <= 2.8e+117) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (1.0 - y)); t_2 = t * (b - a); tmp = 0.0; if (t <= -3e+216) tmp = t_2; elseif (t <= -1.75e+92) tmp = x - (t * a); elseif (t <= -7.2e-22) tmp = t_1; elseif (t <= 5.2e-71) tmp = a + (x + (b * (y + -2.0))); elseif (t <= 2.8e+117) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+216], t$95$2, If[LessEqual[t, -1.75e+92], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.2e-22], t$95$1, If[LessEqual[t, 5.2e-71], N[(a + N[(x + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+117], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(1 - y\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -3 \cdot 10^{+216}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{+92}:\\
\;\;\;\;x - t \cdot a\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-71}:\\
\;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.9999999999999998e216 or 2.79999999999999997e117 < t Initial program 89.6%
Taylor expanded in t around inf 82.1%
if -2.9999999999999998e216 < t < -1.74999999999999993e92Initial program 96.8%
Taylor expanded in b around 0 92.7%
Taylor expanded in z around inf 81.9%
Taylor expanded in t around inf 75.1%
if -1.74999999999999993e92 < t < -7.1999999999999996e-22 or 5.1999999999999997e-71 < t < 2.79999999999999997e117Initial program 95.3%
Taylor expanded in b around 0 83.3%
Taylor expanded in a around 0 68.5%
if -7.1999999999999996e-22 < t < 5.1999999999999997e-71Initial program 98.2%
Taylor expanded in z around 0 73.6%
Taylor expanded in t around 0 73.6%
sub-neg73.6%
sub-neg73.6%
metadata-eval73.6%
neg-mul-173.6%
remove-double-neg73.6%
Simplified73.6%
Final simplification74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a (- 1.0 t))))
(t_2 (* (- (+ y t) 2.0) b))
(t_3 (+ x (* z (- 1.0 y)))))
(if (<= b -8.6e+60)
t_2
(if (<= b -6.8e-164)
t_1
(if (<= b -1.65e-255)
t_3
(if (<= b 1.35e-260) t_1 (if (<= b 1.12e+133) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * (1.0 - t));
double t_2 = ((y + t) - 2.0) * b;
double t_3 = x + (z * (1.0 - y));
double tmp;
if (b <= -8.6e+60) {
tmp = t_2;
} else if (b <= -6.8e-164) {
tmp = t_1;
} else if (b <= -1.65e-255) {
tmp = t_3;
} else if (b <= 1.35e-260) {
tmp = t_1;
} else if (b <= 1.12e+133) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x + (a * (1.0d0 - t))
t_2 = ((y + t) - 2.0d0) * b
t_3 = x + (z * (1.0d0 - y))
if (b <= (-8.6d+60)) then
tmp = t_2
else if (b <= (-6.8d-164)) then
tmp = t_1
else if (b <= (-1.65d-255)) then
tmp = t_3
else if (b <= 1.35d-260) then
tmp = t_1
else if (b <= 1.12d+133) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * (1.0 - t));
double t_2 = ((y + t) - 2.0) * b;
double t_3 = x + (z * (1.0 - y));
double tmp;
if (b <= -8.6e+60) {
tmp = t_2;
} else if (b <= -6.8e-164) {
tmp = t_1;
} else if (b <= -1.65e-255) {
tmp = t_3;
} else if (b <= 1.35e-260) {
tmp = t_1;
} else if (b <= 1.12e+133) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * (1.0 - t)) t_2 = ((y + t) - 2.0) * b t_3 = x + (z * (1.0 - y)) tmp = 0 if b <= -8.6e+60: tmp = t_2 elif b <= -6.8e-164: tmp = t_1 elif b <= -1.65e-255: tmp = t_3 elif b <= 1.35e-260: tmp = t_1 elif b <= 1.12e+133: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * Float64(1.0 - t))) t_2 = Float64(Float64(Float64(y + t) - 2.0) * b) t_3 = Float64(x + Float64(z * Float64(1.0 - y))) tmp = 0.0 if (b <= -8.6e+60) tmp = t_2; elseif (b <= -6.8e-164) tmp = t_1; elseif (b <= -1.65e-255) tmp = t_3; elseif (b <= 1.35e-260) tmp = t_1; elseif (b <= 1.12e+133) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * (1.0 - t)); t_2 = ((y + t) - 2.0) * b; t_3 = x + (z * (1.0 - y)); tmp = 0.0; if (b <= -8.6e+60) tmp = t_2; elseif (b <= -6.8e-164) tmp = t_1; elseif (b <= -1.65e-255) tmp = t_3; elseif (b <= 1.35e-260) tmp = t_1; elseif (b <= 1.12e+133) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.6e+60], t$95$2, If[LessEqual[b, -6.8e-164], t$95$1, If[LessEqual[b, -1.65e-255], t$95$3, If[LessEqual[b, 1.35e-260], t$95$1, If[LessEqual[b, 1.12e+133], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \left(1 - t\right)\\
t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\
t_3 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -8.6 \cdot 10^{+60}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -6.8 \cdot 10^{-164}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.65 \cdot 10^{-255}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{+133}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -8.59999999999999942e60 or 1.12e133 < b Initial program 90.8%
Taylor expanded in b around inf 81.8%
if -8.59999999999999942e60 < b < -6.8e-164 or -1.64999999999999994e-255 < b < 1.35000000000000003e-260Initial program 100.0%
Taylor expanded in z around 0 76.1%
Taylor expanded in b around 0 67.3%
if -6.8e-164 < b < -1.64999999999999994e-255 or 1.35000000000000003e-260 < b < 1.12e133Initial program 97.2%
Taylor expanded in b around 0 91.5%
Taylor expanded in a around 0 67.4%
Final simplification72.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- (+ y t) 2.0) b)) (t_2 (- x (* y z))))
(if (<= b -1.1e+61)
t_1
(if (<= b 1.15e-260)
(- x (* t a))
(if (<= b 1.4e-27)
t_2
(if (<= b 1.95e+62)
(* a (- 1.0 t))
(if (<= b 1.05e+133) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y + t) - 2.0) * b;
double t_2 = x - (y * z);
double tmp;
if (b <= -1.1e+61) {
tmp = t_1;
} else if (b <= 1.15e-260) {
tmp = x - (t * a);
} else if (b <= 1.4e-27) {
tmp = t_2;
} else if (b <= 1.95e+62) {
tmp = a * (1.0 - t);
} else if (b <= 1.05e+133) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((y + t) - 2.0d0) * b
t_2 = x - (y * z)
if (b <= (-1.1d+61)) then
tmp = t_1
else if (b <= 1.15d-260) then
tmp = x - (t * a)
else if (b <= 1.4d-27) then
tmp = t_2
else if (b <= 1.95d+62) then
tmp = a * (1.0d0 - t)
else if (b <= 1.05d+133) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y + t) - 2.0) * b;
double t_2 = x - (y * z);
double tmp;
if (b <= -1.1e+61) {
tmp = t_1;
} else if (b <= 1.15e-260) {
tmp = x - (t * a);
} else if (b <= 1.4e-27) {
tmp = t_2;
} else if (b <= 1.95e+62) {
tmp = a * (1.0 - t);
} else if (b <= 1.05e+133) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y + t) - 2.0) * b t_2 = x - (y * z) tmp = 0 if b <= -1.1e+61: tmp = t_1 elif b <= 1.15e-260: tmp = x - (t * a) elif b <= 1.4e-27: tmp = t_2 elif b <= 1.95e+62: tmp = a * (1.0 - t) elif b <= 1.05e+133: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y + t) - 2.0) * b) t_2 = Float64(x - Float64(y * z)) tmp = 0.0 if (b <= -1.1e+61) tmp = t_1; elseif (b <= 1.15e-260) tmp = Float64(x - Float64(t * a)); elseif (b <= 1.4e-27) tmp = t_2; elseif (b <= 1.95e+62) tmp = Float64(a * Float64(1.0 - t)); elseif (b <= 1.05e+133) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y + t) - 2.0) * b; t_2 = x - (y * z); tmp = 0.0; if (b <= -1.1e+61) tmp = t_1; elseif (b <= 1.15e-260) tmp = x - (t * a); elseif (b <= 1.4e-27) tmp = t_2; elseif (b <= 1.95e+62) tmp = a * (1.0 - t); elseif (b <= 1.05e+133) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.1e+61], t$95$1, If[LessEqual[b, 1.15e-260], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e-27], t$95$2, If[LessEqual[b, 1.95e+62], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.05e+133], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
t_2 := x - y \cdot z\\
\mathbf{if}\;b \leq -1.1 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{-260}:\\
\;\;\;\;x - t \cdot a\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{+62}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{+133}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.1e61 or 1.05e133 < b Initial program 90.8%
Taylor expanded in b around inf 81.8%
if -1.1e61 < b < 1.15e-260Initial program 100.0%
Taylor expanded in b around 0 93.9%
Taylor expanded in z around inf 82.7%
Taylor expanded in t around inf 47.4%
if 1.15e-260 < b < 1.4e-27 or 1.95e62 < b < 1.05e133Initial program 98.3%
Taylor expanded in b around 0 92.7%
Taylor expanded in y around inf 60.5%
if 1.4e-27 < b < 1.95e62Initial program 91.3%
Taylor expanded in a around inf 45.1%
Final simplification62.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (- (* t a) (* z (- 1.0 y))))) (t_2 (* (- (+ y t) 2.0) b)))
(if (<= b -1.5e+70)
t_2
(if (<= b 2.6e-32)
t_1
(if (<= b 4.2e-19)
(+ a (+ x (* b (+ y -2.0))))
(if (<= b 5.3e+133) t_1 (- t_2 (* t a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((t * a) - (z * (1.0 - y)));
double t_2 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -1.5e+70) {
tmp = t_2;
} else if (b <= 2.6e-32) {
tmp = t_1;
} else if (b <= 4.2e-19) {
tmp = a + (x + (b * (y + -2.0)));
} else if (b <= 5.3e+133) {
tmp = t_1;
} else {
tmp = t_2 - (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - ((t * a) - (z * (1.0d0 - y)))
t_2 = ((y + t) - 2.0d0) * b
if (b <= (-1.5d+70)) then
tmp = t_2
else if (b <= 2.6d-32) then
tmp = t_1
else if (b <= 4.2d-19) then
tmp = a + (x + (b * (y + (-2.0d0))))
else if (b <= 5.3d+133) then
tmp = t_1
else
tmp = t_2 - (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((t * a) - (z * (1.0 - y)));
double t_2 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -1.5e+70) {
tmp = t_2;
} else if (b <= 2.6e-32) {
tmp = t_1;
} else if (b <= 4.2e-19) {
tmp = a + (x + (b * (y + -2.0)));
} else if (b <= 5.3e+133) {
tmp = t_1;
} else {
tmp = t_2 - (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - ((t * a) - (z * (1.0 - y))) t_2 = ((y + t) - 2.0) * b tmp = 0 if b <= -1.5e+70: tmp = t_2 elif b <= 2.6e-32: tmp = t_1 elif b <= 4.2e-19: tmp = a + (x + (b * (y + -2.0))) elif b <= 5.3e+133: tmp = t_1 else: tmp = t_2 - (t * a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(Float64(t * a) - Float64(z * Float64(1.0 - y)))) t_2 = Float64(Float64(Float64(y + t) - 2.0) * b) tmp = 0.0 if (b <= -1.5e+70) tmp = t_2; elseif (b <= 2.6e-32) tmp = t_1; elseif (b <= 4.2e-19) tmp = Float64(a + Float64(x + Float64(b * Float64(y + -2.0)))); elseif (b <= 5.3e+133) tmp = t_1; else tmp = Float64(t_2 - Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - ((t * a) - (z * (1.0 - y))); t_2 = ((y + t) - 2.0) * b; tmp = 0.0; if (b <= -1.5e+70) tmp = t_2; elseif (b <= 2.6e-32) tmp = t_1; elseif (b <= 4.2e-19) tmp = a + (x + (b * (y + -2.0))); elseif (b <= 5.3e+133) tmp = t_1; else tmp = t_2 - (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(N[(t * a), $MachinePrecision] - N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.5e+70], t$95$2, If[LessEqual[b, 2.6e-32], t$95$1, If[LessEqual[b, 4.2e-19], N[(a + N[(x + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.3e+133], t$95$1, N[(t$95$2 - N[(t * a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \left(t \cdot a - z \cdot \left(1 - y\right)\right)\\
t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{+70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-19}:\\
\;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\
\mathbf{elif}\;b \leq 5.3 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2 - t \cdot a\\
\end{array}
\end{array}
if b < -1.49999999999999988e70Initial program 87.0%
Taylor expanded in b around inf 81.4%
if -1.49999999999999988e70 < b < 2.5999999999999997e-32 or 4.1999999999999998e-19 < b < 5.29999999999999997e133Initial program 98.7%
Taylor expanded in b around 0 93.5%
Taylor expanded in t around inf 82.4%
*-commutative82.4%
Simplified82.4%
if 2.5999999999999997e-32 < b < 4.1999999999999998e-19Initial program 87.5%
Taylor expanded in z around 0 100.0%
Taylor expanded in t around 0 77.6%
sub-neg77.6%
sub-neg77.6%
metadata-eval77.6%
neg-mul-177.6%
remove-double-neg77.6%
Simplified77.6%
if 5.29999999999999997e133 < b Initial program 96.9%
Taylor expanded in t around inf 84.8%
mul-1-neg84.8%
distribute-rgt-neg-in84.8%
Simplified84.8%
Final simplification82.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (- (* t a) (* z (- 1.0 y))))) (t_2 (* (- (+ y t) 2.0) b)))
(if (<= b -5.6e+68)
t_2
(if (<= b 2.6e-32)
t_1
(if (<= b 4.2e-19)
(+ a (+ x (* b (+ y -2.0))))
(if (<= b 7.5e+134) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((t * a) - (z * (1.0 - y)));
double t_2 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -5.6e+68) {
tmp = t_2;
} else if (b <= 2.6e-32) {
tmp = t_1;
} else if (b <= 4.2e-19) {
tmp = a + (x + (b * (y + -2.0)));
} else if (b <= 7.5e+134) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - ((t * a) - (z * (1.0d0 - y)))
t_2 = ((y + t) - 2.0d0) * b
if (b <= (-5.6d+68)) then
tmp = t_2
else if (b <= 2.6d-32) then
tmp = t_1
else if (b <= 4.2d-19) then
tmp = a + (x + (b * (y + (-2.0d0))))
else if (b <= 7.5d+134) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - ((t * a) - (z * (1.0 - y)));
double t_2 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -5.6e+68) {
tmp = t_2;
} else if (b <= 2.6e-32) {
tmp = t_1;
} else if (b <= 4.2e-19) {
tmp = a + (x + (b * (y + -2.0)));
} else if (b <= 7.5e+134) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - ((t * a) - (z * (1.0 - y))) t_2 = ((y + t) - 2.0) * b tmp = 0 if b <= -5.6e+68: tmp = t_2 elif b <= 2.6e-32: tmp = t_1 elif b <= 4.2e-19: tmp = a + (x + (b * (y + -2.0))) elif b <= 7.5e+134: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(Float64(t * a) - Float64(z * Float64(1.0 - y)))) t_2 = Float64(Float64(Float64(y + t) - 2.0) * b) tmp = 0.0 if (b <= -5.6e+68) tmp = t_2; elseif (b <= 2.6e-32) tmp = t_1; elseif (b <= 4.2e-19) tmp = Float64(a + Float64(x + Float64(b * Float64(y + -2.0)))); elseif (b <= 7.5e+134) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - ((t * a) - (z * (1.0 - y))); t_2 = ((y + t) - 2.0) * b; tmp = 0.0; if (b <= -5.6e+68) tmp = t_2; elseif (b <= 2.6e-32) tmp = t_1; elseif (b <= 4.2e-19) tmp = a + (x + (b * (y + -2.0))); elseif (b <= 7.5e+134) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(N[(t * a), $MachinePrecision] - N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -5.6e+68], t$95$2, If[LessEqual[b, 2.6e-32], t$95$1, If[LessEqual[b, 4.2e-19], N[(a + N[(x + N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+134], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \left(t \cdot a - z \cdot \left(1 - y\right)\right)\\
t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -5.6 \cdot 10^{+68}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-19}:\\
\;\;\;\;a + \left(x + b \cdot \left(y + -2\right)\right)\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -5.6e68 or 7.5000000000000001e134 < b Initial program 90.7%
Taylor expanded in b around inf 81.6%
if -5.6e68 < b < 2.5999999999999997e-32 or 4.1999999999999998e-19 < b < 7.5000000000000001e134Initial program 98.7%
Taylor expanded in b around 0 93.5%
Taylor expanded in t around inf 82.4%
*-commutative82.4%
Simplified82.4%
if 2.5999999999999997e-32 < b < 4.1999999999999998e-19Initial program 87.5%
Taylor expanded in z around 0 100.0%
Taylor expanded in t around 0 77.6%
sub-neg77.6%
sub-neg77.6%
metadata-eval77.6%
neg-mul-177.6%
remove-double-neg77.6%
Simplified77.6%
Final simplification82.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (* z (- y))))
(if (<= y -9.2e+209)
t_2
(if (<= y -4e+93)
(* y b)
(if (<= y -3.2e-204)
t_1
(if (<= y -8e-294) z (if (<= y 9.2e+14) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = z * -y;
double tmp;
if (y <= -9.2e+209) {
tmp = t_2;
} else if (y <= -4e+93) {
tmp = y * b;
} else if (y <= -3.2e-204) {
tmp = t_1;
} else if (y <= -8e-294) {
tmp = z;
} else if (y <= 9.2e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (1.0d0 - t)
t_2 = z * -y
if (y <= (-9.2d+209)) then
tmp = t_2
else if (y <= (-4d+93)) then
tmp = y * b
else if (y <= (-3.2d-204)) then
tmp = t_1
else if (y <= (-8d-294)) then
tmp = z
else if (y <= 9.2d+14) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = z * -y;
double tmp;
if (y <= -9.2e+209) {
tmp = t_2;
} else if (y <= -4e+93) {
tmp = y * b;
} else if (y <= -3.2e-204) {
tmp = t_1;
} else if (y <= -8e-294) {
tmp = z;
} else if (y <= 9.2e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = z * -y tmp = 0 if y <= -9.2e+209: tmp = t_2 elif y <= -4e+93: tmp = y * b elif y <= -3.2e-204: tmp = t_1 elif y <= -8e-294: tmp = z elif y <= 9.2e+14: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(z * Float64(-y)) tmp = 0.0 if (y <= -9.2e+209) tmp = t_2; elseif (y <= -4e+93) tmp = Float64(y * b); elseif (y <= -3.2e-204) tmp = t_1; elseif (y <= -8e-294) tmp = z; elseif (y <= 9.2e+14) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = z * -y; tmp = 0.0; if (y <= -9.2e+209) tmp = t_2; elseif (y <= -4e+93) tmp = y * b; elseif (y <= -3.2e-204) tmp = t_1; elseif (y <= -8e-294) tmp = z; elseif (y <= 9.2e+14) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-y)), $MachinePrecision]}, If[LessEqual[y, -9.2e+209], t$95$2, If[LessEqual[y, -4e+93], N[(y * b), $MachinePrecision], If[LessEqual[y, -3.2e-204], t$95$1, If[LessEqual[y, -8e-294], z, If[LessEqual[y, 9.2e+14], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := z \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+209}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+93}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-294}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -9.20000000000000038e209 or 9.2e14 < y Initial program 91.0%
Taylor expanded in b around 0 70.2%
Taylor expanded in y around inf 46.1%
associate-*r*46.1%
mul-1-neg46.1%
Simplified46.1%
if -9.20000000000000038e209 < y < -4.00000000000000017e93Initial program 100.0%
Taylor expanded in y around inf 96.1%
Taylor expanded in b around inf 64.9%
if -4.00000000000000017e93 < y < -3.2e-204 or -8.00000000000000013e-294 < y < 9.2e14Initial program 97.6%
Taylor expanded in a around inf 41.1%
if -3.2e-204 < y < -8.00000000000000013e-294Initial program 100.0%
Taylor expanded in z around inf 40.5%
Taylor expanded in y around 0 40.5%
Final simplification45.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a (- 1.0 t)))) (t_2 (* (- (+ y t) 2.0) b)))
(if (<= b -2e+61)
t_2
(if (<= b 4.8e-158)
t_1
(if (<= b 7.8e-100) (* z (- 1.0 y)) (if (<= b 2.25e+76) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * (1.0 - t));
double t_2 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -2e+61) {
tmp = t_2;
} else if (b <= 4.8e-158) {
tmp = t_1;
} else if (b <= 7.8e-100) {
tmp = z * (1.0 - y);
} else if (b <= 2.25e+76) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (a * (1.0d0 - t))
t_2 = ((y + t) - 2.0d0) * b
if (b <= (-2d+61)) then
tmp = t_2
else if (b <= 4.8d-158) then
tmp = t_1
else if (b <= 7.8d-100) then
tmp = z * (1.0d0 - y)
else if (b <= 2.25d+76) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * (1.0 - t));
double t_2 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -2e+61) {
tmp = t_2;
} else if (b <= 4.8e-158) {
tmp = t_1;
} else if (b <= 7.8e-100) {
tmp = z * (1.0 - y);
} else if (b <= 2.25e+76) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * (1.0 - t)) t_2 = ((y + t) - 2.0) * b tmp = 0 if b <= -2e+61: tmp = t_2 elif b <= 4.8e-158: tmp = t_1 elif b <= 7.8e-100: tmp = z * (1.0 - y) elif b <= 2.25e+76: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * Float64(1.0 - t))) t_2 = Float64(Float64(Float64(y + t) - 2.0) * b) tmp = 0.0 if (b <= -2e+61) tmp = t_2; elseif (b <= 4.8e-158) tmp = t_1; elseif (b <= 7.8e-100) tmp = Float64(z * Float64(1.0 - y)); elseif (b <= 2.25e+76) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * (1.0 - t)); t_2 = ((y + t) - 2.0) * b; tmp = 0.0; if (b <= -2e+61) tmp = t_2; elseif (b <= 4.8e-158) tmp = t_1; elseif (b <= 7.8e-100) tmp = z * (1.0 - y); elseif (b <= 2.25e+76) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2e+61], t$95$2, If[LessEqual[b, 4.8e-158], t$95$1, If[LessEqual[b, 7.8e-100], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.25e+76], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \left(1 - t\right)\\
t_2 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -2 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 7.8 \cdot 10^{-100}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq 2.25 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -1.9999999999999999e61 or 2.2499999999999999e76 < b Initial program 91.6%
Taylor expanded in b around inf 78.1%
if -1.9999999999999999e61 < b < 4.80000000000000015e-158 or 7.79999999999999955e-100 < b < 2.2499999999999999e76Initial program 98.0%
Taylor expanded in z around 0 66.6%
Taylor expanded in b around 0 58.9%
if 4.80000000000000015e-158 < b < 7.79999999999999955e-100Initial program 100.0%
Taylor expanded in z around inf 83.4%
Final simplification67.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (or (<= b -7e+70) (not (<= b 2.35e+98)))
(+ (+ x (* (- (+ y t) 2.0) b)) t_1)
(+ (+ (+ x (* z (- 1.0 y))) t_1) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if ((b <= -7e+70) || !(b <= 2.35e+98)) {
tmp = (x + (((y + t) - 2.0) * b)) + t_1;
} else {
tmp = ((x + (z * (1.0 - y))) + t_1) + (y * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (1.0d0 - t)
if ((b <= (-7d+70)) .or. (.not. (b <= 2.35d+98))) then
tmp = (x + (((y + t) - 2.0d0) * b)) + t_1
else
tmp = ((x + (z * (1.0d0 - y))) + t_1) + (y * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if ((b <= -7e+70) || !(b <= 2.35e+98)) {
tmp = (x + (((y + t) - 2.0) * b)) + t_1;
} else {
tmp = ((x + (z * (1.0 - y))) + t_1) + (y * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if (b <= -7e+70) or not (b <= 2.35e+98): tmp = (x + (((y + t) - 2.0) * b)) + t_1 else: tmp = ((x + (z * (1.0 - y))) + t_1) + (y * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if ((b <= -7e+70) || !(b <= 2.35e+98)) tmp = Float64(Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) + t_1); else tmp = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + t_1) + Float64(y * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if ((b <= -7e+70) || ~((b <= 2.35e+98))) tmp = (x + (((y + t) - 2.0) * b)) + t_1; else tmp = ((x + (z * (1.0 - y))) + t_1) + (y * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -7e+70], N[Not[LessEqual[b, 2.35e+98]], $MachinePrecision]], N[(N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;b \leq -7 \cdot 10^{+70} \lor \neg \left(b \leq 2.35 \cdot 10^{+98}\right):\\
\;\;\;\;\left(x + \left(\left(y + t\right) - 2\right) \cdot b\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + z \cdot \left(1 - y\right)\right) + t\_1\right) + y \cdot b\\
\end{array}
\end{array}
if b < -7.00000000000000005e70 or 2.34999999999999985e98 < b Initial program 91.0%
Taylor expanded in z around 0 93.0%
if -7.00000000000000005e70 < b < 2.34999999999999985e98Initial program 98.2%
Taylor expanded in y around inf 95.4%
Final simplification94.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- (+ y t) 2.0) b)))
(if (<= b -5.8e+69)
t_1
(if (<= b 4.6e+134)
(+ x (- (* z (- 1.0 y)) (* (+ t -1.0) a)))
(- t_1 (* t a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -5.8e+69) {
tmp = t_1;
} else if (b <= 4.6e+134) {
tmp = x + ((z * (1.0 - y)) - ((t + -1.0) * a));
} else {
tmp = t_1 - (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((y + t) - 2.0d0) * b
if (b <= (-5.8d+69)) then
tmp = t_1
else if (b <= 4.6d+134) then
tmp = x + ((z * (1.0d0 - y)) - ((t + (-1.0d0)) * a))
else
tmp = t_1 - (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y + t) - 2.0) * b;
double tmp;
if (b <= -5.8e+69) {
tmp = t_1;
} else if (b <= 4.6e+134) {
tmp = x + ((z * (1.0 - y)) - ((t + -1.0) * a));
} else {
tmp = t_1 - (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y + t) - 2.0) * b tmp = 0 if b <= -5.8e+69: tmp = t_1 elif b <= 4.6e+134: tmp = x + ((z * (1.0 - y)) - ((t + -1.0) * a)) else: tmp = t_1 - (t * a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y + t) - 2.0) * b) tmp = 0.0 if (b <= -5.8e+69) tmp = t_1; elseif (b <= 4.6e+134) tmp = Float64(x + Float64(Float64(z * Float64(1.0 - y)) - Float64(Float64(t + -1.0) * a))); else tmp = Float64(t_1 - Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y + t) - 2.0) * b; tmp = 0.0; if (b <= -5.8e+69) tmp = t_1; elseif (b <= 4.6e+134) tmp = x + ((z * (1.0 - y)) - ((t + -1.0) * a)); else tmp = t_1 - (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -5.8e+69], t$95$1, If[LessEqual[b, 4.6e+134], N[(x + N[(N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision] - N[(N[(t + -1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(t * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -5.8 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{+134}:\\
\;\;\;\;x + \left(z \cdot \left(1 - y\right) - \left(t + -1\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t \cdot a\\
\end{array}
\end{array}
if b < -5.7999999999999997e69Initial program 87.0%
Taylor expanded in b around inf 81.4%
if -5.7999999999999997e69 < b < 4.5999999999999996e134Initial program 98.2%
Taylor expanded in b around 0 91.5%
if 4.5999999999999996e134 < b Initial program 96.9%
Taylor expanded in t around inf 84.8%
mul-1-neg84.8%
distribute-rgt-neg-in84.8%
Simplified84.8%
Final simplification88.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.05e+80) (* y b) (if (<= y 7.8e-118) (* t (- a)) (if (<= y 2e+50) x (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.05e+80) {
tmp = y * b;
} else if (y <= 7.8e-118) {
tmp = t * -a;
} else if (y <= 2e+50) {
tmp = x;
} 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 <= (-2.05d+80)) then
tmp = y * b
else if (y <= 7.8d-118) then
tmp = t * -a
else if (y <= 2d+50) then
tmp = x
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 <= -2.05e+80) {
tmp = y * b;
} else if (y <= 7.8e-118) {
tmp = t * -a;
} else if (y <= 2e+50) {
tmp = x;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.05e+80: tmp = y * b elif y <= 7.8e-118: tmp = t * -a elif y <= 2e+50: tmp = x else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.05e+80) tmp = Float64(y * b); elseif (y <= 7.8e-118) tmp = Float64(t * Float64(-a)); elseif (y <= 2e+50) tmp = x; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.05e+80) tmp = y * b; elseif (y <= 7.8e-118) tmp = t * -a; elseif (y <= 2e+50) tmp = x; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.05e+80], N[(y * b), $MachinePrecision], If[LessEqual[y, 7.8e-118], N[(t * (-a)), $MachinePrecision], If[LessEqual[y, 2e+50], x, N[(y * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{+80}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-118}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+50}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -2.05000000000000001e80 or 2.0000000000000002e50 < y Initial program 92.6%
Taylor expanded in y around inf 90.0%
Taylor expanded in b around inf 42.5%
if -2.05000000000000001e80 < y < 7.80000000000000002e-118Initial program 97.4%
Taylor expanded in y around inf 76.3%
Taylor expanded in t around inf 25.1%
associate-*r*25.1%
mul-1-neg25.1%
Simplified25.1%
if 7.80000000000000002e-118 < y < 2.0000000000000002e50Initial program 100.0%
Taylor expanded in x around inf 37.4%
Final simplification34.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4.6e-18) (* y b) (if (<= y 4.2e-119) z (if (<= y 7.5e+50) x (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.6e-18) {
tmp = y * b;
} else if (y <= 4.2e-119) {
tmp = z;
} else if (y <= 7.5e+50) {
tmp = x;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4.6d-18)) then
tmp = y * b
else if (y <= 4.2d-119) then
tmp = z
else if (y <= 7.5d+50) then
tmp = x
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.6e-18) {
tmp = y * b;
} else if (y <= 4.2e-119) {
tmp = z;
} else if (y <= 7.5e+50) {
tmp = x;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.6e-18: tmp = y * b elif y <= 4.2e-119: tmp = z elif y <= 7.5e+50: tmp = x else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.6e-18) tmp = Float64(y * b); elseif (y <= 4.2e-119) tmp = z; elseif (y <= 7.5e+50) tmp = x; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.6e-18) tmp = y * b; elseif (y <= 4.2e-119) tmp = z; elseif (y <= 7.5e+50) tmp = x; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.6e-18], N[(y * b), $MachinePrecision], If[LessEqual[y, 4.2e-119], z, If[LessEqual[y, 7.5e+50], x, N[(y * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-18}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-119}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+50}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -4.6000000000000002e-18 or 7.4999999999999999e50 < y Initial program 92.7%
Taylor expanded in y around inf 89.7%
Taylor expanded in b around inf 39.8%
if -4.6000000000000002e-18 < y < 4.2e-119Initial program 98.0%
Taylor expanded in z around inf 25.9%
Taylor expanded in y around 0 25.9%
if 4.2e-119 < y < 7.4999999999999999e50Initial program 100.0%
Taylor expanded in x around inf 36.4%
Final simplification34.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.32e+27) (not (<= y 1.75e+15))) (* y (- b z)) (- x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.32e+27) || !(y <= 1.75e+15)) {
tmp = y * (b - z);
} else {
tmp = x - (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 ((y <= (-2.32d+27)) .or. (.not. (y <= 1.75d+15))) then
tmp = y * (b - z)
else
tmp = x - (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 ((y <= -2.32e+27) || !(y <= 1.75e+15)) {
tmp = y * (b - z);
} else {
tmp = x - (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.32e+27) or not (y <= 1.75e+15): tmp = y * (b - z) else: tmp = x - (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.32e+27) || !(y <= 1.75e+15)) tmp = Float64(y * Float64(b - z)); else tmp = Float64(x - Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.32e+27) || ~((y <= 1.75e+15))) tmp = y * (b - z); else tmp = x - (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.32e+27], N[Not[LessEqual[y, 1.75e+15]], $MachinePrecision]], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.32 \cdot 10^{+27} \lor \neg \left(y \leq 1.75 \cdot 10^{+15}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot a\\
\end{array}
\end{array}
if y < -2.32e27 or 1.75e15 < y Initial program 93.7%
Taylor expanded in y around inf 69.6%
if -2.32e27 < y < 1.75e15Initial program 97.7%
Taylor expanded in b around 0 77.4%
Taylor expanded in z around inf 64.5%
Taylor expanded in t around inf 45.0%
Final simplification57.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.15e+96) (not (<= y 3e+17))) (* y (- b z)) (* a (- 1.0 t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e+96) || !(y <= 3e+17)) {
tmp = y * (b - z);
} else {
tmp = a * (1.0 - t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.15d+96)) .or. (.not. (y <= 3d+17))) then
tmp = y * (b - z)
else
tmp = a * (1.0d0 - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e+96) || !(y <= 3e+17)) {
tmp = y * (b - z);
} else {
tmp = a * (1.0 - t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.15e+96) or not (y <= 3e+17): tmp = y * (b - z) else: tmp = a * (1.0 - t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.15e+96) || !(y <= 3e+17)) tmp = Float64(y * Float64(b - z)); else tmp = Float64(a * Float64(1.0 - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.15e+96) || ~((y <= 3e+17))) tmp = y * (b - z); else tmp = a * (1.0 - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.15e+96], N[Not[LessEqual[y, 3e+17]], $MachinePrecision]], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+96} \lor \neg \left(y \leq 3 \cdot 10^{+17}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\end{array}
\end{array}
if y < -1.15000000000000008e96 or 3e17 < y Initial program 93.0%
Taylor expanded in y around inf 72.8%
if -1.15000000000000008e96 < y < 3e17Initial program 97.9%
Taylor expanded in a around inf 37.1%
Final simplification53.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -8.5e+100) z (if (<= z 3.8e+47) x z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.5e+100) {
tmp = z;
} else if (z <= 3.8e+47) {
tmp = x;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-8.5d+100)) then
tmp = z
else if (z <= 3.8d+47) then
tmp = x
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.5e+100) {
tmp = z;
} else if (z <= 3.8e+47) {
tmp = x;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8.5e+100: tmp = z elif z <= 3.8e+47: tmp = x else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.5e+100) tmp = z; elseif (z <= 3.8e+47) tmp = x; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -8.5e+100) tmp = z; elseif (z <= 3.8e+47) tmp = x; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+100], z, If[LessEqual[z, 3.8e+47], x, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+100}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -8.50000000000000043e100 or 3.8000000000000003e47 < z Initial program 93.4%
Taylor expanded in z around inf 60.1%
Taylor expanded in y around 0 25.3%
if -8.50000000000000043e100 < z < 3.8000000000000003e47Initial program 97.3%
Taylor expanded in x around inf 24.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.05e+162) a (if (<= a 2.1e+147) x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.05e+162) {
tmp = a;
} else if (a <= 2.1e+147) {
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.05d+162)) then
tmp = a
else if (a <= 2.1d+147) 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.05e+162) {
tmp = a;
} else if (a <= 2.1e+147) {
tmp = x;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.05e+162: tmp = a elif a <= 2.1e+147: tmp = x else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.05e+162) tmp = a; elseif (a <= 2.1e+147) 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.05e+162) tmp = a; elseif (a <= 2.1e+147) tmp = x; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.05e+162], a, If[LessEqual[a, 2.1e+147], x, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{+162}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+147}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.05e162 or 2.10000000000000006e147 < a Initial program 91.8%
Taylor expanded in a around inf 69.4%
Taylor expanded in t around 0 30.6%
if -1.05e162 < a < 2.10000000000000006e147Initial program 96.9%
Taylor expanded in x around inf 21.1%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 95.7%
Taylor expanded in a around inf 27.9%
Taylor expanded in t around 0 11.3%
herbie shell --seed 2024085
(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)))