
(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 16 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 (if (<= b -1.56e+192) (* b (- (+ t y) 2.0)) (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) {
double tmp;
if (b <= -1.56e+192) {
tmp = b * ((t + y) - 2.0);
} else {
tmp = fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.56e+192) tmp = Float64(b * Float64(Float64(t + y) - 2.0)); else tmp = fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.56e+192], N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.56 \cdot 10^{+192}:\\
\;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\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}
\end{array}
if b < -1.56e192Initial program 70.8%
Taylor expanded in b around inf 95.8%
if -1.56e192 < b Initial program 95.7%
+-commutative95.7%
fma-def98.7%
associate--l+98.7%
sub-neg98.7%
metadata-eval98.7%
sub-neg98.7%
associate-+l-98.7%
fma-neg99.1%
sub-neg99.1%
metadata-eval99.1%
remove-double-neg99.1%
sub-neg99.1%
metadata-eval99.1%
Simplified99.1%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (* b (- (+ t y) 2.0)) (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))))))
(if (<= t_1 INFINITY) t_1 (* t (- b a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x + (z * (1.0 - y))) + (a * (1.0 - t)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x + (z * (1.0 - y))) + (a * (1.0 - t)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b * ((t + y) - 2.0)) + ((x + (z * (1.0 - y))) + (a * (1.0 - t))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * (b - a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(b - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b * ((t + y) - 2.0)) + ((x + (z * (1.0 - y))) + (a * (1.0 - t))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = t * (b - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) Initial program 0.0%
Taylor expanded in t around inf 77.0%
Final simplification98.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (- 1.0 y)))) (t_2 (* b (- (+ t y) 2.0))))
(if (<= b -3e+29)
t_2
(if (<= b -1.5e-68)
t_1
(if (<= b -6.8e-166) (* a (- 1.0 t)) (if (<= b 1.62e+47) 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 = b * ((t + y) - 2.0);
double tmp;
if (b <= -3e+29) {
tmp = t_2;
} else if (b <= -1.5e-68) {
tmp = t_1;
} else if (b <= -6.8e-166) {
tmp = a * (1.0 - t);
} else if (b <= 1.62e+47) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (z * (1.0d0 - y))
t_2 = b * ((t + y) - 2.0d0)
if (b <= (-3d+29)) then
tmp = t_2
else if (b <= (-1.5d-68)) then
tmp = t_1
else if (b <= (-6.8d-166)) then
tmp = a * (1.0d0 - t)
else if (b <= 1.62d+47) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (1.0 - y));
double t_2 = b * ((t + y) - 2.0);
double tmp;
if (b <= -3e+29) {
tmp = t_2;
} else if (b <= -1.5e-68) {
tmp = t_1;
} else if (b <= -6.8e-166) {
tmp = a * (1.0 - t);
} else if (b <= 1.62e+47) {
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 = b * ((t + y) - 2.0) tmp = 0 if b <= -3e+29: tmp = t_2 elif b <= -1.5e-68: tmp = t_1 elif b <= -6.8e-166: tmp = a * (1.0 - t) elif b <= 1.62e+47: 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(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -3e+29) tmp = t_2; elseif (b <= -1.5e-68) tmp = t_1; elseif (b <= -6.8e-166) tmp = Float64(a * Float64(1.0 - t)); elseif (b <= 1.62e+47) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (1.0 - y)); t_2 = b * ((t + y) - 2.0); tmp = 0.0; if (b <= -3e+29) tmp = t_2; elseif (b <= -1.5e-68) tmp = t_1; elseif (b <= -6.8e-166) tmp = a * (1.0 - t); elseif (b <= 1.62e+47) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3e+29], t$95$2, If[LessEqual[b, -1.5e-68], t$95$1, If[LessEqual[b, -6.8e-166], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.62e+47], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(1 - y\right)\\
t_2 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -3 \cdot 10^{+29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.5 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -6.8 \cdot 10^{-166}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 1.62 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -2.9999999999999999e29 or 1.6200000000000001e47 < b Initial program 86.9%
Taylor expanded in b around inf 77.1%
if -2.9999999999999999e29 < b < -1.5e-68 or -6.7999999999999995e-166 < b < 1.6200000000000001e47Initial program 98.3%
Taylor expanded in t around 0 98.3%
Taylor expanded in a around 0 73.6%
Simplified74.4%
Taylor expanded in b around 0 67.3%
+-commutative67.3%
Simplified67.3%
if -1.5e-68 < b < -6.7999999999999995e-166Initial program 100.0%
Taylor expanded in a around inf 70.9%
Final simplification72.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (* z (- y))))
(if (<= y -7.6e+56)
t_2
(if (<= y 2.35e-204)
t_1
(if (<= y 4.4e-151) (* b t) (if (<= y 7.2e+64) 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 <= -7.6e+56) {
tmp = t_2;
} else if (y <= 2.35e-204) {
tmp = t_1;
} else if (y <= 4.4e-151) {
tmp = b * t;
} else if (y <= 7.2e+64) {
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 <= (-7.6d+56)) then
tmp = t_2
else if (y <= 2.35d-204) then
tmp = t_1
else if (y <= 4.4d-151) then
tmp = b * t
else if (y <= 7.2d+64) 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 <= -7.6e+56) {
tmp = t_2;
} else if (y <= 2.35e-204) {
tmp = t_1;
} else if (y <= 4.4e-151) {
tmp = b * t;
} else if (y <= 7.2e+64) {
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 <= -7.6e+56: tmp = t_2 elif y <= 2.35e-204: tmp = t_1 elif y <= 4.4e-151: tmp = b * t elif y <= 7.2e+64: 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 <= -7.6e+56) tmp = t_2; elseif (y <= 2.35e-204) tmp = t_1; elseif (y <= 4.4e-151) tmp = Float64(b * t); elseif (y <= 7.2e+64) 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 <= -7.6e+56) tmp = t_2; elseif (y <= 2.35e-204) tmp = t_1; elseif (y <= 4.4e-151) tmp = b * t; elseif (y <= 7.2e+64) 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, -7.6e+56], t$95$2, If[LessEqual[y, 2.35e-204], t$95$1, If[LessEqual[y, 4.4e-151], N[(b * t), $MachinePrecision], If[LessEqual[y, 7.2e+64], 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 -7.6 \cdot 10^{+56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-151}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -7.59999999999999991e56 or 7.20000000000000027e64 < y Initial program 92.0%
Taylor expanded in y around inf 79.2%
Taylor expanded in b around 0 48.1%
mul-1-neg48.1%
*-commutative48.1%
distribute-rgt-neg-in48.1%
Simplified48.1%
if -7.59999999999999991e56 < y < 2.34999999999999996e-204 or 4.3999999999999999e-151 < y < 7.20000000000000027e64Initial program 93.9%
Taylor expanded in a around inf 40.9%
if 2.34999999999999996e-204 < y < 4.3999999999999999e-151Initial program 100.0%
Taylor expanded in t around inf 55.4%
Taylor expanded in b around inf 55.4%
Final simplification44.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (* z (- y))))
(if (<= y -2.8e+50)
t_2
(if (<= y -1.85e-300)
t_1
(if (<= y 1.3e-147) (* b (- t 2.0)) (if (<= y 5e+62) 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 <= -2.8e+50) {
tmp = t_2;
} else if (y <= -1.85e-300) {
tmp = t_1;
} else if (y <= 1.3e-147) {
tmp = b * (t - 2.0);
} else if (y <= 5e+62) {
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 <= (-2.8d+50)) then
tmp = t_2
else if (y <= (-1.85d-300)) then
tmp = t_1
else if (y <= 1.3d-147) then
tmp = b * (t - 2.0d0)
else if (y <= 5d+62) 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 <= -2.8e+50) {
tmp = t_2;
} else if (y <= -1.85e-300) {
tmp = t_1;
} else if (y <= 1.3e-147) {
tmp = b * (t - 2.0);
} else if (y <= 5e+62) {
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 <= -2.8e+50: tmp = t_2 elif y <= -1.85e-300: tmp = t_1 elif y <= 1.3e-147: tmp = b * (t - 2.0) elif y <= 5e+62: 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 <= -2.8e+50) tmp = t_2; elseif (y <= -1.85e-300) tmp = t_1; elseif (y <= 1.3e-147) tmp = Float64(b * Float64(t - 2.0)); elseif (y <= 5e+62) 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 <= -2.8e+50) tmp = t_2; elseif (y <= -1.85e-300) tmp = t_1; elseif (y <= 1.3e-147) tmp = b * (t - 2.0); elseif (y <= 5e+62) 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, -2.8e+50], t$95$2, If[LessEqual[y, -1.85e-300], t$95$1, If[LessEqual[y, 1.3e-147], N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+62], 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 -2.8 \cdot 10^{+50}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-300}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-147}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.7999999999999998e50 or 5.00000000000000029e62 < y Initial program 92.0%
Taylor expanded in y around inf 79.2%
Taylor expanded in b around 0 48.1%
mul-1-neg48.1%
*-commutative48.1%
distribute-rgt-neg-in48.1%
Simplified48.1%
if -2.7999999999999998e50 < y < -1.8500000000000001e-300 or 1.2999999999999999e-147 < y < 5.00000000000000029e62Initial program 94.1%
Taylor expanded in a around inf 41.2%
if -1.8500000000000001e-300 < y < 1.2999999999999999e-147Initial program 96.0%
Taylor expanded in b around inf 56.9%
Taylor expanded in y around 0 56.9%
Final simplification45.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 y))))
(if (or (<= b -2.6e+28) (not (<= b 2.4e+34)))
(+ (+ (* b (- (+ t y) 2.0)) x) 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 <= -2.6e+28) || !(b <= 2.4e+34)) {
tmp = ((b * ((t + y) - 2.0)) + x) + 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 <= (-2.6d+28)) .or. (.not. (b <= 2.4d+34))) then
tmp = ((b * ((t + y) - 2.0d0)) + x) + 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 <= -2.6e+28) || !(b <= 2.4e+34)) {
tmp = ((b * ((t + y) - 2.0)) + x) + 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 <= -2.6e+28) or not (b <= 2.4e+34): tmp = ((b * ((t + y) - 2.0)) + x) + 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 <= -2.6e+28) || !(b <= 2.4e+34)) tmp = Float64(Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + x) + 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 <= -2.6e+28) || ~((b <= 2.4e+34))) tmp = ((b * ((t + y) - 2.0)) + x) + 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, -2.6e+28], N[Not[LessEqual[b, 2.4e+34]], $MachinePrecision]], N[(N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + x), $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 -2.6 \cdot 10^{+28} \lor \neg \left(b \leq 2.4 \cdot 10^{+34}\right):\\
\;\;\;\;\left(b \cdot \left(\left(t + y\right) - 2\right) + x\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + t\_1\right)\\
\end{array}
\end{array}
if b < -2.6000000000000002e28 or 2.39999999999999987e34 < b Initial program 87.5%
Taylor expanded in a around 0 86.0%
if -2.6000000000000002e28 < b < 2.39999999999999987e34Initial program 98.5%
Taylor expanded in b around 0 93.5%
Final simplification90.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -2.22e+30)
t_1
(if (<= b 6.5e+123)
(+ x (+ (* a (- 1.0 t)) (* z (- 1.0 y))))
(- t_1 (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -2.22e+30) {
tmp = t_1;
} else if (b <= 6.5e+123) {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
} else {
tmp = t_1 - (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((t + y) - 2.0d0)
if (b <= (-2.22d+30)) then
tmp = t_1
else if (b <= 6.5d+123) then
tmp = x + ((a * (1.0d0 - t)) + (z * (1.0d0 - y)))
else
tmp = t_1 - (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -2.22e+30) {
tmp = t_1;
} else if (b <= 6.5e+123) {
tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y)));
} else {
tmp = t_1 - (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((t + y) - 2.0) tmp = 0 if b <= -2.22e+30: tmp = t_1 elif b <= 6.5e+123: tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))) else: tmp = t_1 - (y * z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -2.22e+30) tmp = t_1; elseif (b <= 6.5e+123) tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) + Float64(z * Float64(1.0 - y)))); else tmp = Float64(t_1 - Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * ((t + y) - 2.0); tmp = 0.0; if (b <= -2.22e+30) tmp = t_1; elseif (b <= 6.5e+123) tmp = x + ((a * (1.0 - t)) + (z * (1.0 - y))); else tmp = t_1 - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.22e+30], t$95$1, If[LessEqual[b, 6.5e+123], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(y * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -2.22 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+123}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) + z \cdot \left(1 - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 - y \cdot z\\
\end{array}
\end{array}
if b < -2.22e30Initial program 87.7%
Taylor expanded in b around inf 83.3%
if -2.22e30 < b < 6.5000000000000001e123Initial program 97.5%
Taylor expanded in b around 0 89.6%
if 6.5000000000000001e123 < b Initial program 85.0%
Taylor expanded in y around inf 80.5%
mul-1-neg80.5%
*-commutative80.5%
distribute-rgt-neg-in80.5%
Simplified80.5%
Final simplification86.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -4.8e+38)
t_1
(if (<= t 5.6e-122)
(* y (- b z))
(if (<= t 4.2e+26) (* z (- 1.0 y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -4.8e+38) {
tmp = t_1;
} else if (t <= 5.6e-122) {
tmp = y * (b - z);
} else if (t <= 4.2e+26) {
tmp = z * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * (b - a)
if (t <= (-4.8d+38)) then
tmp = t_1
else if (t <= 5.6d-122) then
tmp = y * (b - z)
else if (t <= 4.2d+26) then
tmp = z * (1.0d0 - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -4.8e+38) {
tmp = t_1;
} else if (t <= 5.6e-122) {
tmp = y * (b - z);
} else if (t <= 4.2e+26) {
tmp = z * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -4.8e+38: tmp = t_1 elif t <= 5.6e-122: tmp = y * (b - z) elif t <= 4.2e+26: tmp = z * (1.0 - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -4.8e+38) tmp = t_1; elseif (t <= 5.6e-122) tmp = Float64(y * Float64(b - z)); elseif (t <= 4.2e+26) tmp = Float64(z * Float64(1.0 - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -4.8e+38) tmp = t_1; elseif (t <= 5.6e-122) tmp = y * (b - z); elseif (t <= 4.2e+26) tmp = z * (1.0 - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e+38], t$95$1, If[LessEqual[t, 5.6e-122], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+26], N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-122}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+26}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.80000000000000035e38 or 4.2000000000000002e26 < t Initial program 87.3%
Taylor expanded in t around inf 72.7%
if -4.80000000000000035e38 < t < 5.5999999999999998e-122Initial program 97.5%
Taylor expanded in y around inf 51.8%
if 5.5999999999999998e-122 < t < 4.2000000000000002e26Initial program 99.9%
Taylor expanded in z around inf 61.5%
Final simplification61.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9e+144) (not (<= y 6.5e+53))) (* y (- b z)) (+ x (+ z (* b (+ t -2.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9e+144) || !(y <= 6.5e+53)) {
tmp = y * (b - z);
} else {
tmp = x + (z + (b * (t + -2.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-9d+144)) .or. (.not. (y <= 6.5d+53))) then
tmp = y * (b - z)
else
tmp = x + (z + (b * (t + (-2.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9e+144) || !(y <= 6.5e+53)) {
tmp = y * (b - z);
} else {
tmp = x + (z + (b * (t + -2.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9e+144) or not (y <= 6.5e+53): tmp = y * (b - z) else: tmp = x + (z + (b * (t + -2.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9e+144) || !(y <= 6.5e+53)) tmp = Float64(y * Float64(b - z)); else tmp = Float64(x + Float64(z + Float64(b * Float64(t + -2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9e+144) || ~((y <= 6.5e+53))) tmp = y * (b - z); else tmp = x + (z + (b * (t + -2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9e+144], N[Not[LessEqual[y, 6.5e+53]], $MachinePrecision]], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(z + N[(b * N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+144} \lor \neg \left(y \leq 6.5 \cdot 10^{+53}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z + b \cdot \left(t + -2\right)\right)\\
\end{array}
\end{array}
if y < -8.99999999999999935e144 or 6.50000000000000017e53 < y Initial program 94.9%
Taylor expanded in y around inf 84.3%
if -8.99999999999999935e144 < y < 6.50000000000000017e53Initial program 92.3%
Taylor expanded in t around 0 97.4%
Taylor expanded in a around 0 67.2%
Simplified69.1%
Taylor expanded in y around 0 63.6%
+-commutative63.6%
sub-neg63.6%
metadata-eval63.6%
Simplified63.6%
Final simplification71.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.3e+47) (* b t) (if (<= b -7e-166) a (if (<= b 1e+30) x (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.3e+47) {
tmp = b * t;
} else if (b <= -7e-166) {
tmp = a;
} else if (b <= 1e+30) {
tmp = x;
} else {
tmp = b * 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 <= (-6.3d+47)) then
tmp = b * t
else if (b <= (-7d-166)) then
tmp = a
else if (b <= 1d+30) then
tmp = x
else
tmp = b * 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 <= -6.3e+47) {
tmp = b * t;
} else if (b <= -7e-166) {
tmp = a;
} else if (b <= 1e+30) {
tmp = x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.3e+47: tmp = b * t elif b <= -7e-166: tmp = a elif b <= 1e+30: tmp = x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.3e+47) tmp = Float64(b * t); elseif (b <= -7e-166) tmp = a; elseif (b <= 1e+30) tmp = x; else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.3e+47) tmp = b * t; elseif (b <= -7e-166) tmp = a; elseif (b <= 1e+30) tmp = x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.3e+47], N[(b * t), $MachinePrecision], If[LessEqual[b, -7e-166], a, If[LessEqual[b, 1e+30], x, N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.3 \cdot 10^{+47}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;b \leq -7 \cdot 10^{-166}:\\
\;\;\;\;a\\
\mathbf{elif}\;b \leq 10^{+30}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -6.30000000000000003e47 or 1e30 < b Initial program 87.3%
Taylor expanded in t around inf 43.2%
Taylor expanded in b around inf 34.0%
if -6.30000000000000003e47 < b < -6.9999999999999998e-166Initial program 97.5%
Taylor expanded in a around inf 48.4%
Taylor expanded in t around 0 23.9%
if -6.9999999999999998e-166 < b < 1e30Initial program 99.0%
Taylor expanded in x around inf 24.4%
Final simplification28.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.3e+38) (not (<= t 1.05e+26))) (* t (- b a)) (* z (- y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.3e+38) || !(t <= 1.05e+26)) {
tmp = t * (b - a);
} else {
tmp = z * -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 ((t <= (-1.3d+38)) .or. (.not. (t <= 1.05d+26))) then
tmp = t * (b - a)
else
tmp = z * -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 ((t <= -1.3e+38) || !(t <= 1.05e+26)) {
tmp = t * (b - a);
} else {
tmp = z * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.3e+38) or not (t <= 1.05e+26): tmp = t * (b - a) else: tmp = z * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.3e+38) || !(t <= 1.05e+26)) tmp = Float64(t * Float64(b - a)); else tmp = Float64(z * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.3e+38) || ~((t <= 1.05e+26))) tmp = t * (b - a); else tmp = z * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.3e+38], N[Not[LessEqual[t, 1.05e+26]], $MachinePrecision]], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(z * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+38} \lor \neg \left(t \leq 1.05 \cdot 10^{+26}\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < -1.3e38 or 1.05e26 < t Initial program 87.3%
Taylor expanded in t around inf 72.7%
if -1.3e38 < t < 1.05e26Initial program 97.9%
Taylor expanded in y around inf 50.2%
Taylor expanded in b around 0 29.0%
mul-1-neg29.0%
*-commutative29.0%
distribute-rgt-neg-in29.0%
Simplified29.0%
Final simplification47.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.2e+63) (not (<= y 1.6e+57))) (* y (- b z)) (* t (- b a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.2e+63) || !(y <= 1.6e+57)) {
tmp = y * (b - z);
} else {
tmp = t * (b - a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-8.2d+63)) .or. (.not. (y <= 1.6d+57))) then
tmp = y * (b - z)
else
tmp = t * (b - a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.2e+63) || !(y <= 1.6e+57)) {
tmp = y * (b - z);
} else {
tmp = t * (b - a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.2e+63) or not (y <= 1.6e+57): tmp = y * (b - z) else: tmp = t * (b - a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.2e+63) || !(y <= 1.6e+57)) tmp = Float64(y * Float64(b - z)); else tmp = Float64(t * Float64(b - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.2e+63) || ~((y <= 1.6e+57))) tmp = y * (b - z); else tmp = t * (b - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.2e+63], N[Not[LessEqual[y, 1.6e+57]], $MachinePrecision]], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+63} \lor \neg \left(y \leq 1.6 \cdot 10^{+57}\right):\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if y < -8.19999999999999985e63 or 1.60000000000000015e57 < y Initial program 92.0%
Taylor expanded in y around inf 80.1%
if -8.19999999999999985e63 < y < 1.60000000000000015e57Initial program 94.4%
Taylor expanded in t around inf 44.8%
Final simplification60.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.4e+116) (not (<= t 2.05e+26))) (* b t) (* z (- y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.4e+116) || !(t <= 2.05e+26)) {
tmp = b * t;
} else {
tmp = z * -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 ((t <= (-9.4d+116)) .or. (.not. (t <= 2.05d+26))) then
tmp = b * t
else
tmp = z * -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 ((t <= -9.4e+116) || !(t <= 2.05e+26)) {
tmp = b * t;
} else {
tmp = z * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9.4e+116) or not (t <= 2.05e+26): tmp = b * t else: tmp = z * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9.4e+116) || !(t <= 2.05e+26)) tmp = Float64(b * t); else tmp = Float64(z * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -9.4e+116) || ~((t <= 2.05e+26))) tmp = b * t; else tmp = z * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9.4e+116], N[Not[LessEqual[t, 2.05e+26]], $MachinePrecision]], N[(b * t), $MachinePrecision], N[(z * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.4 \cdot 10^{+116} \lor \neg \left(t \leq 2.05 \cdot 10^{+26}\right):\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < -9.4000000000000007e116 or 2.04999999999999992e26 < t Initial program 85.9%
Taylor expanded in t around inf 77.8%
Taylor expanded in b around inf 41.2%
if -9.4000000000000007e116 < t < 2.04999999999999992e26Initial program 97.5%
Taylor expanded in y around inf 49.1%
Taylor expanded in b around 0 29.7%
mul-1-neg29.7%
*-commutative29.7%
distribute-rgt-neg-in29.7%
Simplified29.7%
Final simplification33.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.2e+117) (not (<= t 4.4e+32))) (* t (- a)) (* z (- y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.2e+117) || !(t <= 4.4e+32)) {
tmp = t * -a;
} else {
tmp = z * -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 ((t <= (-2.2d+117)) .or. (.not. (t <= 4.4d+32))) then
tmp = t * -a
else
tmp = z * -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 ((t <= -2.2e+117) || !(t <= 4.4e+32)) {
tmp = t * -a;
} else {
tmp = z * -y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.2e+117) or not (t <= 4.4e+32): tmp = t * -a else: tmp = z * -y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.2e+117) || !(t <= 4.4e+32)) tmp = Float64(t * Float64(-a)); else tmp = Float64(z * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.2e+117) || ~((t <= 4.4e+32))) tmp = t * -a; else tmp = z * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.2e+117], N[Not[LessEqual[t, 4.4e+32]], $MachinePrecision]], N[(t * (-a)), $MachinePrecision], N[(z * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+117} \lor \neg \left(t \leq 4.4 \cdot 10^{+32}\right):\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < -2.20000000000000014e117 or 4.40000000000000002e32 < t Initial program 85.4%
Taylor expanded in a around inf 47.7%
Taylor expanded in t around 0 47.7%
Taylor expanded in t around inf 47.7%
associate-*r*47.7%
mul-1-neg47.7%
Simplified47.7%
if -2.20000000000000014e117 < t < 4.40000000000000002e32Initial program 97.6%
Taylor expanded in y around inf 48.3%
Taylor expanded in b around 0 29.2%
mul-1-neg29.2%
*-commutative29.2%
distribute-rgt-neg-in29.2%
Simplified29.2%
Final simplification35.6%
(FPCore (x y z t a b) :precision binary64 (if (<= x -9.6e+91) x (if (<= x 8.8e+116) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9.6e+91) {
tmp = x;
} else if (x <= 8.8e+116) {
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 <= (-9.6d+91)) then
tmp = x
else if (x <= 8.8d+116) 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 <= -9.6e+91) {
tmp = x;
} else if (x <= 8.8e+116) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -9.6e+91: tmp = x elif x <= 8.8e+116: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -9.6e+91) tmp = x; elseif (x <= 8.8e+116) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -9.6e+91) tmp = x; elseif (x <= 8.8e+116) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9.6e+91], x, If[LessEqual[x, 8.8e+116], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.6 \cdot 10^{+91}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{+116}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.59999999999999932e91 or 8.799999999999999e116 < x Initial program 94.2%
Taylor expanded in x around inf 35.7%
if -9.59999999999999932e91 < x < 8.799999999999999e116Initial program 92.9%
Taylor expanded in a around inf 31.6%
Taylor expanded in t around 0 12.8%
Final simplification20.6%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 93.3%
Taylor expanded in a around inf 27.2%
Taylor expanded in t around 0 9.6%
Final simplification9.6%
herbie shell --seed 2024036
(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)))