
(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 25 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 (* b (- (+ y t) 2.0)))
(t_2 (+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) t_1)))
(if (<= t_2 INFINITY) t_2 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 t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1;
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
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 t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1;
double tmp;
if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((y + t) - 2.0) t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1 tmp = 0 if t_2 <= math.inf: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) t_2 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + t_1) tmp = 0.0 if (t_2 <= Inf) 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 + t) - 2.0); t_2 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + t_1; tmp = 0.0; if (t_2 <= Inf) 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[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_2 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + t\_1\\
\mathbf{if}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\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 b around inf 63.6%
Final simplification98.4%
(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 95.7%
+-commutative95.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 (* y (- b z))) (t_2 (+ x (+ z a))) (t_3 (* t (- b a))))
(if (<= t -2.8e+78)
t_3
(if (<= t -5e+25)
t_1
(if (<= t -1.35e-209)
t_2
(if (<= t 2.2e-82) t_1 (if (<= t 1.2e+45) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = x + (z + a);
double t_3 = t * (b - a);
double tmp;
if (t <= -2.8e+78) {
tmp = t_3;
} else if (t <= -5e+25) {
tmp = t_1;
} else if (t <= -1.35e-209) {
tmp = t_2;
} else if (t <= 2.2e-82) {
tmp = t_1;
} else if (t <= 1.2e+45) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y * (b - z)
t_2 = x + (z + a)
t_3 = t * (b - a)
if (t <= (-2.8d+78)) then
tmp = t_3
else if (t <= (-5d+25)) then
tmp = t_1
else if (t <= (-1.35d-209)) then
tmp = t_2
else if (t <= 2.2d-82) then
tmp = t_1
else if (t <= 1.2d+45) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = x + (z + a);
double t_3 = t * (b - a);
double tmp;
if (t <= -2.8e+78) {
tmp = t_3;
} else if (t <= -5e+25) {
tmp = t_1;
} else if (t <= -1.35e-209) {
tmp = t_2;
} else if (t <= 2.2e-82) {
tmp = t_1;
} else if (t <= 1.2e+45) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = x + (z + a) t_3 = t * (b - a) tmp = 0 if t <= -2.8e+78: tmp = t_3 elif t <= -5e+25: tmp = t_1 elif t <= -1.35e-209: tmp = t_2 elif t <= 2.2e-82: tmp = t_1 elif t <= 1.2e+45: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) t_2 = Float64(x + Float64(z + a)) t_3 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -2.8e+78) tmp = t_3; elseif (t <= -5e+25) tmp = t_1; elseif (t <= -1.35e-209) tmp = t_2; elseif (t <= 2.2e-82) tmp = t_1; elseif (t <= 1.2e+45) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); t_2 = x + (z + a); t_3 = t * (b - a); tmp = 0.0; if (t <= -2.8e+78) tmp = t_3; elseif (t <= -5e+25) tmp = t_1; elseif (t <= -1.35e-209) tmp = t_2; elseif (t <= 2.2e-82) tmp = t_1; elseif (t <= 1.2e+45) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+78], t$95$3, If[LessEqual[t, -5e+25], t$95$1, If[LessEqual[t, -1.35e-209], t$95$2, If[LessEqual[t, 2.2e-82], t$95$1, If[LessEqual[t, 1.2e+45], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := x + \left(z + a\right)\\
t_3 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+78}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -5 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-209}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -2.8000000000000001e78 or 1.19999999999999995e45 < t Initial program 93.4%
Taylor expanded in t around inf 76.6%
if -2.8000000000000001e78 < t < -5.00000000000000024e25 or -1.34999999999999999e-209 < t < 2.19999999999999986e-82Initial program 95.1%
Taylor expanded in y around inf 55.9%
if -5.00000000000000024e25 < t < -1.34999999999999999e-209 or 2.19999999999999986e-82 < t < 1.19999999999999995e45Initial program 100.0%
Taylor expanded in b around 0 73.9%
Taylor expanded in t around 0 70.6%
associate--r+70.6%
sub-neg70.6%
neg-mul-170.6%
remove-double-neg70.6%
sub-neg70.6%
metadata-eval70.6%
Simplified70.6%
Taylor expanded in y around 0 56.3%
sub-neg56.3%
+-commutative56.3%
neg-mul-156.3%
remove-double-neg56.3%
associate-+l+56.3%
Simplified56.3%
Final simplification64.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -9.4e+182)
(* t (- a))
(if (<= t -4e+78)
(* t b)
(if (<= t -1e+59)
(* y b)
(if (<= t 1.25e-301) (+ x z) (if (<= t 6.5e+43) (+ x a) (* t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -9.4e+182) {
tmp = t * -a;
} else if (t <= -4e+78) {
tmp = t * b;
} else if (t <= -1e+59) {
tmp = y * b;
} else if (t <= 1.25e-301) {
tmp = x + z;
} else if (t <= 6.5e+43) {
tmp = x + a;
} else {
tmp = t * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-9.4d+182)) then
tmp = t * -a
else if (t <= (-4d+78)) then
tmp = t * b
else if (t <= (-1d+59)) then
tmp = y * b
else if (t <= 1.25d-301) then
tmp = x + z
else if (t <= 6.5d+43) then
tmp = x + a
else
tmp = t * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -9.4e+182) {
tmp = t * -a;
} else if (t <= -4e+78) {
tmp = t * b;
} else if (t <= -1e+59) {
tmp = y * b;
} else if (t <= 1.25e-301) {
tmp = x + z;
} else if (t <= 6.5e+43) {
tmp = x + a;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -9.4e+182: tmp = t * -a elif t <= -4e+78: tmp = t * b elif t <= -1e+59: tmp = y * b elif t <= 1.25e-301: tmp = x + z elif t <= 6.5e+43: tmp = x + a else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -9.4e+182) tmp = Float64(t * Float64(-a)); elseif (t <= -4e+78) tmp = Float64(t * b); elseif (t <= -1e+59) tmp = Float64(y * b); elseif (t <= 1.25e-301) tmp = Float64(x + z); elseif (t <= 6.5e+43) tmp = Float64(x + a); else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -9.4e+182) tmp = t * -a; elseif (t <= -4e+78) tmp = t * b; elseif (t <= -1e+59) tmp = y * b; elseif (t <= 1.25e-301) tmp = x + z; elseif (t <= 6.5e+43) tmp = x + a; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -9.4e+182], N[(t * (-a)), $MachinePrecision], If[LessEqual[t, -4e+78], N[(t * b), $MachinePrecision], If[LessEqual[t, -1e+59], N[(y * b), $MachinePrecision], If[LessEqual[t, 1.25e-301], N[(x + z), $MachinePrecision], If[LessEqual[t, 6.5e+43], N[(x + a), $MachinePrecision], N[(t * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.4 \cdot 10^{+182}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{elif}\;t \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq -1 \cdot 10^{+59}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-301}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+43}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -9.39999999999999966e182Initial program 96.7%
Taylor expanded in t around inf 80.3%
Taylor expanded in b around 0 61.1%
associate-*r*61.1%
neg-mul-161.1%
Simplified61.1%
if -9.39999999999999966e182 < t < -4.00000000000000003e78 or 6.4999999999999998e43 < t Initial program 92.2%
Taylor expanded in t around inf 75.1%
Taylor expanded in b around inf 51.4%
if -4.00000000000000003e78 < t < -9.99999999999999972e58Initial program 71.4%
Taylor expanded in b around inf 71.6%
Taylor expanded in y around inf 71.6%
if -9.99999999999999972e58 < t < 1.25000000000000003e-301Initial program 100.0%
Taylor expanded in b around 0 69.6%
Taylor expanded in t around 0 65.3%
associate--r+65.3%
sub-neg65.3%
neg-mul-165.3%
remove-double-neg65.3%
sub-neg65.3%
metadata-eval65.3%
Simplified65.3%
Taylor expanded in y around 0 41.7%
sub-neg41.7%
+-commutative41.7%
neg-mul-141.7%
remove-double-neg41.7%
associate-+l+41.7%
Simplified41.7%
Taylor expanded in a around 0 35.0%
+-commutative35.0%
Simplified35.0%
if 1.25000000000000003e-301 < t < 6.4999999999999998e43Initial program 97.1%
Taylor expanded in b around 0 72.1%
Taylor expanded in t around 0 72.1%
associate--r+72.1%
sub-neg72.1%
neg-mul-172.1%
remove-double-neg72.1%
sub-neg72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in y around 0 48.1%
sub-neg48.1%
+-commutative48.1%
neg-mul-148.1%
remove-double-neg48.1%
associate-+l+48.1%
Simplified48.1%
Taylor expanded in z around 0 40.0%
Final simplification45.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (* t (- b a))))
(if (<= t -4e+78)
t_2
(if (<= t -4.5e+24)
t_1
(if (<= t -1.65e-208) (+ x z) (if (<= t 8.5e+43) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (t <= -4e+78) {
tmp = t_2;
} else if (t <= -4.5e+24) {
tmp = t_1;
} else if (t <= -1.65e-208) {
tmp = x + z;
} else if (t <= 8.5e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (b - z)
t_2 = t * (b - a)
if (t <= (-4d+78)) then
tmp = t_2
else if (t <= (-4.5d+24)) then
tmp = t_1
else if (t <= (-1.65d-208)) then
tmp = x + z
else if (t <= 8.5d+43) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = t * (b - a);
double tmp;
if (t <= -4e+78) {
tmp = t_2;
} else if (t <= -4.5e+24) {
tmp = t_1;
} else if (t <= -1.65e-208) {
tmp = x + z;
} else if (t <= 8.5e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = t * (b - a) tmp = 0 if t <= -4e+78: tmp = t_2 elif t <= -4.5e+24: tmp = t_1 elif t <= -1.65e-208: tmp = x + z elif t <= 8.5e+43: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -4e+78) tmp = t_2; elseif (t <= -4.5e+24) tmp = t_1; elseif (t <= -1.65e-208) tmp = Float64(x + z); elseif (t <= 8.5e+43) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); t_2 = t * (b - a); tmp = 0.0; if (t <= -4e+78) tmp = t_2; elseif (t <= -4.5e+24) tmp = t_1; elseif (t <= -1.65e-208) tmp = x + z; elseif (t <= 8.5e+43) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+78], t$95$2, If[LessEqual[t, -4.5e+24], t$95$1, If[LessEqual[t, -1.65e-208], N[(x + z), $MachinePrecision], If[LessEqual[t, 8.5e+43], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -4 \cdot 10^{+78}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-208}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -4.00000000000000003e78 or 8.5e43 < t Initial program 93.4%
Taylor expanded in t around inf 76.6%
if -4.00000000000000003e78 < t < -4.50000000000000019e24 or -1.65000000000000003e-208 < t < 8.5e43Initial program 96.3%
Taylor expanded in y around inf 51.1%
if -4.50000000000000019e24 < t < -1.65000000000000003e-208Initial program 100.0%
Taylor expanded in b around 0 71.6%
Taylor expanded in t around 0 66.2%
associate--r+66.2%
sub-neg66.2%
neg-mul-166.2%
remove-double-neg66.2%
sub-neg66.2%
metadata-eval66.2%
Simplified66.2%
Taylor expanded in y around 0 54.7%
sub-neg54.7%
+-commutative54.7%
neg-mul-154.7%
remove-double-neg54.7%
associate-+l+54.7%
Simplified54.7%
Taylor expanded in a around 0 43.2%
+-commutative43.2%
Simplified43.2%
Final simplification60.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -1.15e+60)
t_1
(if (<= t -1.35e-209)
(+ x z)
(if (<= t 1.46e-301) (* y (- z)) (if (<= t 3.65e+43) (+ x a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -1.15e+60) {
tmp = t_1;
} else if (t <= -1.35e-209) {
tmp = x + z;
} else if (t <= 1.46e-301) {
tmp = y * -z;
} else if (t <= 3.65e+43) {
tmp = x + a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b - a)
if (t <= (-1.15d+60)) then
tmp = t_1
else if (t <= (-1.35d-209)) then
tmp = x + z
else if (t <= 1.46d-301) then
tmp = y * -z
else if (t <= 3.65d+43) then
tmp = x + a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -1.15e+60) {
tmp = t_1;
} else if (t <= -1.35e-209) {
tmp = x + z;
} else if (t <= 1.46e-301) {
tmp = y * -z;
} else if (t <= 3.65e+43) {
tmp = x + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -1.15e+60: tmp = t_1 elif t <= -1.35e-209: tmp = x + z elif t <= 1.46e-301: tmp = y * -z elif t <= 3.65e+43: tmp = x + a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1.15e+60) tmp = t_1; elseif (t <= -1.35e-209) tmp = Float64(x + z); elseif (t <= 1.46e-301) tmp = Float64(y * Float64(-z)); elseif (t <= 3.65e+43) tmp = Float64(x + a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -1.15e+60) tmp = t_1; elseif (t <= -1.35e-209) tmp = x + z; elseif (t <= 1.46e-301) tmp = y * -z; elseif (t <= 3.65e+43) tmp = x + a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+60], t$95$1, If[LessEqual[t, -1.35e-209], N[(x + z), $MachinePrecision], If[LessEqual[t, 1.46e-301], N[(y * (-z)), $MachinePrecision], If[LessEqual[t, 3.65e+43], N[(x + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-209}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 1.46 \cdot 10^{-301}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;t \leq 3.65 \cdot 10^{+43}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.15000000000000008e60 or 3.6499999999999998e43 < t Initial program 92.0%
Taylor expanded in t around inf 73.6%
if -1.15000000000000008e60 < t < -1.34999999999999999e-209Initial program 100.0%
Taylor expanded in b around 0 73.8%
Taylor expanded in t around 0 67.4%
associate--r+67.4%
sub-neg67.4%
neg-mul-167.4%
remove-double-neg67.4%
sub-neg67.4%
metadata-eval67.4%
Simplified67.4%
Taylor expanded in y around 0 51.5%
sub-neg51.5%
+-commutative51.5%
neg-mul-151.5%
remove-double-neg51.5%
associate-+l+51.5%
Simplified51.5%
Taylor expanded in a around 0 41.6%
+-commutative41.6%
Simplified41.6%
if -1.34999999999999999e-209 < t < 1.46000000000000002e-301Initial program 100.0%
Taylor expanded in z around inf 48.9%
Taylor expanded in y around inf 37.5%
associate-*r*37.5%
neg-mul-137.5%
Simplified37.5%
if 1.46000000000000002e-301 < t < 3.6499999999999998e43Initial program 97.1%
Taylor expanded in b around 0 72.1%
Taylor expanded in t around 0 72.1%
associate--r+72.1%
sub-neg72.1%
neg-mul-172.1%
remove-double-neg72.1%
sub-neg72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in y around 0 48.1%
sub-neg48.1%
+-commutative48.1%
neg-mul-148.1%
remove-double-neg48.1%
associate-+l+48.1%
Simplified48.1%
Taylor expanded in z around 0 40.0%
Final simplification54.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.9e+38)
(* y (- z))
(if (<= y -5.2e-165)
(* b (- t 2.0))
(if (<= y 5.6e-195)
(+ x z)
(if (<= y 4.5e+83) (* a (- 1.0 t)) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.9e+38) {
tmp = y * -z;
} else if (y <= -5.2e-165) {
tmp = b * (t - 2.0);
} else if (y <= 5.6e-195) {
tmp = x + z;
} else if (y <= 4.5e+83) {
tmp = a * (1.0 - t);
} 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.9d+38)) then
tmp = y * -z
else if (y <= (-5.2d-165)) then
tmp = b * (t - 2.0d0)
else if (y <= 5.6d-195) then
tmp = x + z
else if (y <= 4.5d+83) then
tmp = a * (1.0d0 - t)
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.9e+38) {
tmp = y * -z;
} else if (y <= -5.2e-165) {
tmp = b * (t - 2.0);
} else if (y <= 5.6e-195) {
tmp = x + z;
} else if (y <= 4.5e+83) {
tmp = a * (1.0 - t);
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.9e+38: tmp = y * -z elif y <= -5.2e-165: tmp = b * (t - 2.0) elif y <= 5.6e-195: tmp = x + z elif y <= 4.5e+83: tmp = a * (1.0 - t) else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.9e+38) tmp = Float64(y * Float64(-z)); elseif (y <= -5.2e-165) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= 5.6e-195) tmp = Float64(x + z); elseif (y <= 4.5e+83) tmp = Float64(a * Float64(1.0 - t)); 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.9e+38) tmp = y * -z; elseif (y <= -5.2e-165) tmp = b * (t - 2.0); elseif (y <= 5.6e-195) tmp = x + z; elseif (y <= 4.5e+83) tmp = a * (1.0 - t); else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.9e+38], N[(y * (-z)), $MachinePrecision], If[LessEqual[y, -5.2e-165], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e-195], N[(x + z), $MachinePrecision], If[LessEqual[y, 4.5e+83], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+38}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-165}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-195}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+83}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -2.90000000000000007e38Initial program 95.2%
Taylor expanded in z around inf 45.8%
Taylor expanded in y around inf 45.8%
associate-*r*45.8%
neg-mul-145.8%
Simplified45.8%
if -2.90000000000000007e38 < y < -5.20000000000000015e-165Initial program 95.3%
Taylor expanded in b around inf 56.8%
Taylor expanded in y around 0 54.6%
if -5.20000000000000015e-165 < y < 5.60000000000000007e-195Initial program 98.2%
Taylor expanded in b around 0 71.8%
Taylor expanded in t around 0 55.0%
associate--r+55.0%
sub-neg55.0%
neg-mul-155.0%
remove-double-neg55.0%
sub-neg55.0%
metadata-eval55.0%
Simplified55.0%
Taylor expanded in y around 0 55.0%
sub-neg55.0%
+-commutative55.0%
neg-mul-155.0%
remove-double-neg55.0%
associate-+l+55.0%
Simplified55.0%
Taylor expanded in a around 0 49.9%
+-commutative49.9%
Simplified49.9%
if 5.60000000000000007e-195 < y < 4.4999999999999999e83Initial program 96.2%
Taylor expanded in a around inf 47.2%
if 4.4999999999999999e83 < y Initial program 92.8%
Taylor expanded in b around inf 57.4%
Taylor expanded in y around inf 53.2%
Final simplification49.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1700000000.0)
(* y (- z))
(if (<= y -1.6e-100)
(* t b)
(if (<= y 3.2e-195)
(+ x z)
(if (<= y 5.9e+88) (* a (- 1.0 t)) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1700000000.0) {
tmp = y * -z;
} else if (y <= -1.6e-100) {
tmp = t * b;
} else if (y <= 3.2e-195) {
tmp = x + z;
} else if (y <= 5.9e+88) {
tmp = a * (1.0 - t);
} 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 <= (-1700000000.0d0)) then
tmp = y * -z
else if (y <= (-1.6d-100)) then
tmp = t * b
else if (y <= 3.2d-195) then
tmp = x + z
else if (y <= 5.9d+88) then
tmp = a * (1.0d0 - t)
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 <= -1700000000.0) {
tmp = y * -z;
} else if (y <= -1.6e-100) {
tmp = t * b;
} else if (y <= 3.2e-195) {
tmp = x + z;
} else if (y <= 5.9e+88) {
tmp = a * (1.0 - t);
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1700000000.0: tmp = y * -z elif y <= -1.6e-100: tmp = t * b elif y <= 3.2e-195: tmp = x + z elif y <= 5.9e+88: tmp = a * (1.0 - t) else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1700000000.0) tmp = Float64(y * Float64(-z)); elseif (y <= -1.6e-100) tmp = Float64(t * b); elseif (y <= 3.2e-195) tmp = Float64(x + z); elseif (y <= 5.9e+88) tmp = Float64(a * Float64(1.0 - t)); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1700000000.0) tmp = y * -z; elseif (y <= -1.6e-100) tmp = t * b; elseif (y <= 3.2e-195) tmp = x + z; elseif (y <= 5.9e+88) tmp = a * (1.0 - t); else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1700000000.0], N[(y * (-z)), $MachinePrecision], If[LessEqual[y, -1.6e-100], N[(t * b), $MachinePrecision], If[LessEqual[y, 3.2e-195], N[(x + z), $MachinePrecision], If[LessEqual[y, 5.9e+88], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1700000000:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-100}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-195}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{+88}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.7e9Initial program 94.1%
Taylor expanded in z around inf 44.1%
Taylor expanded in y around inf 44.1%
associate-*r*44.1%
neg-mul-144.1%
Simplified44.1%
if -1.7e9 < y < -1.60000000000000008e-100Initial program 100.0%
Taylor expanded in t around inf 65.6%
Taylor expanded in b around inf 55.8%
if -1.60000000000000008e-100 < y < 3.2000000000000001e-195Initial program 97.3%
Taylor expanded in b around 0 67.3%
Taylor expanded in t around 0 52.8%
associate--r+52.8%
sub-neg52.8%
neg-mul-152.8%
remove-double-neg52.8%
sub-neg52.8%
metadata-eval52.8%
Simplified52.8%
Taylor expanded in y around 0 52.8%
sub-neg52.8%
+-commutative52.8%
neg-mul-152.8%
remove-double-neg52.8%
associate-+l+52.8%
Simplified52.8%
Taylor expanded in a around 0 44.9%
+-commutative44.9%
Simplified44.9%
if 3.2000000000000001e-195 < y < 5.89999999999999967e88Initial program 96.2%
Taylor expanded in a around inf 47.2%
if 5.89999999999999967e88 < y Initial program 92.8%
Taylor expanded in b around inf 57.4%
Taylor expanded in y around inf 53.2%
Final simplification47.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 y))))
(if (or (<= b -6.3e-44) (not (<= b 6.8e+26)))
(+ (+ x (* b (- (+ y t) 2.0))) t_1)
(+ x (+ (* a (- 1.0 t)) 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 ((b <= -6.3e-44) || !(b <= 6.8e+26)) {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
} else {
tmp = x + ((a * (1.0 - t)) + 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 ((b <= (-6.3d-44)) .or. (.not. (b <= 6.8d+26))) then
tmp = (x + (b * ((y + t) - 2.0d0))) + t_1
else
tmp = x + ((a * (1.0d0 - t)) + 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 ((b <= -6.3e-44) || !(b <= 6.8e+26)) {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
} else {
tmp = x + ((a * (1.0 - t)) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - y) tmp = 0 if (b <= -6.3e-44) or not (b <= 6.8e+26): tmp = (x + (b * ((y + t) - 2.0))) + t_1 else: tmp = x + ((a * (1.0 - t)) + t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - y)) tmp = 0.0 if ((b <= -6.3e-44) || !(b <= 6.8e+26)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + t_1); else tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + 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 ((b <= -6.3e-44) || ~((b <= 6.8e+26))) tmp = (x + (b * ((y + t) - 2.0))) + t_1; else tmp = x + ((a * (1.0 - t)) + 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[b, -6.3e-44], N[Not[LessEqual[b, 6.8e+26]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -6.3 \cdot 10^{-44} \lor \neg \left(b \leq 6.8 \cdot 10^{+26}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + t\_1\right)\\
\end{array}
\end{array}
if b < -6.2999999999999998e-44 or 6.8000000000000005e26 < b Initial program 91.9%
Taylor expanded in a around 0 88.9%
if -6.2999999999999998e-44 < b < 6.8000000000000005e26Initial program 99.9%
Taylor expanded in b around 0 95.4%
Final simplification92.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -2.3e+33)
t_2
(if (<= b 2.4e+25) (+ x (+ t_1 (* z (- 1.0 y)))) (+ t_2 t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -2.3e+33) {
tmp = t_2;
} else if (b <= 2.4e+25) {
tmp = x + (t_1 + (z * (1.0 - y)));
} else {
tmp = t_2 + 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 = a * (1.0d0 - t)
t_2 = x + (b * ((y + t) - 2.0d0))
if (b <= (-2.3d+33)) then
tmp = t_2
else if (b <= 2.4d+25) then
tmp = x + (t_1 + (z * (1.0d0 - y)))
else
tmp = t_2 + 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 t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -2.3e+33) {
tmp = t_2;
} else if (b <= 2.4e+25) {
tmp = x + (t_1 + (z * (1.0 - y)));
} else {
tmp = t_2 + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -2.3e+33: tmp = t_2 elif b <= 2.4e+25: tmp = x + (t_1 + (z * (1.0 - y))) else: tmp = t_2 + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -2.3e+33) tmp = t_2; elseif (b <= 2.4e+25) tmp = Float64(x + Float64(t_1 + Float64(z * Float64(1.0 - y)))); else tmp = Float64(t_2 + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -2.3e+33) tmp = t_2; elseif (b <= 2.4e+25) tmp = x + (t_1 + (z * (1.0 - y))); else tmp = t_2 + 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]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.3e+33], t$95$2, If[LessEqual[b, 2.4e+25], N[(x + N[(t$95$1 + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -2.3 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{+25}:\\
\;\;\;\;x + \left(t\_1 + z \cdot \left(1 - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 + t\_1\\
\end{array}
\end{array}
if b < -2.30000000000000011e33Initial program 87.7%
Taylor expanded in a around 0 89.6%
Taylor expanded in z around 0 86.4%
if -2.30000000000000011e33 < b < 2.39999999999999996e25Initial program 100.0%
Taylor expanded in b around 0 93.6%
if 2.39999999999999996e25 < b Initial program 94.0%
Taylor expanded in z around 0 85.5%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -8.8e-44)
t_1
(if (<= b -5.8e-295)
(+ x (* a (- 1.0 t)))
(if (<= b 2.75e+26) (- (+ x a) (* y z)) 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 <= -8.8e-44) {
tmp = t_1;
} else if (b <= -5.8e-295) {
tmp = x + (a * (1.0 - t));
} else if (b <= 2.75e+26) {
tmp = (x + a) - (y * 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 = x + (b * ((y + t) - 2.0d0))
if (b <= (-8.8d-44)) then
tmp = t_1
else if (b <= (-5.8d-295)) then
tmp = x + (a * (1.0d0 - t))
else if (b <= 2.75d+26) then
tmp = (x + a) - (y * 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 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -8.8e-44) {
tmp = t_1;
} else if (b <= -5.8e-295) {
tmp = x + (a * (1.0 - t));
} else if (b <= 2.75e+26) {
tmp = (x + a) - (y * z);
} 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 <= -8.8e-44: tmp = t_1 elif b <= -5.8e-295: tmp = x + (a * (1.0 - t)) elif b <= 2.75e+26: tmp = (x + a) - (y * z) 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 <= -8.8e-44) tmp = t_1; elseif (b <= -5.8e-295) tmp = Float64(x + Float64(a * Float64(1.0 - t))); elseif (b <= 2.75e+26) tmp = Float64(Float64(x + a) - Float64(y * z)); 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 <= -8.8e-44) tmp = t_1; elseif (b <= -5.8e-295) tmp = x + (a * (1.0 - t)); elseif (b <= 2.75e+26) tmp = (x + a) - (y * z); 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, -8.8e-44], t$95$1, If[LessEqual[b, -5.8e-295], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.75e+26], N[(N[(x + a), $MachinePrecision] - N[(y * z), $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 -8.8 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -5.8 \cdot 10^{-295}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 2.75 \cdot 10^{+26}:\\
\;\;\;\;\left(x + a\right) - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.80000000000000048e-44 or 2.7499999999999998e26 < b Initial program 91.9%
Taylor expanded in a around 0 88.9%
Taylor expanded in z around 0 80.5%
if -8.80000000000000048e-44 < b < -5.8000000000000003e-295Initial program 99.9%
Taylor expanded in b around 0 95.8%
Taylor expanded in a around inf 74.1%
if -5.8000000000000003e-295 < b < 2.7499999999999998e26Initial program 100.0%
Taylor expanded in b around 0 95.2%
Taylor expanded in t around 0 75.9%
associate--r+75.9%
sub-neg75.9%
neg-mul-175.9%
remove-double-neg75.9%
sub-neg75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in y around inf 63.5%
Final simplification74.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.2e+18)
(* y (- z))
(if (<= y -4.2e-100)
(* t b)
(if (<= y 2.5e-219) (+ x z) (if (<= y 2.3e+64) (+ x a) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.2e+18) {
tmp = y * -z;
} else if (y <= -4.2e-100) {
tmp = t * b;
} else if (y <= 2.5e-219) {
tmp = x + z;
} else if (y <= 2.3e+64) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.2d+18)) then
tmp = y * -z
else if (y <= (-4.2d-100)) then
tmp = t * b
else if (y <= 2.5d-219) then
tmp = x + z
else if (y <= 2.3d+64) then
tmp = x + a
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.2e+18) {
tmp = y * -z;
} else if (y <= -4.2e-100) {
tmp = t * b;
} else if (y <= 2.5e-219) {
tmp = x + z;
} else if (y <= 2.3e+64) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.2e+18: tmp = y * -z elif y <= -4.2e-100: tmp = t * b elif y <= 2.5e-219: tmp = x + z elif y <= 2.3e+64: tmp = x + a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.2e+18) tmp = Float64(y * Float64(-z)); elseif (y <= -4.2e-100) tmp = Float64(t * b); elseif (y <= 2.5e-219) tmp = Float64(x + z); elseif (y <= 2.3e+64) tmp = Float64(x + a); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.2e+18) tmp = y * -z; elseif (y <= -4.2e-100) tmp = t * b; elseif (y <= 2.5e-219) tmp = x + z; elseif (y <= 2.3e+64) tmp = x + a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.2e+18], N[(y * (-z)), $MachinePrecision], If[LessEqual[y, -4.2e-100], N[(t * b), $MachinePrecision], If[LessEqual[y, 2.5e-219], N[(x + z), $MachinePrecision], If[LessEqual[y, 2.3e+64], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+18}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-100}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-219}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+64}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -3.2e18Initial program 94.1%
Taylor expanded in z around inf 44.1%
Taylor expanded in y around inf 44.1%
associate-*r*44.1%
neg-mul-144.1%
Simplified44.1%
if -3.2e18 < y < -4.20000000000000019e-100Initial program 100.0%
Taylor expanded in t around inf 65.6%
Taylor expanded in b around inf 55.8%
if -4.20000000000000019e-100 < y < 2.5000000000000001e-219Initial program 97.1%
Taylor expanded in b around 0 68.6%
Taylor expanded in t around 0 53.5%
associate--r+53.5%
sub-neg53.5%
neg-mul-153.5%
remove-double-neg53.5%
sub-neg53.5%
metadata-eval53.5%
Simplified53.5%
Taylor expanded in y around 0 53.5%
sub-neg53.5%
+-commutative53.5%
neg-mul-153.5%
remove-double-neg53.5%
associate-+l+53.5%
Simplified53.5%
Taylor expanded in a around 0 45.2%
+-commutative45.2%
Simplified45.2%
if 2.5000000000000001e-219 < y < 2.3e64Initial program 96.2%
Taylor expanded in b around 0 70.5%
Taylor expanded in t around 0 48.0%
associate--r+48.0%
sub-neg48.0%
neg-mul-148.0%
remove-double-neg48.0%
sub-neg48.0%
metadata-eval48.0%
Simplified48.0%
Taylor expanded in y around 0 40.6%
sub-neg40.6%
+-commutative40.6%
neg-mul-140.6%
remove-double-neg40.6%
associate-+l+40.6%
Simplified40.6%
Taylor expanded in z around 0 37.1%
if 2.3e64 < y Initial program 93.3%
Taylor expanded in b around inf 55.9%
Taylor expanded in y around inf 49.8%
Final simplification44.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7600000000.0)
(* y b)
(if (<= y -1.1e-100)
(* t b)
(if (<= y 3.4e-218) (+ x z) (if (<= y 2.3e+64) (+ x a) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7600000000.0) {
tmp = y * b;
} else if (y <= -1.1e-100) {
tmp = t * b;
} else if (y <= 3.4e-218) {
tmp = x + z;
} else if (y <= 2.3e+64) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-7600000000.0d0)) then
tmp = y * b
else if (y <= (-1.1d-100)) then
tmp = t * b
else if (y <= 3.4d-218) then
tmp = x + z
else if (y <= 2.3d+64) then
tmp = x + a
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7600000000.0) {
tmp = y * b;
} else if (y <= -1.1e-100) {
tmp = t * b;
} else if (y <= 3.4e-218) {
tmp = x + z;
} else if (y <= 2.3e+64) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7600000000.0: tmp = y * b elif y <= -1.1e-100: tmp = t * b elif y <= 3.4e-218: tmp = x + z elif y <= 2.3e+64: tmp = x + a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7600000000.0) tmp = Float64(y * b); elseif (y <= -1.1e-100) tmp = Float64(t * b); elseif (y <= 3.4e-218) tmp = Float64(x + z); elseif (y <= 2.3e+64) tmp = Float64(x + a); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7600000000.0) tmp = y * b; elseif (y <= -1.1e-100) tmp = t * b; elseif (y <= 3.4e-218) tmp = x + z; elseif (y <= 2.3e+64) tmp = x + a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7600000000.0], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.1e-100], N[(t * b), $MachinePrecision], If[LessEqual[y, 3.4e-218], N[(x + z), $MachinePrecision], If[LessEqual[y, 2.3e+64], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7600000000:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-100}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-218}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+64}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -7.6e9 or 2.3e64 < y Initial program 93.8%
Taylor expanded in b around inf 43.7%
Taylor expanded in y around inf 38.9%
if -7.6e9 < y < -1.09999999999999995e-100Initial program 100.0%
Taylor expanded in t around inf 65.6%
Taylor expanded in b around inf 55.8%
if -1.09999999999999995e-100 < y < 3.39999999999999986e-218Initial program 97.1%
Taylor expanded in b around 0 68.6%
Taylor expanded in t around 0 53.5%
associate--r+53.5%
sub-neg53.5%
neg-mul-153.5%
remove-double-neg53.5%
sub-neg53.5%
metadata-eval53.5%
Simplified53.5%
Taylor expanded in y around 0 53.5%
sub-neg53.5%
+-commutative53.5%
neg-mul-153.5%
remove-double-neg53.5%
associate-+l+53.5%
Simplified53.5%
Taylor expanded in a around 0 45.2%
+-commutative45.2%
Simplified45.2%
if 3.39999999999999986e-218 < y < 2.3e64Initial program 96.2%
Taylor expanded in b around 0 70.5%
Taylor expanded in t around 0 48.0%
associate--r+48.0%
sub-neg48.0%
neg-mul-148.0%
remove-double-neg48.0%
sub-neg48.0%
metadata-eval48.0%
Simplified48.0%
Taylor expanded in y around 0 40.6%
sub-neg40.6%
+-commutative40.6%
neg-mul-140.6%
remove-double-neg40.6%
associate-+l+40.6%
Simplified40.6%
Taylor expanded in z around 0 37.1%
Final simplification41.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.2e+18)
(* y b)
(if (<= y -2.7e-161)
(* t b)
(if (<= y 1.25e-279) x (if (<= y 3.45e+75) (* t b) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.2e+18) {
tmp = y * b;
} else if (y <= -2.7e-161) {
tmp = t * b;
} else if (y <= 1.25e-279) {
tmp = x;
} else if (y <= 3.45e+75) {
tmp = t * b;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.2d+18)) then
tmp = y * b
else if (y <= (-2.7d-161)) then
tmp = t * b
else if (y <= 1.25d-279) then
tmp = x
else if (y <= 3.45d+75) then
tmp = t * b
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.2e+18) {
tmp = y * b;
} else if (y <= -2.7e-161) {
tmp = t * b;
} else if (y <= 1.25e-279) {
tmp = x;
} else if (y <= 3.45e+75) {
tmp = t * b;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.2e+18: tmp = y * b elif y <= -2.7e-161: tmp = t * b elif y <= 1.25e-279: tmp = x elif y <= 3.45e+75: tmp = t * b else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.2e+18) tmp = Float64(y * b); elseif (y <= -2.7e-161) tmp = Float64(t * b); elseif (y <= 1.25e-279) tmp = x; elseif (y <= 3.45e+75) tmp = Float64(t * b); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.2e+18) tmp = y * b; elseif (y <= -2.7e-161) tmp = t * b; elseif (y <= 1.25e-279) tmp = x; elseif (y <= 3.45e+75) tmp = t * b; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.2e+18], N[(y * b), $MachinePrecision], If[LessEqual[y, -2.7e-161], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.25e-279], x, If[LessEqual[y, 3.45e+75], N[(t * b), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+18}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-161}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-279}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.45 \cdot 10^{+75}:\\
\;\;\;\;t \cdot b\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -1.2e18 or 3.4500000000000002e75 < y Initial program 93.6%
Taylor expanded in b around inf 44.0%
Taylor expanded in y around inf 39.8%
if -1.2e18 < y < -2.6999999999999999e-161 or 1.24999999999999992e-279 < y < 3.4500000000000002e75Initial program 97.2%
Taylor expanded in t around inf 47.7%
Taylor expanded in b around inf 32.5%
if -2.6999999999999999e-161 < y < 1.24999999999999992e-279Initial program 97.5%
Taylor expanded in x around inf 30.5%
Final simplification35.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.3e+32) (not (<= b 2.45e+27))) (+ x (* b (- (+ y t) 2.0))) (+ x (+ (* a (- 1.0 t)) (* z (- 1.0 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.3e+32) || !(b <= 2.45e+27)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.3d+32)) .or. (.not. (b <= 2.45d+27))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = x + ((a * (1.0d0 - t)) + (z * (1.0d0 - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.3e+32) || !(b <= 2.45e+27)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.3e+32) or not (b <= 2.45e+27): tmp = x + (b * ((y + t) - 2.0)) else: tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.3e+32) || !(b <= 2.45e+27)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.3e+32) || ~((b <= 2.45e+27))) tmp = x + (b * ((y + t) - 2.0)); else tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.3e+32], N[Not[LessEqual[b, 2.45e+27]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+32} \lor \neg \left(b \leq 2.45 \cdot 10^{+27}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if b < -1.3000000000000001e32 or 2.45000000000000007e27 < b Initial program 91.1%
Taylor expanded in a around 0 90.2%
Taylor expanded in z around 0 84.9%
if -1.3000000000000001e32 < b < 2.45000000000000007e27Initial program 100.0%
Taylor expanded in b around 0 93.6%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -9e+32)
t_1
(if (<= b -1.15e-293)
(+ x (* a (- 1.0 t)))
(if (<= b 3.4e+59) (- (+ x a) (* y 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 <= -9e+32) {
tmp = t_1;
} else if (b <= -1.15e-293) {
tmp = x + (a * (1.0 - t));
} else if (b <= 3.4e+59) {
tmp = (x + a) - (y * 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 <= (-9d+32)) then
tmp = t_1
else if (b <= (-1.15d-293)) then
tmp = x + (a * (1.0d0 - t))
else if (b <= 3.4d+59) then
tmp = (x + a) - (y * 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 <= -9e+32) {
tmp = t_1;
} else if (b <= -1.15e-293) {
tmp = x + (a * (1.0 - t));
} else if (b <= 3.4e+59) {
tmp = (x + a) - (y * 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 <= -9e+32: tmp = t_1 elif b <= -1.15e-293: tmp = x + (a * (1.0 - t)) elif b <= 3.4e+59: tmp = (x + a) - (y * 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 <= -9e+32) tmp = t_1; elseif (b <= -1.15e-293) tmp = Float64(x + Float64(a * Float64(1.0 - t))); elseif (b <= 3.4e+59) tmp = Float64(Float64(x + a) - Float64(y * 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 <= -9e+32) tmp = t_1; elseif (b <= -1.15e-293) tmp = x + (a * (1.0 - t)); elseif (b <= 3.4e+59) tmp = (x + a) - (y * 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, -9e+32], t$95$1, If[LessEqual[b, -1.15e-293], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.4e+59], N[(N[(x + a), $MachinePrecision] - N[(y * z), $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 -9 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.15 \cdot 10^{-293}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{+59}:\\
\;\;\;\;\left(x + a\right) - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.0000000000000007e32 or 3.40000000000000006e59 < b Initial program 90.5%
Taylor expanded in b around inf 80.9%
if -9.0000000000000007e32 < b < -1.14999999999999998e-293Initial program 99.9%
Taylor expanded in b around 0 91.1%
Taylor expanded in a around inf 65.0%
if -1.14999999999999998e-293 < b < 3.40000000000000006e59Initial program 100.0%
Taylor expanded in b around 0 92.3%
Taylor expanded in t around 0 74.4%
associate--r+74.4%
sub-neg74.4%
neg-mul-174.4%
remove-double-neg74.4%
sub-neg74.4%
metadata-eval74.4%
Simplified74.4%
Taylor expanded in y around inf 62.0%
Final simplification71.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -7e+32)
t_1
(if (<= b 1.45e-298)
(+ x (* a (- 1.0 t)))
(if (<= b 2.35e+61) (+ 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 <= -7e+32) {
tmp = t_1;
} else if (b <= 1.45e-298) {
tmp = x + (a * (1.0 - t));
} else if (b <= 2.35e+61) {
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 <= (-7d+32)) then
tmp = t_1
else if (b <= 1.45d-298) then
tmp = x + (a * (1.0d0 - t))
else if (b <= 2.35d+61) 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 <= -7e+32) {
tmp = t_1;
} else if (b <= 1.45e-298) {
tmp = x + (a * (1.0 - t));
} else if (b <= 2.35e+61) {
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 <= -7e+32: tmp = t_1 elif b <= 1.45e-298: tmp = x + (a * (1.0 - t)) elif b <= 2.35e+61: 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 <= -7e+32) tmp = t_1; elseif (b <= 1.45e-298) tmp = Float64(x + Float64(a * Float64(1.0 - t))); elseif (b <= 2.35e+61) 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 <= -7e+32) tmp = t_1; elseif (b <= 1.45e-298) tmp = x + (a * (1.0 - t)); elseif (b <= 2.35e+61) 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, -7e+32], t$95$1, If[LessEqual[b, 1.45e-298], N[(x + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.35e+61], 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 -7 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.45 \cdot 10^{-298}:\\
\;\;\;\;x + a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 2.35 \cdot 10^{+61}:\\
\;\;\;\;x + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -7.0000000000000002e32 or 2.3499999999999999e61 < b Initial program 90.5%
Taylor expanded in b around inf 80.9%
if -7.0000000000000002e32 < b < 1.45000000000000007e-298Initial program 99.9%
Taylor expanded in b around 0 92.3%
Taylor expanded in a around inf 63.3%
if 1.45000000000000007e-298 < b < 2.3499999999999999e61Initial program 100.0%
Taylor expanded in b around 0 91.5%
Taylor expanded in a around 0 61.7%
Final simplification70.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -7e+30)
t_1
(if (<= b -9.8e-120)
(- a (* t a))
(if (<= b 4.5e+59) (+ x (+ z a)) 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 <= -7e+30) {
tmp = t_1;
} else if (b <= -9.8e-120) {
tmp = a - (t * a);
} else if (b <= 4.5e+59) {
tmp = x + (z + a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((y + t) - 2.0d0)
if (b <= (-7d+30)) then
tmp = t_1
else if (b <= (-9.8d-120)) then
tmp = a - (t * a)
else if (b <= 4.5d+59) then
tmp = x + (z + a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -7e+30) {
tmp = t_1;
} else if (b <= -9.8e-120) {
tmp = a - (t * a);
} else if (b <= 4.5e+59) {
tmp = x + (z + a);
} 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 <= -7e+30: tmp = t_1 elif b <= -9.8e-120: tmp = a - (t * a) elif b <= 4.5e+59: tmp = x + (z + a) 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 <= -7e+30) tmp = t_1; elseif (b <= -9.8e-120) tmp = Float64(a - Float64(t * a)); elseif (b <= 4.5e+59) tmp = Float64(x + Float64(z + a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -7e+30) tmp = t_1; elseif (b <= -9.8e-120) tmp = a - (t * a); elseif (b <= 4.5e+59) tmp = x + (z + a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7e+30], t$95$1, If[LessEqual[b, -9.8e-120], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e+59], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -7 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -9.8 \cdot 10^{-120}:\\
\;\;\;\;a - t \cdot a\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+59}:\\
\;\;\;\;x + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -7.00000000000000042e30 or 4.49999999999999959e59 < b Initial program 90.5%
Taylor expanded in b around inf 80.9%
if -7.00000000000000042e30 < b < -9.8000000000000007e-120Initial program 99.8%
Taylor expanded in a around inf 45.9%
sub-neg45.9%
distribute-rgt-in46.0%
*-un-lft-identity46.0%
Applied egg-rr46.0%
if -9.8000000000000007e-120 < b < 4.49999999999999959e59Initial program 100.0%
Taylor expanded in b around 0 93.4%
Taylor expanded in t around 0 73.3%
associate--r+73.3%
sub-neg73.3%
neg-mul-173.3%
remove-double-neg73.3%
sub-neg73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in y around 0 49.5%
sub-neg49.5%
+-commutative49.5%
neg-mul-149.5%
remove-double-neg49.5%
associate-+l+49.5%
Simplified49.5%
Final simplification63.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.7e+31) (not (<= b 1.08e+27))) (+ x (* b (- (+ y t) 2.0))) (+ (+ x a) (* z (- 1.0 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.7e+31) || !(b <= 1.08e+27)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x + a) + (z * (1.0 - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-3.7d+31)) .or. (.not. (b <= 1.08d+27))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = (x + a) + (z * (1.0d0 - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.7e+31) || !(b <= 1.08e+27)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x + a) + (z * (1.0 - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.7e+31) or not (b <= 1.08e+27): tmp = x + (b * ((y + t) - 2.0)) else: tmp = (x + a) + (z * (1.0 - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.7e+31) || !(b <= 1.08e+27)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(Float64(x + a) + Float64(z * Float64(1.0 - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.7e+31) || ~((b <= 1.08e+27))) tmp = x + (b * ((y + t) - 2.0)); else tmp = (x + a) + (z * (1.0 - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.7e+31], N[Not[LessEqual[b, 1.08e+27]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + a), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.7 \cdot 10^{+31} \lor \neg \left(b \leq 1.08 \cdot 10^{+27}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\
\end{array}
\end{array}
if b < -3.6999999999999998e31 or 1.08e27 < b Initial program 91.1%
Taylor expanded in a around 0 90.2%
Taylor expanded in z around 0 84.9%
if -3.6999999999999998e31 < b < 1.08e27Initial program 100.0%
Taylor expanded in b around 0 93.6%
Taylor expanded in t around 0 69.3%
associate--r+69.3%
sub-neg69.3%
neg-mul-169.3%
remove-double-neg69.3%
sub-neg69.3%
metadata-eval69.3%
Simplified69.3%
Final simplification76.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -4.5e+78) (* t b) (if (<= t -4e+54) (* y b) (if (<= t 5.1e+46) (+ x a) (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e+78) {
tmp = t * b;
} else if (t <= -4e+54) {
tmp = y * b;
} else if (t <= 5.1e+46) {
tmp = x + a;
} else {
tmp = t * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-4.5d+78)) then
tmp = t * b
else if (t <= (-4d+54)) then
tmp = y * b
else if (t <= 5.1d+46) then
tmp = x + a
else
tmp = t * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e+78) {
tmp = t * b;
} else if (t <= -4e+54) {
tmp = y * b;
} else if (t <= 5.1e+46) {
tmp = x + a;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.5e+78: tmp = t * b elif t <= -4e+54: tmp = y * b elif t <= 5.1e+46: tmp = x + a else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.5e+78) tmp = Float64(t * b); elseif (t <= -4e+54) tmp = Float64(y * b); elseif (t <= 5.1e+46) tmp = Float64(x + a); else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4.5e+78) tmp = t * b; elseif (t <= -4e+54) tmp = y * b; elseif (t <= 5.1e+46) tmp = x + a; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.5e+78], N[(t * b), $MachinePrecision], If[LessEqual[t, -4e+54], N[(y * b), $MachinePrecision], If[LessEqual[t, 5.1e+46], N[(x + a), $MachinePrecision], N[(t * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+78}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq -4 \cdot 10^{+54}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+46}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -4.4999999999999999e78 or 5.0999999999999997e46 < t Initial program 93.4%
Taylor expanded in t around inf 76.6%
Taylor expanded in b around inf 45.0%
if -4.4999999999999999e78 < t < -4.0000000000000003e54Initial program 71.4%
Taylor expanded in b around inf 71.6%
Taylor expanded in y around inf 71.6%
if -4.0000000000000003e54 < t < 5.0999999999999997e46Initial program 98.6%
Taylor expanded in b around 0 70.8%
Taylor expanded in t around 0 68.6%
associate--r+68.6%
sub-neg68.6%
neg-mul-168.6%
remove-double-neg68.6%
sub-neg68.6%
metadata-eval68.6%
Simplified68.6%
Taylor expanded in y around 0 44.8%
sub-neg44.8%
+-commutative44.8%
neg-mul-144.8%
remove-double-neg44.8%
associate-+l+44.8%
Simplified44.8%
Taylor expanded in z around 0 33.9%
Final simplification39.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4e+33) (not (<= b 5.8e+27))) (* 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 <= -4e+33) || !(b <= 5.8e+27)) {
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 <= (-4d+33)) .or. (.not. (b <= 5.8d+27))) 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 <= -4e+33) || !(b <= 5.8e+27)) {
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 <= -4e+33) or not (b <= 5.8e+27): 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 <= -4e+33) || !(b <= 5.8e+27)) 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 <= -4e+33) || ~((b <= 5.8e+27))) 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, -4e+33], N[Not[LessEqual[b, 5.8e+27]], $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 -4 \cdot 10^{+33} \lor \neg \left(b \leq 5.8 \cdot 10^{+27}\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 < -3.9999999999999998e33 or 5.8000000000000002e27 < b Initial program 91.1%
Taylor expanded in b around inf 78.8%
if -3.9999999999999998e33 < b < 5.8000000000000002e27Initial program 100.0%
Taylor expanded in b around 0 93.6%
Taylor expanded in a around inf 58.7%
Final simplification68.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.14e-79) (not (<= b 4.4e+97))) (* y b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.14e-79) || !(b <= 4.4e+97)) {
tmp = y * b;
} 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 ((b <= (-1.14d-79)) .or. (.not. (b <= 4.4d+97))) then
tmp = y * b
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 ((b <= -1.14e-79) || !(b <= 4.4e+97)) {
tmp = y * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.14e-79) or not (b <= 4.4e+97): tmp = y * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.14e-79) || !(b <= 4.4e+97)) tmp = Float64(y * b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.14e-79) || ~((b <= 4.4e+97))) tmp = y * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.14e-79], N[Not[LessEqual[b, 4.4e+97]], $MachinePrecision]], N[(y * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.14 \cdot 10^{-79} \lor \neg \left(b \leq 4.4 \cdot 10^{+97}\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if b < -1.14e-79 or 4.4000000000000002e97 < b Initial program 92.4%
Taylor expanded in b around inf 73.1%
Taylor expanded in y around inf 34.7%
if -1.14e-79 < b < 4.4000000000000002e97Initial program 99.2%
Taylor expanded in x around inf 23.0%
Final simplification29.0%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.05e+198) z (if (<= z 1.6e+103) x z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.05e+198) {
tmp = z;
} else if (z <= 1.6e+103) {
tmp = x;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.05d+198)) then
tmp = z
else if (z <= 1.6d+103) then
tmp = x
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.05e+198) {
tmp = z;
} else if (z <= 1.6e+103) {
tmp = x;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.05e+198: tmp = z elif z <= 1.6e+103: tmp = x else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.05e+198) tmp = z; elseif (z <= 1.6e+103) tmp = x; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.05e+198) tmp = z; elseif (z <= 1.6e+103) tmp = x; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.05e+198], z, If[LessEqual[z, 1.6e+103], x, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+198}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+103}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.05000000000000006e198 or 1.59999999999999996e103 < z Initial program 96.9%
Taylor expanded in z around inf 64.0%
Taylor expanded in y around 0 27.5%
if -1.05000000000000006e198 < z < 1.59999999999999996e103Initial program 95.3%
Taylor expanded in x around inf 18.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.2e+80) x (if (<= x 1.75e+59) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.2e+80) {
tmp = x;
} else if (x <= 1.75e+59) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-2.2d+80)) then
tmp = x
else if (x <= 1.75d+59) then
tmp = a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.2e+80) {
tmp = x;
} else if (x <= 1.75e+59) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.2e+80: tmp = x elif x <= 1.75e+59: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.2e+80) tmp = x; elseif (x <= 1.75e+59) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.2e+80) tmp = x; elseif (x <= 1.75e+59) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.2e+80], x, If[LessEqual[x, 1.75e+59], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{+59}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.20000000000000003e80 or 1.75e59 < x Initial program 96.2%
Taylor expanded in x around inf 30.0%
if -2.20000000000000003e80 < x < 1.75e59Initial program 95.3%
Taylor expanded in a around inf 32.2%
Taylor expanded in t around 0 11.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 95.7%
Taylor expanded in a around inf 27.1%
Taylor expanded in t around 0 10.0%
herbie shell --seed 2024144
(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)))