
(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 21 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 (fma (- b z) y (fma (- t 2.0) b (fma (- 1.0 t) a (+ z x)))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((b - z), y, fma((t - 2.0), b, fma((1.0 - t), a, (z + x))));
}
function code(x, y, z, t, a, b) return fma(Float64(b - z), y, fma(Float64(t - 2.0), b, fma(Float64(1.0 - t), a, Float64(z + x)))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(N[(1.0 - t), $MachinePrecision] * a + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, \mathsf{fma}\left(1 - t, a, z + x\right)\right)\right)
\end{array}
Initial program 96.1%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites99.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -1.65e+58)
t_1
(if (<= y -0.0008)
(* (- b a) t)
(if (<= y 5.6e-248)
(fma -2.0 b (+ z x))
(if (<= y 7.1e-140)
(* (- 1.0 t) a)
(if (<= y 1.7e-5)
(fma (- t 2.0) b z)
(if (<= y 6.5e+95) (* (- (+ t y) 2.0) b) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -1.65e+58) {
tmp = t_1;
} else if (y <= -0.0008) {
tmp = (b - a) * t;
} else if (y <= 5.6e-248) {
tmp = fma(-2.0, b, (z + x));
} else if (y <= 7.1e-140) {
tmp = (1.0 - t) * a;
} else if (y <= 1.7e-5) {
tmp = fma((t - 2.0), b, z);
} else if (y <= 6.5e+95) {
tmp = ((t + y) - 2.0) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -1.65e+58) tmp = t_1; elseif (y <= -0.0008) tmp = Float64(Float64(b - a) * t); elseif (y <= 5.6e-248) tmp = fma(-2.0, b, Float64(z + x)); elseif (y <= 7.1e-140) tmp = Float64(Float64(1.0 - t) * a); elseif (y <= 1.7e-5) tmp = fma(Float64(t - 2.0), b, z); elseif (y <= 6.5e+95) tmp = Float64(Float64(Float64(t + y) - 2.0) * b); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.65e+58], t$95$1, If[LessEqual[y, -0.0008], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 5.6e-248], N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.1e-140], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 1.7e-5], N[(N[(t - 2.0), $MachinePrecision] * b + z), $MachinePrecision], If[LessEqual[y, 6.5e+95], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -0.0008:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-248}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, z + x\right)\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{-140}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z\right)\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+95}:\\
\;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.64999999999999991e58 or 6.5e95 < y Initial program 89.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6464.9
Applied rewrites64.9%
if -1.64999999999999991e58 < y < -8.00000000000000038e-4Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.0
Applied rewrites68.0%
if -8.00000000000000038e-4 < y < 5.6000000000000002e-248Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites100.0%
Taylor expanded in a around 0
Applied rewrites69.6%
Taylor expanded in t around 0
Applied rewrites62.2%
if 5.6000000000000002e-248 < y < 7.09999999999999986e-140Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6461.6
Applied rewrites61.6%
if 7.09999999999999986e-140 < y < 1.7e-5Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites99.2%
Taylor expanded in a around 0
Applied rewrites79.7%
Taylor expanded in x around 0
Applied rewrites65.6%
if 1.7e-5 < y < 6.5e95Initial program 100.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6462.2
Applied rewrites62.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 t) a)))
(if (<= b -2e+68)
(* (- y 2.0) b)
(if (<= b -2700.0)
(+ z x)
(if (<= b -7.8e-255)
(* (- 1.0 y) z)
(if (<= b 9e-269)
t_1
(if (<= b 1.1e-158)
(+ z x)
(if (<= b 2.9e+131) t_1 (* (- t 2.0) b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (b <= -2e+68) {
tmp = (y - 2.0) * b;
} else if (b <= -2700.0) {
tmp = z + x;
} else if (b <= -7.8e-255) {
tmp = (1.0 - y) * z;
} else if (b <= 9e-269) {
tmp = t_1;
} else if (b <= 1.1e-158) {
tmp = z + x;
} else if (b <= 2.9e+131) {
tmp = t_1;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - t) * a
if (b <= (-2d+68)) then
tmp = (y - 2.0d0) * b
else if (b <= (-2700.0d0)) then
tmp = z + x
else if (b <= (-7.8d-255)) then
tmp = (1.0d0 - y) * z
else if (b <= 9d-269) then
tmp = t_1
else if (b <= 1.1d-158) then
tmp = z + x
else if (b <= 2.9d+131) then
tmp = t_1
else
tmp = (t - 2.0d0) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (b <= -2e+68) {
tmp = (y - 2.0) * b;
} else if (b <= -2700.0) {
tmp = z + x;
} else if (b <= -7.8e-255) {
tmp = (1.0 - y) * z;
} else if (b <= 9e-269) {
tmp = t_1;
} else if (b <= 1.1e-158) {
tmp = z + x;
} else if (b <= 2.9e+131) {
tmp = t_1;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - t) * a tmp = 0 if b <= -2e+68: tmp = (y - 2.0) * b elif b <= -2700.0: tmp = z + x elif b <= -7.8e-255: tmp = (1.0 - y) * z elif b <= 9e-269: tmp = t_1 elif b <= 1.1e-158: tmp = z + x elif b <= 2.9e+131: tmp = t_1 else: tmp = (t - 2.0) * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - t) * a) tmp = 0.0 if (b <= -2e+68) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= -2700.0) tmp = Float64(z + x); elseif (b <= -7.8e-255) tmp = Float64(Float64(1.0 - y) * z); elseif (b <= 9e-269) tmp = t_1; elseif (b <= 1.1e-158) tmp = Float64(z + x); elseif (b <= 2.9e+131) tmp = t_1; else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - t) * a; tmp = 0.0; if (b <= -2e+68) tmp = (y - 2.0) * b; elseif (b <= -2700.0) tmp = z + x; elseif (b <= -7.8e-255) tmp = (1.0 - y) * z; elseif (b <= 9e-269) tmp = t_1; elseif (b <= 1.1e-158) tmp = z + x; elseif (b <= 2.9e+131) tmp = t_1; else tmp = (t - 2.0) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[b, -2e+68], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, -2700.0], N[(z + x), $MachinePrecision], If[LessEqual[b, -7.8e-255], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, 9e-269], t$95$1, If[LessEqual[b, 1.1e-158], N[(z + x), $MachinePrecision], If[LessEqual[b, 2.9e+131], t$95$1, N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;b \leq -2 \cdot 10^{+68}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq -2700:\\
\;\;\;\;z + x\\
\mathbf{elif}\;b \leq -7.8 \cdot 10^{-255}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-158}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -1.99999999999999991e68Initial program 86.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6477.6
Applied rewrites77.6%
Taylor expanded in t around 0
Applied rewrites57.9%
if -1.99999999999999991e68 < b < -2700 or 9.0000000000000003e-269 < b < 1.1000000000000001e-158Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites80.8%
Taylor expanded in a around 0
Applied rewrites65.6%
Taylor expanded in x around 0
Applied rewrites26.1%
Taylor expanded in b around 0
Applied rewrites57.5%
if -2700 < b < -7.8000000000000001e-255Initial program 100.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6448.8
Applied rewrites48.8%
if -7.8000000000000001e-255 < b < 9.0000000000000003e-269 or 1.1000000000000001e-158 < b < 2.9000000000000001e131Initial program 95.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6447.0
Applied rewrites47.0%
if 2.9000000000000001e131 < b Initial program 100.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6489.9
Applied rewrites89.9%
Taylor expanded in y around 0
Applied rewrites66.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -1.65e+58)
t_1
(if (<= y -0.0008)
(* (- b a) t)
(if (<= y 5.6e-248)
(fma -2.0 b (+ z x))
(if (<= y 7.1e-140)
(* (- 1.0 t) a)
(if (<= y 6e+19) (fma (- t 2.0) b z) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -1.65e+58) {
tmp = t_1;
} else if (y <= -0.0008) {
tmp = (b - a) * t;
} else if (y <= 5.6e-248) {
tmp = fma(-2.0, b, (z + x));
} else if (y <= 7.1e-140) {
tmp = (1.0 - t) * a;
} else if (y <= 6e+19) {
tmp = fma((t - 2.0), b, z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -1.65e+58) tmp = t_1; elseif (y <= -0.0008) tmp = Float64(Float64(b - a) * t); elseif (y <= 5.6e-248) tmp = fma(-2.0, b, Float64(z + x)); elseif (y <= 7.1e-140) tmp = Float64(Float64(1.0 - t) * a); elseif (y <= 6e+19) tmp = fma(Float64(t - 2.0), b, z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.65e+58], t$95$1, If[LessEqual[y, -0.0008], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 5.6e-248], N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.1e-140], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 6e+19], N[(N[(t - 2.0), $MachinePrecision] * b + z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -0.0008:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-248}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, z + x\right)\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{-140}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.64999999999999991e58 or 6e19 < y Initial program 90.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6463.6
Applied rewrites63.6%
if -1.64999999999999991e58 < y < -8.00000000000000038e-4Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.0
Applied rewrites68.0%
if -8.00000000000000038e-4 < y < 5.6000000000000002e-248Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites100.0%
Taylor expanded in a around 0
Applied rewrites69.6%
Taylor expanded in t around 0
Applied rewrites62.2%
if 5.6000000000000002e-248 < y < 7.09999999999999986e-140Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6461.6
Applied rewrites61.6%
if 7.09999999999999986e-140 < y < 6e19Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites86.7%
Taylor expanded in a around 0
Applied rewrites73.4%
Taylor expanded in x around 0
Applied rewrites56.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -1.65e+58)
t_1
(if (<= y -0.0008)
(* (- b a) t)
(if (<= y -1.45e-221)
(+ z x)
(if (<= y 7.1e-140)
(* (- 1.0 t) a)
(if (<= y 6e+19) (fma (- t 2.0) b z) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -1.65e+58) {
tmp = t_1;
} else if (y <= -0.0008) {
tmp = (b - a) * t;
} else if (y <= -1.45e-221) {
tmp = z + x;
} else if (y <= 7.1e-140) {
tmp = (1.0 - t) * a;
} else if (y <= 6e+19) {
tmp = fma((t - 2.0), b, z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -1.65e+58) tmp = t_1; elseif (y <= -0.0008) tmp = Float64(Float64(b - a) * t); elseif (y <= -1.45e-221) tmp = Float64(z + x); elseif (y <= 7.1e-140) tmp = Float64(Float64(1.0 - t) * a); elseif (y <= 6e+19) tmp = fma(Float64(t - 2.0), b, z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.65e+58], t$95$1, If[LessEqual[y, -0.0008], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, -1.45e-221], N[(z + x), $MachinePrecision], If[LessEqual[y, 7.1e-140], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, 6e+19], N[(N[(t - 2.0), $MachinePrecision] * b + z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -0.0008:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-221}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{-140}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.64999999999999991e58 or 6e19 < y Initial program 90.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6463.6
Applied rewrites63.6%
if -1.64999999999999991e58 < y < -8.00000000000000038e-4Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.0
Applied rewrites68.0%
if -8.00000000000000038e-4 < y < -1.44999999999999997e-221Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites100.0%
Taylor expanded in a around 0
Applied rewrites78.3%
Taylor expanded in x around 0
Applied rewrites43.2%
Taylor expanded in b around 0
Applied rewrites52.5%
if -1.44999999999999997e-221 < y < 7.09999999999999986e-140Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6454.5
Applied rewrites54.5%
if 7.09999999999999986e-140 < y < 6e19Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites86.7%
Taylor expanded in a around 0
Applied rewrites73.4%
Taylor expanded in x around 0
Applied rewrites56.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.36e-40) (not (<= b 1.15e-46))) (fma (- b z) y (fma (- t 2.0) b (fma (- 1.0 t) a z))) (fma (- 1.0 y) z (fma (- 1.0 t) a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.36e-40) || !(b <= 1.15e-46)) {
tmp = fma((b - z), y, fma((t - 2.0), b, fma((1.0 - t), a, z)));
} else {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.36e-40) || !(b <= 1.15e-46)) tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, fma(Float64(1.0 - t), a, z))); else tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.36e-40], N[Not[LessEqual[b, 1.15e-46]], $MachinePrecision]], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(N[(1.0 - t), $MachinePrecision] * a + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.36 \cdot 10^{-40} \lor \neg \left(b \leq 1.15 \cdot 10^{-46}\right):\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, \mathsf{fma}\left(1 - t, a, z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\end{array}
\end{array}
if b < -1.3599999999999999e-40 or 1.15e-46 < b Initial program 93.1%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites99.3%
Taylor expanded in x around 0
Applied rewrites91.9%
if -1.3599999999999999e-40 < b < 1.15e-46Initial program 100.0%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites100.0%
Taylor expanded in b around 0
Applied rewrites100.0%
Final simplification95.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 t) a)))
(if (<= b -2e+68)
(* (- y 2.0) b)
(if (<= b -4.1e-255)
(+ z x)
(if (<= b 9e-269)
t_1
(if (<= b 1.1e-158)
(+ z x)
(if (<= b 2.9e+131) t_1 (* (- t 2.0) b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (b <= -2e+68) {
tmp = (y - 2.0) * b;
} else if (b <= -4.1e-255) {
tmp = z + x;
} else if (b <= 9e-269) {
tmp = t_1;
} else if (b <= 1.1e-158) {
tmp = z + x;
} else if (b <= 2.9e+131) {
tmp = t_1;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - t) * a
if (b <= (-2d+68)) then
tmp = (y - 2.0d0) * b
else if (b <= (-4.1d-255)) then
tmp = z + x
else if (b <= 9d-269) then
tmp = t_1
else if (b <= 1.1d-158) then
tmp = z + x
else if (b <= 2.9d+131) then
tmp = t_1
else
tmp = (t - 2.0d0) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (b <= -2e+68) {
tmp = (y - 2.0) * b;
} else if (b <= -4.1e-255) {
tmp = z + x;
} else if (b <= 9e-269) {
tmp = t_1;
} else if (b <= 1.1e-158) {
tmp = z + x;
} else if (b <= 2.9e+131) {
tmp = t_1;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - t) * a tmp = 0 if b <= -2e+68: tmp = (y - 2.0) * b elif b <= -4.1e-255: tmp = z + x elif b <= 9e-269: tmp = t_1 elif b <= 1.1e-158: tmp = z + x elif b <= 2.9e+131: tmp = t_1 else: tmp = (t - 2.0) * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - t) * a) tmp = 0.0 if (b <= -2e+68) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= -4.1e-255) tmp = Float64(z + x); elseif (b <= 9e-269) tmp = t_1; elseif (b <= 1.1e-158) tmp = Float64(z + x); elseif (b <= 2.9e+131) tmp = t_1; else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - t) * a; tmp = 0.0; if (b <= -2e+68) tmp = (y - 2.0) * b; elseif (b <= -4.1e-255) tmp = z + x; elseif (b <= 9e-269) tmp = t_1; elseif (b <= 1.1e-158) tmp = z + x; elseif (b <= 2.9e+131) tmp = t_1; else tmp = (t - 2.0) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[b, -2e+68], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, -4.1e-255], N[(z + x), $MachinePrecision], If[LessEqual[b, 9e-269], t$95$1, If[LessEqual[b, 1.1e-158], N[(z + x), $MachinePrecision], If[LessEqual[b, 2.9e+131], t$95$1, N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;b \leq -2 \cdot 10^{+68}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq -4.1 \cdot 10^{-255}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-269}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-158}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -1.99999999999999991e68Initial program 86.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6477.6
Applied rewrites77.6%
Taylor expanded in t around 0
Applied rewrites57.9%
if -1.99999999999999991e68 < b < -4.1e-255 or 9.0000000000000003e-269 < b < 1.1000000000000001e-158Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites73.4%
Taylor expanded in a around 0
Applied rewrites53.0%
Taylor expanded in x around 0
Applied rewrites25.4%
Taylor expanded in b around 0
Applied rewrites46.6%
if -4.1e-255 < b < 9.0000000000000003e-269 or 1.1000000000000001e-158 < b < 2.9000000000000001e131Initial program 95.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6447.0
Applied rewrites47.0%
if 2.9000000000000001e131 < b Initial program 100.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6489.9
Applied rewrites89.9%
Taylor expanded in y around 0
Applied rewrites66.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 t) a x)))
(if (or (<= b -2000.0) (not (<= b 2.4e-27)))
(fma (- (+ t y) 2.0) b t_1)
(fma (- 1.0 y) z t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - t), a, x);
double tmp;
if ((b <= -2000.0) || !(b <= 2.4e-27)) {
tmp = fma(((t + y) - 2.0), b, t_1);
} else {
tmp = fma((1.0 - y), z, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - t), a, x) tmp = 0.0 if ((b <= -2000.0) || !(b <= 2.4e-27)) tmp = fma(Float64(Float64(t + y) - 2.0), b, t_1); else tmp = fma(Float64(1.0 - y), z, t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]}, If[Or[LessEqual[b, -2000.0], N[Not[LessEqual[b, 2.4e-27]], $MachinePrecision]], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + t$95$1), $MachinePrecision], N[(N[(1.0 - y), $MachinePrecision] * z + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{if}\;b \leq -2000 \lor \neg \left(b \leq 2.4 \cdot 10^{-27}\right):\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, t\_1\right)\\
\end{array}
\end{array}
if b < -2e3 or 2.40000000000000002e-27 < b Initial program 93.2%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites91.9%
Taylor expanded in z around 0
Applied rewrites87.3%
if -2e3 < b < 2.40000000000000002e-27Initial program 99.2%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites99.2%
Taylor expanded in b around 0
Applied rewrites96.8%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ t y) 2.0)) (t_2 (fma (- 1.0 t) a x)))
(if (<= b -1.72e-40)
(fma t_1 b (- x (* (- y 1.0) z)))
(if (<= b 2.4e-27) (fma (- 1.0 y) z t_2) (fma t_1 b t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + y) - 2.0;
double t_2 = fma((1.0 - t), a, x);
double tmp;
if (b <= -1.72e-40) {
tmp = fma(t_1, b, (x - ((y - 1.0) * z)));
} else if (b <= 2.4e-27) {
tmp = fma((1.0 - y), z, t_2);
} else {
tmp = fma(t_1, b, t_2);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + y) - 2.0) t_2 = fma(Float64(1.0 - t), a, x) tmp = 0.0 if (b <= -1.72e-40) tmp = fma(t_1, b, Float64(x - Float64(Float64(y - 1.0) * z))); elseif (b <= 2.4e-27) tmp = fma(Float64(1.0 - y), z, t_2); else tmp = fma(t_1, b, t_2); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]}, If[LessEqual[b, -1.72e-40], N[(t$95$1 * b + N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.4e-27], N[(N[(1.0 - y), $MachinePrecision] * z + t$95$2), $MachinePrecision], N[(t$95$1 * b + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + y\right) - 2\\
t_2 := \mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{if}\;b \leq -1.72 \cdot 10^{-40}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, x - \left(y - 1\right) \cdot z\right)\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, t\_2\right)\\
\end{array}
\end{array}
if b < -1.7199999999999999e-40Initial program 91.3%
Taylor expanded in a around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6485.8
Applied rewrites85.8%
if -1.7199999999999999e-40 < b < 2.40000000000000002e-27Initial program 99.1%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites99.1%
Taylor expanded in b around 0
Applied rewrites99.1%
if 2.40000000000000002e-27 < b Initial program 95.8%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites92.1%
Taylor expanded in z around 0
Applied rewrites88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -58000000000000.0)
t_1
(if (<= t -1.1e-202)
(+ z x)
(if (<= t 1.85e-7) (* (- b z) y) (if (<= t 4.4e+42) (+ z x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -58000000000000.0) {
tmp = t_1;
} else if (t <= -1.1e-202) {
tmp = z + x;
} else if (t <= 1.85e-7) {
tmp = (b - z) * y;
} else if (t <= 4.4e+42) {
tmp = z + x;
} 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 - a) * t
if (t <= (-58000000000000.0d0)) then
tmp = t_1
else if (t <= (-1.1d-202)) then
tmp = z + x
else if (t <= 1.85d-7) then
tmp = (b - z) * y
else if (t <= 4.4d+42) then
tmp = z + x
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 - a) * t;
double tmp;
if (t <= -58000000000000.0) {
tmp = t_1;
} else if (t <= -1.1e-202) {
tmp = z + x;
} else if (t <= 1.85e-7) {
tmp = (b - z) * y;
} else if (t <= 4.4e+42) {
tmp = z + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -58000000000000.0: tmp = t_1 elif t <= -1.1e-202: tmp = z + x elif t <= 1.85e-7: tmp = (b - z) * y elif t <= 4.4e+42: tmp = z + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -58000000000000.0) tmp = t_1; elseif (t <= -1.1e-202) tmp = Float64(z + x); elseif (t <= 1.85e-7) tmp = Float64(Float64(b - z) * y); elseif (t <= 4.4e+42) tmp = Float64(z + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -58000000000000.0) tmp = t_1; elseif (t <= -1.1e-202) tmp = z + x; elseif (t <= 1.85e-7) tmp = (b - z) * y; elseif (t <= 4.4e+42) tmp = z + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -58000000000000.0], t$95$1, If[LessEqual[t, -1.1e-202], N[(z + x), $MachinePrecision], If[LessEqual[t, 1.85e-7], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 4.4e+42], N[(z + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -58000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-202}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-7}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+42}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.8e13 or 4.4000000000000003e42 < t Initial program 94.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.6
Applied rewrites68.6%
if -5.8e13 < t < -1.10000000000000004e-202 or 1.85000000000000002e-7 < t < 4.4000000000000003e42Initial program 97.8%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites78.2%
Taylor expanded in a around 0
Applied rewrites62.4%
Taylor expanded in x around 0
Applied rewrites19.9%
Taylor expanded in b around 0
Applied rewrites54.1%
if -1.10000000000000004e-202 < t < 1.85000000000000002e-7Initial program 97.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6441.6
Applied rewrites41.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -58000000000000.0)
t_1
(if (<= t -5.4e-292)
(+ z x)
(if (<= t 1.75e-7) (* (- y 2.0) b) (if (<= t 4.4e+42) (+ z x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -58000000000000.0) {
tmp = t_1;
} else if (t <= -5.4e-292) {
tmp = z + x;
} else if (t <= 1.75e-7) {
tmp = (y - 2.0) * b;
} else if (t <= 4.4e+42) {
tmp = z + x;
} 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 - a) * t
if (t <= (-58000000000000.0d0)) then
tmp = t_1
else if (t <= (-5.4d-292)) then
tmp = z + x
else if (t <= 1.75d-7) then
tmp = (y - 2.0d0) * b
else if (t <= 4.4d+42) then
tmp = z + x
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 - a) * t;
double tmp;
if (t <= -58000000000000.0) {
tmp = t_1;
} else if (t <= -5.4e-292) {
tmp = z + x;
} else if (t <= 1.75e-7) {
tmp = (y - 2.0) * b;
} else if (t <= 4.4e+42) {
tmp = z + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -58000000000000.0: tmp = t_1 elif t <= -5.4e-292: tmp = z + x elif t <= 1.75e-7: tmp = (y - 2.0) * b elif t <= 4.4e+42: tmp = z + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -58000000000000.0) tmp = t_1; elseif (t <= -5.4e-292) tmp = Float64(z + x); elseif (t <= 1.75e-7) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 4.4e+42) tmp = Float64(z + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -58000000000000.0) tmp = t_1; elseif (t <= -5.4e-292) tmp = z + x; elseif (t <= 1.75e-7) tmp = (y - 2.0) * b; elseif (t <= 4.4e+42) tmp = z + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -58000000000000.0], t$95$1, If[LessEqual[t, -5.4e-292], N[(z + x), $MachinePrecision], If[LessEqual[t, 1.75e-7], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 4.4e+42], N[(z + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -58000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.4 \cdot 10^{-292}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-7}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+42}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.8e13 or 4.4000000000000003e42 < t Initial program 94.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.6
Applied rewrites68.6%
if -5.8e13 < t < -5.3999999999999998e-292 or 1.74999999999999992e-7 < t < 4.4000000000000003e42Initial program 98.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites71.9%
Taylor expanded in a around 0
Applied rewrites56.2%
Taylor expanded in x around 0
Applied rewrites20.9%
Taylor expanded in b around 0
Applied rewrites48.6%
if -5.3999999999999998e-292 < t < 1.74999999999999992e-7Initial program 96.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6435.8
Applied rewrites35.8%
Taylor expanded in t around 0
Applied rewrites35.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a) t)))
(if (<= t -5e+256)
t_1
(if (<= t -1.66e+103)
(* b t)
(if (<= t 6.8e+77) (+ z x) (if (<= t 9e+166) t_1 (* b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a * t;
double tmp;
if (t <= -5e+256) {
tmp = t_1;
} else if (t <= -1.66e+103) {
tmp = b * t;
} else if (t <= 6.8e+77) {
tmp = z + x;
} else if (t <= 9e+166) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -a * t
if (t <= (-5d+256)) then
tmp = t_1
else if (t <= (-1.66d+103)) then
tmp = b * t
else if (t <= 6.8d+77) then
tmp = z + x
else if (t <= 9d+166) then
tmp = t_1
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 t_1 = -a * t;
double tmp;
if (t <= -5e+256) {
tmp = t_1;
} else if (t <= -1.66e+103) {
tmp = b * t;
} else if (t <= 6.8e+77) {
tmp = z + x;
} else if (t <= 9e+166) {
tmp = t_1;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a * t tmp = 0 if t <= -5e+256: tmp = t_1 elif t <= -1.66e+103: tmp = b * t elif t <= 6.8e+77: tmp = z + x elif t <= 9e+166: tmp = t_1 else: tmp = b * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) * t) tmp = 0.0 if (t <= -5e+256) tmp = t_1; elseif (t <= -1.66e+103) tmp = Float64(b * t); elseif (t <= 6.8e+77) tmp = Float64(z + x); elseif (t <= 9e+166) tmp = t_1; else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a * t; tmp = 0.0; if (t <= -5e+256) tmp = t_1; elseif (t <= -1.66e+103) tmp = b * t; elseif (t <= 6.8e+77) tmp = z + x; elseif (t <= 9e+166) tmp = t_1; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) * t), $MachinePrecision]}, If[LessEqual[t, -5e+256], t$95$1, If[LessEqual[t, -1.66e+103], N[(b * t), $MachinePrecision], If[LessEqual[t, 6.8e+77], N[(z + x), $MachinePrecision], If[LessEqual[t, 9e+166], t$95$1, N[(b * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-a\right) \cdot t\\
\mathbf{if}\;t \leq -5 \cdot 10^{+256}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.66 \cdot 10^{+103}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+77}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -5.00000000000000015e256 or 6.79999999999999993e77 < t < 9.00000000000000061e166Initial program 88.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6478.1
Applied rewrites78.1%
Taylor expanded in a around inf
Applied rewrites57.2%
if -5.00000000000000015e256 < t < -1.6600000000000001e103 or 9.00000000000000061e166 < t Initial program 94.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6461.2
Applied rewrites61.2%
Taylor expanded in t around inf
Applied rewrites61.4%
if -1.6600000000000001e103 < t < 6.79999999999999993e77Initial program 98.2%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites66.7%
Taylor expanded in a around 0
Applied rewrites45.0%
Taylor expanded in x around 0
Applied rewrites21.7%
Taylor expanded in b around 0
Applied rewrites34.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.8e+68) (not (<= b 2.5e+145))) (fma (- (+ t y) 2.0) b (* (- a) t)) (fma (- 1.0 y) z (fma (- 1.0 t) a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.8e+68) || !(b <= 2.5e+145)) {
tmp = fma(((t + y) - 2.0), b, (-a * t));
} else {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.8e+68) || !(b <= 2.5e+145)) tmp = fma(Float64(Float64(t + y) - 2.0), b, Float64(Float64(-a) * t)); else tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.8e+68], N[Not[LessEqual[b, 2.5e+145]], $MachinePrecision]], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[((-a) * t), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.8 \cdot 10^{+68} \lor \neg \left(b \leq 2.5 \cdot 10^{+145}\right):\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, \left(-a\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\end{array}
\end{array}
if b < -5.80000000000000023e68 or 2.49999999999999983e145 < b Initial program 92.3%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites100.0%
Taylor expanded in x around 0
Applied rewrites97.7%
Taylor expanded in z around 0
Applied rewrites93.6%
Taylor expanded in t around inf
Applied rewrites90.1%
if -5.80000000000000023e68 < b < 2.49999999999999983e145Initial program 97.7%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites99.4%
Taylor expanded in b around 0
Applied rewrites86.9%
Final simplification87.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.5e+70) (not (<= b 2.5e+145))) (* (- (+ t y) 2.0) b) (fma (- 1.0 y) z (fma (- 1.0 t) a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.5e+70) || !(b <= 2.5e+145)) {
tmp = ((t + y) - 2.0) * b;
} else {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.5e+70) || !(b <= 2.5e+145)) tmp = Float64(Float64(Float64(t + y) - 2.0) * b); else tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.5e+70], N[Not[LessEqual[b, 2.5e+145]], $MachinePrecision]], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5 \cdot 10^{+70} \lor \neg \left(b \leq 2.5 \cdot 10^{+145}\right):\\
\;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\end{array}
\end{array}
if b < -1.49999999999999988e70 or 2.49999999999999983e145 < b Initial program 92.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6485.0
Applied rewrites85.0%
if -1.49999999999999988e70 < b < 2.49999999999999983e145Initial program 97.7%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites99.4%
Taylor expanded in b around 0
Applied rewrites86.9%
Final simplification86.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.3e+68) (not (<= b 2.5e+145))) (* (- (+ t y) 2.0) b) (+ (fma (- 1.0 t) a z) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.3e+68) || !(b <= 2.5e+145)) {
tmp = ((t + y) - 2.0) * b;
} else {
tmp = fma((1.0 - t), a, z) + x;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.3e+68) || !(b <= 2.5e+145)) tmp = Float64(Float64(Float64(t + y) - 2.0) * b); else tmp = Float64(fma(Float64(1.0 - t), a, z) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.3e+68], N[Not[LessEqual[b, 2.5e+145]], $MachinePrecision]], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision], N[(N[(N[(1.0 - t), $MachinePrecision] * a + z), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+68} \lor \neg \left(b \leq 2.5 \cdot 10^{+145}\right):\\
\;\;\;\;\left(\left(t + y\right) - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z\right) + x\\
\end{array}
\end{array}
if b < -2.3e68 or 2.49999999999999983e145 < b Initial program 92.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6485.0
Applied rewrites85.0%
if -2.3e68 < b < 2.49999999999999983e145Initial program 97.7%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites76.8%
Taylor expanded in a around 0
Applied rewrites45.2%
Taylor expanded in x around 0
Applied rewrites22.6%
Taylor expanded in b around 0
Applied rewrites68.7%
Final simplification73.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -58000000000000.0) (not (<= t 4.4e+42))) (* (- b a) t) (+ (fma -2.0 b (+ z x)) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -58000000000000.0) || !(t <= 4.4e+42)) {
tmp = (b - a) * t;
} else {
tmp = fma(-2.0, b, (z + x)) + a;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -58000000000000.0) || !(t <= 4.4e+42)) tmp = Float64(Float64(b - a) * t); else tmp = Float64(fma(-2.0, b, Float64(z + x)) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -58000000000000.0], N[Not[LessEqual[t, 4.4e+42]], $MachinePrecision]], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], N[(N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -58000000000000 \lor \neg \left(t \leq 4.4 \cdot 10^{+42}\right):\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\
\end{array}
\end{array}
if t < -5.8e13 or 4.4000000000000003e42 < t Initial program 94.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.6
Applied rewrites68.6%
if -5.8e13 < t < 4.4000000000000003e42Initial program 97.8%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites64.2%
Taylor expanded in t around 0
Applied rewrites63.7%
Final simplification66.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.7e+68) (not (<= b 2.6e-31))) (* (- t 2.0) b) (+ z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.7e+68) || !(b <= 2.6e-31)) {
tmp = (t - 2.0) * b;
} else {
tmp = z + 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.7d+68)) .or. (.not. (b <= 2.6d-31))) then
tmp = (t - 2.0d0) * b
else
tmp = z + 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.7e+68) || !(b <= 2.6e-31)) {
tmp = (t - 2.0) * b;
} else {
tmp = z + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.7e+68) or not (b <= 2.6e-31): tmp = (t - 2.0) * b else: tmp = z + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.7e+68) || !(b <= 2.6e-31)) tmp = Float64(Float64(t - 2.0) * b); else tmp = Float64(z + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.7e+68) || ~((b <= 2.6e-31))) tmp = (t - 2.0) * b; else tmp = z + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.7e+68], N[Not[LessEqual[b, 2.6e-31]], $MachinePrecision]], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], N[(z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.7 \cdot 10^{+68} \lor \neg \left(b \leq 2.6 \cdot 10^{-31}\right):\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;z + x\\
\end{array}
\end{array}
if b < -1.70000000000000008e68 or 2.59999999999999995e-31 < b Initial program 92.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6469.6
Applied rewrites69.6%
Taylor expanded in y around 0
Applied rewrites47.6%
if -1.70000000000000008e68 < b < 2.59999999999999995e-31Initial program 99.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites77.4%
Taylor expanded in a around 0
Applied rewrites44.7%
Taylor expanded in x around 0
Applied rewrites18.4%
Taylor expanded in b around 0
Applied rewrites40.6%
Final simplification43.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2e+68) (* (- y 2.0) b) (if (<= b 2.6e-31) (+ z x) (* (- t 2.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2e+68) {
tmp = (y - 2.0) * b;
} else if (b <= 2.6e-31) {
tmp = z + x;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2d+68)) then
tmp = (y - 2.0d0) * b
else if (b <= 2.6d-31) then
tmp = z + x
else
tmp = (t - 2.0d0) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2e+68) {
tmp = (y - 2.0) * b;
} else if (b <= 2.6e-31) {
tmp = z + x;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2e+68: tmp = (y - 2.0) * b elif b <= 2.6e-31: tmp = z + x else: tmp = (t - 2.0) * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2e+68) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= 2.6e-31) tmp = Float64(z + x); else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2e+68) tmp = (y - 2.0) * b; elseif (b <= 2.6e-31) tmp = z + x; else tmp = (t - 2.0) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2e+68], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 2.6e-31], N[(z + x), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{+68}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-31}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -1.99999999999999991e68Initial program 86.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6477.6
Applied rewrites77.6%
Taylor expanded in t around 0
Applied rewrites57.9%
if -1.99999999999999991e68 < b < 2.59999999999999995e-31Initial program 99.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites77.4%
Taylor expanded in a around 0
Applied rewrites44.7%
Taylor expanded in x around 0
Applied rewrites18.4%
Taylor expanded in b around 0
Applied rewrites40.6%
if 2.59999999999999995e-31 < b Initial program 95.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6464.7
Applied rewrites64.7%
Taylor expanded in y around 0
Applied rewrites47.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.66e+103) (not (<= t 2.7e+101))) (* b t) (+ z x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.66e+103) || !(t <= 2.7e+101)) {
tmp = b * t;
} else {
tmp = z + 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 ((t <= (-1.66d+103)) .or. (.not. (t <= 2.7d+101))) then
tmp = b * t
else
tmp = z + 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 ((t <= -1.66e+103) || !(t <= 2.7e+101)) {
tmp = b * t;
} else {
tmp = z + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.66e+103) or not (t <= 2.7e+101): tmp = b * t else: tmp = z + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.66e+103) || !(t <= 2.7e+101)) tmp = Float64(b * t); else tmp = Float64(z + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.66e+103) || ~((t <= 2.7e+101))) tmp = b * t; else tmp = z + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.66e+103], N[Not[LessEqual[t, 2.7e+101]], $MachinePrecision]], N[(b * t), $MachinePrecision], N[(z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.66 \cdot 10^{+103} \lor \neg \left(t \leq 2.7 \cdot 10^{+101}\right):\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;z + x\\
\end{array}
\end{array}
if t < -1.6600000000000001e103 or 2.70000000000000006e101 < t Initial program 92.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6449.9
Applied rewrites49.9%
Taylor expanded in t around inf
Applied rewrites49.0%
if -1.6600000000000001e103 < t < 2.70000000000000006e101Initial program 98.2%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites67.3%
Taylor expanded in a around 0
Applied rewrites44.3%
Taylor expanded in x around 0
Applied rewrites21.4%
Taylor expanded in b around 0
Applied rewrites34.3%
Final simplification39.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.12e+78) (* b y) (if (<= b 2.6e-31) (+ z x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.12e+78) {
tmp = b * y;
} else if (b <= 2.6e-31) {
tmp = z + 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 <= (-1.12d+78)) then
tmp = b * y
else if (b <= 2.6d-31) then
tmp = z + 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 <= -1.12e+78) {
tmp = b * y;
} else if (b <= 2.6e-31) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.12e+78: tmp = b * y elif b <= 2.6e-31: tmp = z + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.12e+78) tmp = Float64(b * y); elseif (b <= 2.6e-31) tmp = Float64(z + 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 <= -1.12e+78) tmp = b * y; elseif (b <= 2.6e-31) tmp = z + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.12e+78], N[(b * y), $MachinePrecision], If[LessEqual[b, 2.6e-31], N[(z + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.12 \cdot 10^{+78}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-31}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -1.12e78Initial program 85.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6476.5
Applied rewrites76.5%
Taylor expanded in y around inf
Applied rewrites37.2%
if -1.12e78 < b < 2.59999999999999995e-31Initial program 99.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites77.7%
Taylor expanded in a around 0
Applied rewrites45.5%
Taylor expanded in x around 0
Applied rewrites19.6%
Taylor expanded in b around 0
Applied rewrites40.1%
if 2.59999999999999995e-31 < b Initial program 95.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6464.7
Applied rewrites64.7%
Taylor expanded in t around inf
Applied rewrites41.2%
(FPCore (x y z t a b) :precision binary64 (+ z x))
double code(double x, double y, double z, double t, double a, double b) {
return z + x;
}
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 = z + x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return z + x;
}
def code(x, y, z, t, a, b): return z + x
function code(x, y, z, t, a, b) return Float64(z + x) end
function tmp = code(x, y, z, t, a, b) tmp = z + x; end
code[x_, y_, z_, t_, a_, b_] := N[(z + x), $MachinePrecision]
\begin{array}{l}
\\
z + x
\end{array}
Initial program 96.1%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate--l+N/A
Applied rewrites73.5%
Taylor expanded in a around 0
Applied rewrites49.5%
Taylor expanded in x around 0
Applied rewrites33.2%
Taylor expanded in b around 0
Applied rewrites26.7%
herbie shell --seed 2024326
(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)))