
(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
(if (<=
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b))
INFINITY)
(fma (- b z) y (fma (- t 2.0) b (- x (fma (- t 1.0) a (- z)))))
(fma (- b z) y (fma (- t 2.0) b (+ z x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)) <= ((double) INFINITY)) {
tmp = fma((b - z), y, fma((t - 2.0), b, (x - fma((t - 1.0), a, -z))));
} else {
tmp = fma((b - z), y, fma((t - 2.0), b, (z + x)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) <= Inf) tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, Float64(x - fma(Float64(t - 1.0), a, Float64(-z))))); else tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, Float64(z + x))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], Infinity], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(x - N[(N[(t - 1.0), $MachinePrecision] * a + (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, x - \mathsf{fma}\left(t - 1, a, -z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites40.0%
Taylor expanded in a around 0
Applied rewrites73.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- (+ t y) 2.0) b)))
(if (<= b -2.8e+130)
t_1
(if (<= b -7.6e+17)
(fma (- t 2.0) b (+ z x))
(if (<= b -2.25e-38)
(fma (- b z) y (fma -2.0 b (+ z x)))
(if (<= b 1.7e+137) (fma (- 1.0 y) z (- x (* a (- t 1.0)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t + y) - 2.0) * b;
double tmp;
if (b <= -2.8e+130) {
tmp = t_1;
} else if (b <= -7.6e+17) {
tmp = fma((t - 2.0), b, (z + x));
} else if (b <= -2.25e-38) {
tmp = fma((b - z), y, fma(-2.0, b, (z + x)));
} else if (b <= 1.7e+137) {
tmp = fma((1.0 - y), z, (x - (a * (t - 1.0))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t + y) - 2.0) * b) tmp = 0.0 if (b <= -2.8e+130) tmp = t_1; elseif (b <= -7.6e+17) tmp = fma(Float64(t - 2.0), b, Float64(z + x)); elseif (b <= -2.25e-38) tmp = fma(Float64(b - z), y, fma(-2.0, b, Float64(z + x))); elseif (b <= 1.7e+137) tmp = fma(Float64(1.0 - y), z, Float64(x - Float64(a * Float64(t - 1.0)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.8e+130], t$95$1, If[LessEqual[b, -7.6e+17], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.25e-38], N[(N[(b - z), $MachinePrecision] * y + N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e+137], N[(N[(1.0 - y), $MachinePrecision] * z + N[(x - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -2.8 \cdot 10^{+130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -7.6 \cdot 10^{+17}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
\mathbf{elif}\;b \leq -2.25 \cdot 10^{-38}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(-2, b, z + x\right)\right)\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{+137}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x - a \cdot \left(t - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.7999999999999999e130 or 1.69999999999999993e137 < b Initial program 87.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites90.1%
Taylor expanded in a around 0
Applied rewrites89.8%
Taylor expanded in b around -inf
Applied rewrites79.7%
if -2.7999999999999999e130 < b < -7.6e17Initial program 96.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6490.8
Applied rewrites90.8%
Taylor expanded in a around 0
Applied rewrites87.1%
if -7.6e17 < b < -2.25000000000000004e-38Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites100.0%
Taylor expanded in a around 0
Applied rewrites96.4%
Taylor expanded in t around 0
Applied rewrites96.4%
if -2.25000000000000004e-38 < b < 1.69999999999999993e137Initial program 97.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites99.3%
Taylor expanded in b around 0
Applied rewrites91.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.55e-38) (not (<= b 1.46e+40))) (fma (- b z) y (fma (- t 2.0) b (+ z x))) (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.55e-38) || !(b <= 1.46e+40)) {
tmp = fma((b - z), y, fma((t - 2.0), b, (z + x)));
} else {
tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (b * y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.55e-38) || !(b <= 1.46e+40)) tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, Float64(z + x))); else tmp = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(b * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.55e-38], N[Not[LessEqual[b, 1.46e+40]], $MachinePrecision]], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{-38} \lor \neg \left(b \leq 1.46 \cdot 10^{+40}\right):\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + b \cdot y\\
\end{array}
\end{array}
if b < -1.54999999999999991e-38 or 1.46e40 < b Initial program 91.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites94.3%
Taylor expanded in a around 0
Applied rewrites91.8%
if -1.54999999999999991e-38 < b < 1.46e40Initial program 97.4%
Taylor expanded in y around inf
lower-*.f6496.3
Applied rewrites96.3%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)) (t_2 (* (- b z) y)))
(if (<= y -4.2e+50)
t_2
(if (<= y -2.9e-210)
t_1
(if (<= y 1.45e-80)
(fma -2.0 b (+ z x))
(if (<= y 7e-17)
t_1
(if (<= y 320000000000.0) (* (- 1.0 t) a) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double t_2 = (b - z) * y;
double tmp;
if (y <= -4.2e+50) {
tmp = t_2;
} else if (y <= -2.9e-210) {
tmp = t_1;
} else if (y <= 1.45e-80) {
tmp = fma(-2.0, b, (z + x));
} else if (y <= 7e-17) {
tmp = t_1;
} else if (y <= 320000000000.0) {
tmp = (1.0 - t) * a;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) t_2 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -4.2e+50) tmp = t_2; elseif (y <= -2.9e-210) tmp = t_1; elseif (y <= 1.45e-80) tmp = fma(-2.0, b, Float64(z + x)); elseif (y <= 7e-17) tmp = t_1; elseif (y <= 320000000000.0) tmp = Float64(Float64(1.0 - t) * a); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.2e+50], t$95$2, If[LessEqual[y, -2.9e-210], t$95$1, If[LessEqual[y, 1.45e-80], N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-17], t$95$1, If[LessEqual[y, 320000000000.0], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
t_2 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+50}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-210}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-80}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, z + x\right)\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 320000000000:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -4.1999999999999999e50 or 3.2e11 < y Initial program 91.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.7
Applied rewrites67.7%
if -4.1999999999999999e50 < y < -2.90000000000000006e-210 or 1.44999999999999999e-80 < y < 7.0000000000000003e-17Initial program 95.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6451.7
Applied rewrites51.7%
if -2.90000000000000006e-210 < y < 1.44999999999999999e-80Initial program 98.1%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6498.1
Applied rewrites98.1%
Taylor expanded in a around 0
Applied rewrites83.8%
Taylor expanded in t around 0
Applied rewrites64.2%
if 7.0000000000000003e-17 < y < 3.2e11Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6471.5
Applied rewrites71.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 2.0) b)) (t_2 (fma (- z) y z)))
(if (<= b -3.6e+155)
(* (- y 2.0) b)
(if (<= b -12500000000000.0)
t_1
(if (<= b -2.9e-56)
t_2
(if (<= b 1.95e-139)
(* (- 1.0 t) a)
(if (<= b 1.15e+66) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 2.0) * b;
double t_2 = fma(-z, y, z);
double tmp;
if (b <= -3.6e+155) {
tmp = (y - 2.0) * b;
} else if (b <= -12500000000000.0) {
tmp = t_1;
} else if (b <= -2.9e-56) {
tmp = t_2;
} else if (b <= 1.95e-139) {
tmp = (1.0 - t) * a;
} else if (b <= 1.15e+66) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 2.0) * b) t_2 = fma(Float64(-z), y, z) tmp = 0.0 if (b <= -3.6e+155) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= -12500000000000.0) tmp = t_1; elseif (b <= -2.9e-56) tmp = t_2; elseif (b <= 1.95e-139) tmp = Float64(Float64(1.0 - t) * a); elseif (b <= 1.15e+66) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[((-z) * y + z), $MachinePrecision]}, If[LessEqual[b, -3.6e+155], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, -12500000000000.0], t$95$1, If[LessEqual[b, -2.9e-56], t$95$2, If[LessEqual[b, 1.95e-139], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 1.15e+66], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 2\right) \cdot b\\
t_2 := \mathsf{fma}\left(-z, y, z\right)\\
\mathbf{if}\;b \leq -3.6 \cdot 10^{+155}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq -12500000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.9 \cdot 10^{-56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{-139}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+66}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.60000000000000007e155Initial program 91.4%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites91.4%
Taylor expanded in a around 0
Applied rewrites92.7%
Taylor expanded in b around -inf
Applied rewrites84.9%
Taylor expanded in t around 0
Applied rewrites55.0%
if -3.60000000000000007e155 < b < -1.25e13 or 1.15e66 < b Initial program 89.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites94.2%
Taylor expanded in a around 0
Applied rewrites90.0%
Taylor expanded in b around -inf
Applied rewrites65.7%
Taylor expanded in y around 0
Applied rewrites47.9%
if -1.25e13 < b < -2.89999999999999991e-56 or 1.95000000000000005e-139 < b < 1.15e66Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites100.0%
Taylor expanded in a around 0
Applied rewrites84.7%
Taylor expanded in z around inf
Applied rewrites48.4%
if -2.89999999999999991e-56 < b < 1.95000000000000005e-139Initial program 96.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6448.9
Applied rewrites48.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- (+ t y) 2.0) b)))
(if (<= b -1.4e+132)
t_1
(if (<= b -1.55e-38)
(fma (- z) y (fma (- t 2.0) b (+ z x)))
(if (<= b 1.7e+137) (fma (- 1.0 y) z (- x (* a (- t 1.0)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t + y) - 2.0) * b;
double tmp;
if (b <= -1.4e+132) {
tmp = t_1;
} else if (b <= -1.55e-38) {
tmp = fma(-z, y, fma((t - 2.0), b, (z + x)));
} else if (b <= 1.7e+137) {
tmp = fma((1.0 - y), z, (x - (a * (t - 1.0))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t + y) - 2.0) * b) tmp = 0.0 if (b <= -1.4e+132) tmp = t_1; elseif (b <= -1.55e-38) tmp = fma(Float64(-z), y, fma(Float64(t - 2.0), b, Float64(z + x))); elseif (b <= 1.7e+137) tmp = fma(Float64(1.0 - y), z, Float64(x - Float64(a * Float64(t - 1.0)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.4e+132], t$95$1, If[LessEqual[b, -1.55e-38], N[((-z) * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e+137], N[(N[(1.0 - y), $MachinePrecision] * z + N[(x - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -1.4 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-38}:\\
\;\;\;\;\mathsf{fma}\left(-z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{+137}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x - a \cdot \left(t - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.4e132 or 1.69999999999999993e137 < b Initial program 87.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites90.1%
Taylor expanded in a around 0
Applied rewrites89.8%
Taylor expanded in b around -inf
Applied rewrites79.7%
if -1.4e132 < b < -1.54999999999999991e-38Initial program 97.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites100.0%
Taylor expanded in a around 0
Applied rewrites96.4%
Taylor expanded in z around inf
Applied rewrites84.0%
if -1.54999999999999991e-38 < b < 1.69999999999999993e137Initial program 97.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites99.3%
Taylor expanded in b around 0
Applied rewrites91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b z) y (fma -2.0 b (+ z x)))))
(if (<= y -3.8e-12)
t_1
(if (<= y 7e-17)
(fma (- t 2.0) b (+ z x))
(if (<= y 3.6e+73) (+ (- x (* a (- t 1.0))) (* b y)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - z), y, fma(-2.0, b, (z + x)));
double tmp;
if (y <= -3.8e-12) {
tmp = t_1;
} else if (y <= 7e-17) {
tmp = fma((t - 2.0), b, (z + x));
} else if (y <= 3.6e+73) {
tmp = (x - (a * (t - 1.0))) + (b * y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - z), y, fma(-2.0, b, Float64(z + x))) tmp = 0.0 if (y <= -3.8e-12) tmp = t_1; elseif (y <= 7e-17) tmp = fma(Float64(t - 2.0), b, Float64(z + x)); elseif (y <= 3.6e+73) tmp = Float64(Float64(x - Float64(a * Float64(t - 1.0))) + Float64(b * y)); 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 + N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e-12], t$95$1, If[LessEqual[y, 7e-17], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+73], N[(N[(x - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(-2, b, z + x\right)\right)\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-17}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+73}:\\
\;\;\;\;\left(x - a \cdot \left(t - 1\right)\right) + b \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.79999999999999996e-12 or 3.5999999999999999e73 < y Initial program 91.4%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites96.6%
Taylor expanded in a around 0
Applied rewrites81.8%
Taylor expanded in t around 0
Applied rewrites80.6%
if -3.79999999999999996e-12 < y < 7.0000000000000003e-17Initial program 96.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6496.3
Applied rewrites96.3%
Taylor expanded in a around 0
Applied rewrites79.5%
if 7.0000000000000003e-17 < y < 3.5999999999999999e73Initial program 96.8%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6440.2
Applied rewrites40.2%
Taylor expanded in y around inf
lower-*.f6434.0
Applied rewrites34.0%
Taylor expanded in a around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f6449.6
Applied rewrites49.6%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f6471.7
Applied rewrites71.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b z) y (fma -2.0 b (+ z x)))))
(if (<= y -3.8e-12)
t_1
(if (<= y 7e-17)
(fma (- t 2.0) b (+ z x))
(if (<= y 3400000000.0) (* (- 1.0 t) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - z), y, fma(-2.0, b, (z + x)));
double tmp;
if (y <= -3.8e-12) {
tmp = t_1;
} else if (y <= 7e-17) {
tmp = fma((t - 2.0), b, (z + x));
} else if (y <= 3400000000.0) {
tmp = (1.0 - t) * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - z), y, fma(-2.0, b, Float64(z + x))) tmp = 0.0 if (y <= -3.8e-12) tmp = t_1; elseif (y <= 7e-17) tmp = fma(Float64(t - 2.0), b, Float64(z + x)); elseif (y <= 3400000000.0) tmp = Float64(Float64(1.0 - t) * a); 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 + N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e-12], t$95$1, If[LessEqual[y, 7e-17], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3400000000.0], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(-2, b, z + x\right)\right)\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-17}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
\mathbf{elif}\;y \leq 3400000000:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.79999999999999996e-12 or 3.4e9 < y Initial program 92.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites96.4%
Taylor expanded in a around 0
Applied rewrites80.3%
Taylor expanded in t around 0
Applied rewrites77.2%
if -3.79999999999999996e-12 < y < 7.0000000000000003e-17Initial program 96.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6496.3
Applied rewrites96.3%
Taylor expanded in a around 0
Applied rewrites79.5%
if 7.0000000000000003e-17 < y < 3.4e9Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6471.5
Applied rewrites71.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.2e+238)
(* (- b z) y)
(if (or (<= y -0.0032) (not (<= y 7e-17)))
(+ (fma (- 1.0 y) z x) (* b y))
(fma (- t 2.0) b (+ z x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.2e+238) {
tmp = (b - z) * y;
} else if ((y <= -0.0032) || !(y <= 7e-17)) {
tmp = fma((1.0 - y), z, x) + (b * y);
} else {
tmp = fma((t - 2.0), b, (z + x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.2e+238) tmp = Float64(Float64(b - z) * y); elseif ((y <= -0.0032) || !(y <= 7e-17)) tmp = Float64(fma(Float64(1.0 - y), z, x) + Float64(b * y)); else tmp = fma(Float64(t - 2.0), b, Float64(z + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.2e+238], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[Or[LessEqual[y, -0.0032], N[Not[LessEqual[y, 7e-17]], $MachinePrecision]], N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+238}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;y \leq -0.0032 \lor \neg \left(y \leq 7 \cdot 10^{-17}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) + b \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
\end{array}
\end{array}
if y < -2.2e238Initial program 75.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6487.9
Applied rewrites87.9%
if -2.2e238 < y < -0.00320000000000000015 or 7.0000000000000003e-17 < y Initial program 94.6%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6445.6
Applied rewrites45.6%
Taylor expanded in y around inf
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in a around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f6471.5
Applied rewrites71.5%
Taylor expanded in y around 0
Applied rewrites71.5%
if -0.00320000000000000015 < y < 7.0000000000000003e-17Initial program 96.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6496.1
Applied rewrites96.1%
Taylor expanded in a around 0
Applied rewrites79.5%
Final simplification75.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- (+ t y) 2.0) b)))
(if (<= b -9.5e-10)
t_1
(if (<= b -1.18e-113)
(fma -2.0 b (+ z x))
(if (<= b 1.95e-137)
(* (- 1.0 t) a)
(if (<= b 8e+65) (* (- b z) y) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t + y) - 2.0) * b;
double tmp;
if (b <= -9.5e-10) {
tmp = t_1;
} else if (b <= -1.18e-113) {
tmp = fma(-2.0, b, (z + x));
} else if (b <= 1.95e-137) {
tmp = (1.0 - t) * a;
} else if (b <= 8e+65) {
tmp = (b - z) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t + y) - 2.0) * b) tmp = 0.0 if (b <= -9.5e-10) tmp = t_1; elseif (b <= -1.18e-113) tmp = fma(-2.0, b, Float64(z + x)); elseif (b <= 1.95e-137) tmp = Float64(Float64(1.0 - t) * a); elseif (b <= 8e+65) tmp = Float64(Float64(b - z) * y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -9.5e-10], t$95$1, If[LessEqual[b, -1.18e-113], N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.95e-137], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 8e+65], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -9.5 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.18 \cdot 10^{-113}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, z + x\right)\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{-137}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+65}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.50000000000000028e-10 or 7.9999999999999999e65 < b Initial program 90.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites93.7%
Taylor expanded in a around 0
Applied rewrites90.8%
Taylor expanded in b around -inf
Applied rewrites71.3%
if -9.50000000000000028e-10 < b < -1.18e-113Initial program 100.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6484.6
Applied rewrites84.6%
Taylor expanded in a around 0
Applied rewrites64.1%
Taylor expanded in t around 0
Applied rewrites64.2%
if -1.18e-113 < b < 1.95e-137Initial program 95.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6449.9
Applied rewrites49.9%
if 1.95e-137 < b < 7.9999999999999999e65Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6453.1
Applied rewrites53.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.6e-45) (not (<= b 4.1e-28))) (fma (- b z) y (fma (- t 2.0) b (+ z x))) (fma (- 1.0 y) z (- x (* a (- t 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.6e-45) || !(b <= 4.1e-28)) {
tmp = fma((b - z), y, fma((t - 2.0), b, (z + x)));
} else {
tmp = fma((1.0 - y), z, (x - (a * (t - 1.0))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.6e-45) || !(b <= 4.1e-28)) tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, Float64(z + x))); else tmp = fma(Float64(1.0 - y), z, Float64(x - Float64(a * Float64(t - 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.6e-45], N[Not[LessEqual[b, 4.1e-28]], $MachinePrecision]], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - y), $MachinePrecision] * z + N[(x - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{-45} \lor \neg \left(b \leq 4.1 \cdot 10^{-28}\right):\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x - a \cdot \left(t - 1\right)\right)\\
\end{array}
\end{array}
if b < -1.60000000000000004e-45 or 4.1000000000000002e-28 < b Initial program 92.2%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites94.8%
Taylor expanded in a around 0
Applied rewrites90.6%
if -1.60000000000000004e-45 < b < 4.1000000000000002e-28Initial program 97.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites99.0%
Taylor expanded in b around 0
Applied rewrites98.0%
Final simplification93.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.5)
(fma (- z) y (fma (- t 2.0) b (+ z x)))
(if (<= t 8.2e+78)
(fma (- b z) y (+ (fma -2.0 b (+ z x)) a))
(* (- b a) t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.5) {
tmp = fma(-z, y, fma((t - 2.0), b, (z + x)));
} else if (t <= 8.2e+78) {
tmp = fma((b - z), y, (fma(-2.0, b, (z + x)) + a));
} else {
tmp = (b - a) * t;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.5) tmp = fma(Float64(-z), y, fma(Float64(t - 2.0), b, Float64(z + x))); elseif (t <= 8.2e+78) tmp = fma(Float64(b - z), y, Float64(fma(-2.0, b, Float64(z + x)) + a)); else tmp = Float64(Float64(b - a) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.5], N[((-z) * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e+78], N[(N[(b - z), $MachinePrecision] * y + N[(N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5:\\
\;\;\;\;\mathsf{fma}\left(-z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(-2, b, z + x\right) + a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\end{array}
\end{array}
if t < -3.5Initial program 90.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites92.1%
Taylor expanded in a around 0
Applied rewrites75.5%
Taylor expanded in z around inf
Applied rewrites72.2%
if -3.5 < t < 8.1999999999999994e78Initial program 96.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites99.3%
Taylor expanded in t around 0
Applied rewrites96.0%
if 8.1999999999999994e78 < t Initial program 91.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6476.6
Applied rewrites76.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7.3e+25)
(* b y)
(if (<= y 1.3e-242)
(* b t)
(if (<= y 2.6e-68) (* 1.0 z) (if (<= y 1.52e+37) (* b t) (* (- y) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.3e+25) {
tmp = b * y;
} else if (y <= 1.3e-242) {
tmp = b * t;
} else if (y <= 2.6e-68) {
tmp = 1.0 * z;
} else if (y <= 1.52e+37) {
tmp = b * t;
} else {
tmp = -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) :: tmp
if (y <= (-7.3d+25)) then
tmp = b * y
else if (y <= 1.3d-242) then
tmp = b * t
else if (y <= 2.6d-68) then
tmp = 1.0d0 * z
else if (y <= 1.52d+37) then
tmp = b * t
else
tmp = -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 tmp;
if (y <= -7.3e+25) {
tmp = b * y;
} else if (y <= 1.3e-242) {
tmp = b * t;
} else if (y <= 2.6e-68) {
tmp = 1.0 * z;
} else if (y <= 1.52e+37) {
tmp = b * t;
} else {
tmp = -y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.3e+25: tmp = b * y elif y <= 1.3e-242: tmp = b * t elif y <= 2.6e-68: tmp = 1.0 * z elif y <= 1.52e+37: tmp = b * t else: tmp = -y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.3e+25) tmp = Float64(b * y); elseif (y <= 1.3e-242) tmp = Float64(b * t); elseif (y <= 2.6e-68) tmp = Float64(1.0 * z); elseif (y <= 1.52e+37) tmp = Float64(b * t); else tmp = Float64(Float64(-y) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7.3e+25) tmp = b * y; elseif (y <= 1.3e-242) tmp = b * t; elseif (y <= 2.6e-68) tmp = 1.0 * z; elseif (y <= 1.52e+37) tmp = b * t; else tmp = -y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.3e+25], N[(b * y), $MachinePrecision], If[LessEqual[y, 1.3e-242], N[(b * t), $MachinePrecision], If[LessEqual[y, 2.6e-68], N[(1.0 * z), $MachinePrecision], If[LessEqual[y, 1.52e+37], N[(b * t), $MachinePrecision], N[((-y) * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.3 \cdot 10^{+25}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-242}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-68}:\\
\;\;\;\;1 \cdot z\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{+37}:\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot z\\
\end{array}
\end{array}
if y < -7.29999999999999961e25Initial program 93.8%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites98.5%
Taylor expanded in a around 0
Applied rewrites82.8%
Taylor expanded in b around -inf
Applied rewrites45.1%
Taylor expanded in y around inf
Applied rewrites40.4%
if -7.29999999999999961e25 < y < 1.30000000000000009e-242 or 2.5999999999999998e-68 < y < 1.5200000000000001e37Initial program 96.4%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites96.4%
Taylor expanded in a around 0
Applied rewrites75.1%
Taylor expanded in b around -inf
Applied rewrites41.5%
Taylor expanded in t around inf
Applied rewrites32.7%
if 1.30000000000000009e-242 < y < 2.5999999999999998e-68Initial program 100.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6440.1
Applied rewrites40.1%
Taylor expanded in y around 0
Applied rewrites40.1%
if 1.5200000000000001e37 < y Initial program 87.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6443.5
Applied rewrites43.5%
Taylor expanded in y around inf
Applied rewrites43.5%
Final simplification37.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7.3e+25)
(* b y)
(if (<= y 1.3e-242)
(* b t)
(if (<= y 2.6e-68) (* 1.0 z) (if (<= y 4.1e+73) (* b t) (* b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.3e+25) {
tmp = b * y;
} else if (y <= 1.3e-242) {
tmp = b * t;
} else if (y <= 2.6e-68) {
tmp = 1.0 * z;
} else if (y <= 4.1e+73) {
tmp = b * t;
} else {
tmp = b * 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 (y <= (-7.3d+25)) then
tmp = b * y
else if (y <= 1.3d-242) then
tmp = b * t
else if (y <= 2.6d-68) then
tmp = 1.0d0 * z
else if (y <= 4.1d+73) then
tmp = b * t
else
tmp = b * 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 (y <= -7.3e+25) {
tmp = b * y;
} else if (y <= 1.3e-242) {
tmp = b * t;
} else if (y <= 2.6e-68) {
tmp = 1.0 * z;
} else if (y <= 4.1e+73) {
tmp = b * t;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.3e+25: tmp = b * y elif y <= 1.3e-242: tmp = b * t elif y <= 2.6e-68: tmp = 1.0 * z elif y <= 4.1e+73: tmp = b * t else: tmp = b * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.3e+25) tmp = Float64(b * y); elseif (y <= 1.3e-242) tmp = Float64(b * t); elseif (y <= 2.6e-68) tmp = Float64(1.0 * z); elseif (y <= 4.1e+73) tmp = Float64(b * t); else tmp = Float64(b * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -7.3e+25) tmp = b * y; elseif (y <= 1.3e-242) tmp = b * t; elseif (y <= 2.6e-68) tmp = 1.0 * z; elseif (y <= 4.1e+73) tmp = b * t; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.3e+25], N[(b * y), $MachinePrecision], If[LessEqual[y, 1.3e-242], N[(b * t), $MachinePrecision], If[LessEqual[y, 2.6e-68], N[(1.0 * z), $MachinePrecision], If[LessEqual[y, 4.1e+73], N[(b * t), $MachinePrecision], N[(b * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.3 \cdot 10^{+25}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-242}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-68}:\\
\;\;\;\;1 \cdot z\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+73}:\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if y < -7.29999999999999961e25 or 4.0999999999999998e73 < y Initial program 90.7%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites96.3%
Taylor expanded in a around 0
Applied rewrites82.4%
Taylor expanded in b around -inf
Applied rewrites41.9%
Taylor expanded in y around inf
Applied rewrites39.0%
if -7.29999999999999961e25 < y < 1.30000000000000009e-242 or 2.5999999999999998e-68 < y < 4.0999999999999998e73Initial program 95.9%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites95.9%
Taylor expanded in a around 0
Applied rewrites74.1%
Taylor expanded in b around -inf
Applied rewrites39.6%
Taylor expanded in t around inf
Applied rewrites30.8%
if 1.30000000000000009e-242 < y < 2.5999999999999998e-68Initial program 100.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6440.1
Applied rewrites40.1%
Taylor expanded in y around 0
Applied rewrites40.1%
Final simplification35.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -3.6e+155)
(* (- y 2.0) b)
(if (or (<= b -12500000000000.0) (not (<= b 1.15e+66)))
(* (- t 2.0) b)
(fma (- z) y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.6e+155) {
tmp = (y - 2.0) * b;
} else if ((b <= -12500000000000.0) || !(b <= 1.15e+66)) {
tmp = (t - 2.0) * b;
} else {
tmp = fma(-z, y, z);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.6e+155) tmp = Float64(Float64(y - 2.0) * b); elseif ((b <= -12500000000000.0) || !(b <= 1.15e+66)) tmp = Float64(Float64(t - 2.0) * b); else tmp = fma(Float64(-z), y, z); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.6e+155], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[Or[LessEqual[b, -12500000000000.0], N[Not[LessEqual[b, 1.15e+66]], $MachinePrecision]], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], N[((-z) * y + z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{+155}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq -12500000000000 \lor \neg \left(b \leq 1.15 \cdot 10^{+66}\right):\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-z, y, z\right)\\
\end{array}
\end{array}
if b < -3.60000000000000007e155Initial program 91.4%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites91.4%
Taylor expanded in a around 0
Applied rewrites92.7%
Taylor expanded in b around -inf
Applied rewrites84.9%
Taylor expanded in t around 0
Applied rewrites55.0%
if -3.60000000000000007e155 < b < -1.25e13 or 1.15e66 < b Initial program 89.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites94.2%
Taylor expanded in a around 0
Applied rewrites90.0%
Taylor expanded in b around -inf
Applied rewrites65.7%
Taylor expanded in y around 0
Applied rewrites47.9%
if -1.25e13 < b < 1.15e66Initial program 97.8%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites99.3%
Taylor expanded in a around 0
Applied rewrites66.6%
Taylor expanded in z around inf
Applied rewrites37.6%
Final simplification43.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -4.2e+50)
t_1
(if (<= y 7e-17)
(* (- b a) t)
(if (<= y 320000000000.0) (* (- 1.0 t) a) 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 <= -4.2e+50) {
tmp = t_1;
} else if (y <= 7e-17) {
tmp = (b - a) * t;
} else if (y <= 320000000000.0) {
tmp = (1.0 - t) * a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (b - z) * y
if (y <= (-4.2d+50)) then
tmp = t_1
else if (y <= 7d-17) then
tmp = (b - a) * t
else if (y <= 320000000000.0d0) then
tmp = (1.0d0 - t) * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -4.2e+50) {
tmp = t_1;
} else if (y <= 7e-17) {
tmp = (b - a) * t;
} else if (y <= 320000000000.0) {
tmp = (1.0 - t) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - z) * y tmp = 0 if y <= -4.2e+50: tmp = t_1 elif y <= 7e-17: tmp = (b - a) * t elif y <= 320000000000.0: tmp = (1.0 - t) * a 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 <= -4.2e+50) tmp = t_1; elseif (y <= 7e-17) tmp = Float64(Float64(b - a) * t); elseif (y <= 320000000000.0) tmp = Float64(Float64(1.0 - t) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - z) * y; tmp = 0.0; if (y <= -4.2e+50) tmp = t_1; elseif (y <= 7e-17) tmp = (b - a) * t; elseif (y <= 320000000000.0) tmp = (1.0 - t) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.2e+50], t$95$1, If[LessEqual[y, 7e-17], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 320000000000.0], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-17}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{elif}\;y \leq 320000000000:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.1999999999999999e50 or 3.2e11 < y Initial program 91.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.7
Applied rewrites67.7%
if -4.1999999999999999e50 < y < 7.0000000000000003e-17Initial program 96.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6442.3
Applied rewrites42.3%
if 7.0000000000000003e-17 < y < 3.2e11Initial program 100.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6471.5
Applied rewrites71.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -14500000000000.0)
t_1
(if (<= t 2.8e-170)
(* (- y 2.0) b)
(if (<= t 4.5e+76) (fma (- z) y z) 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 <= -14500000000000.0) {
tmp = t_1;
} else if (t <= 2.8e-170) {
tmp = (y - 2.0) * b;
} else if (t <= 4.5e+76) {
tmp = fma(-z, y, z);
} 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 <= -14500000000000.0) tmp = t_1; elseif (t <= 2.8e-170) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 4.5e+76) tmp = fma(Float64(-z), y, z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -14500000000000.0], t$95$1, If[LessEqual[t, 2.8e-170], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 4.5e+76], N[((-z) * y + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -14500000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-170}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+76}:\\
\;\;\;\;\mathsf{fma}\left(-z, y, z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.45e13 or 4.4999999999999997e76 < t Initial program 90.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.9
Applied rewrites68.9%
if -1.45e13 < t < 2.79999999999999995e-170Initial program 98.9%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites100.0%
Taylor expanded in a around 0
Applied rewrites85.2%
Taylor expanded in b around -inf
Applied rewrites40.2%
Taylor expanded in t around 0
Applied rewrites38.2%
if 2.79999999999999995e-170 < t < 4.4999999999999997e76Initial program 93.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites98.4%
Taylor expanded in a around 0
Applied rewrites77.5%
Taylor expanded in z around inf
Applied rewrites34.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.8e+48) (not (<= y 3.2e+36))) (* (- b z) y) (fma (- t 2.0) b (+ z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.8e+48) || !(y <= 3.2e+36)) {
tmp = (b - z) * y;
} else {
tmp = fma((t - 2.0), b, (z + x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.8e+48) || !(y <= 3.2e+36)) tmp = Float64(Float64(b - z) * y); else tmp = fma(Float64(t - 2.0), b, Float64(z + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.8e+48], N[Not[LessEqual[y, 3.2e+36]], $MachinePrecision]], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+48} \lor \neg \left(y \leq 3.2 \cdot 10^{+36}\right):\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
\end{array}
\end{array}
if y < -7.8000000000000002e48 or 3.1999999999999999e36 < y Initial program 90.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.2
Applied rewrites70.2%
if -7.8000000000000002e48 < y < 3.1999999999999999e36Initial program 97.1%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6491.2
Applied rewrites91.2%
Taylor expanded in a around 0
Applied rewrites70.8%
Final simplification70.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.3e+51) (* b y) (if (<= y 1.6e+36) (* (- t 2.0) b) (* (- y) z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.3e+51) {
tmp = b * y;
} else if (y <= 1.6e+36) {
tmp = (t - 2.0) * b;
} else {
tmp = -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) :: tmp
if (y <= (-1.3d+51)) then
tmp = b * y
else if (y <= 1.6d+36) then
tmp = (t - 2.0d0) * b
else
tmp = -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 tmp;
if (y <= -1.3e+51) {
tmp = b * y;
} else if (y <= 1.6e+36) {
tmp = (t - 2.0) * b;
} else {
tmp = -y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.3e+51: tmp = b * y elif y <= 1.6e+36: tmp = (t - 2.0) * b else: tmp = -y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.3e+51) tmp = Float64(b * y); elseif (y <= 1.6e+36) tmp = Float64(Float64(t - 2.0) * b); else tmp = Float64(Float64(-y) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.3e+51) tmp = b * y; elseif (y <= 1.6e+36) tmp = (t - 2.0) * b; else tmp = -y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.3e+51], N[(b * y), $MachinePrecision], If[LessEqual[y, 1.6e+36], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], N[((-y) * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+51}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+36}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot z\\
\end{array}
\end{array}
if y < -1.3000000000000001e51Initial program 93.2%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites98.3%
Taylor expanded in a around 0
Applied rewrites82.7%
Taylor expanded in b around -inf
Applied rewrites46.2%
Taylor expanded in y around inf
Applied rewrites42.6%
if -1.3000000000000001e51 < y < 1.5999999999999999e36Initial program 97.2%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites97.2%
Taylor expanded in a around 0
Applied rewrites75.9%
Taylor expanded in b around -inf
Applied rewrites38.6%
Taylor expanded in y around 0
Applied rewrites35.7%
if 1.5999999999999999e36 < y Initial program 87.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6442.8
Applied rewrites42.8%
Taylor expanded in y around inf
Applied rewrites42.8%
Final simplification38.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.3e+25) (not (<= y 4.1e+73))) (* b y) (* b t)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.3e+25) || !(y <= 4.1e+73)) {
tmp = b * y;
} 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 ((y <= (-7.3d+25)) .or. (.not. (y <= 4.1d+73))) then
tmp = b * y
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 ((y <= -7.3e+25) || !(y <= 4.1e+73)) {
tmp = b * y;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.3e+25) or not (y <= 4.1e+73): tmp = b * y else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.3e+25) || !(y <= 4.1e+73)) tmp = Float64(b * y); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.3e+25) || ~((y <= 4.1e+73))) tmp = b * y; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.3e+25], N[Not[LessEqual[y, 4.1e+73]], $MachinePrecision]], N[(b * y), $MachinePrecision], N[(b * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.3 \cdot 10^{+25} \lor \neg \left(y \leq 4.1 \cdot 10^{+73}\right):\\
\;\;\;\;b \cdot y\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if y < -7.29999999999999961e25 or 4.0999999999999998e73 < y Initial program 90.7%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites96.3%
Taylor expanded in a around 0
Applied rewrites82.4%
Taylor expanded in b around -inf
Applied rewrites41.9%
Taylor expanded in y around inf
Applied rewrites39.0%
if -7.29999999999999961e25 < y < 4.0999999999999998e73Initial program 96.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites96.6%
Taylor expanded in a around 0
Applied rewrites74.8%
Taylor expanded in b around -inf
Applied rewrites37.2%
Taylor expanded in t around inf
Applied rewrites26.8%
Final simplification32.0%
(FPCore (x y z t a b) :precision binary64 (* b t))
double code(double x, double y, double z, double t, double a, double b) {
return b * t;
}
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 = b * t
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return b * t;
}
def code(x, y, z, t, a, b): return b * t
function code(x, y, z, t, a, b) return Float64(b * t) end
function tmp = code(x, y, z, t, a, b) tmp = b * t; end
code[x_, y_, z_, t_, a_, b_] := N[(b * t), $MachinePrecision]
\begin{array}{l}
\\
b \cdot t
\end{array}
Initial program 94.1%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
+-commutativeN/A
associate-+l+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
Applied rewrites96.5%
Taylor expanded in a around 0
Applied rewrites78.0%
Taylor expanded in b around -inf
Applied rewrites39.2%
Taylor expanded in t around inf
Applied rewrites19.5%
Final simplification19.5%
herbie shell --seed 2024337
(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)))