
(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 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (* b (- (+ t y) 2.0)) (- (- x (* z (- y 1.0))) (* a (- t 1.0))))))
(if (<= t_1 INFINITY) t_1 (fma (- b a) t (* (- 1.0 y) z)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma((b - a), t, ((1.0 - y) * z));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y - 1.0))) - Float64(a * Float64(t - 1.0)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(Float64(b - a), t, Float64(Float64(1.0 - y) * z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(b - a), $MachinePrecision] * t + N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \left(1 - y\right) \cdot z\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in x around 0
Applied rewrites60.0%
Taylor expanded in z around inf
Applied rewrites66.7%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (* b (- (+ t y) 2.0)) (- (- x (* z (- y 1.0))) (* a (- t 1.0))))))
(if (<= t_1 -1.2e+307)
(* (- z) y)
(if (<= t_1 1e+298) (+ a x) (* (- a) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= -1.2e+307) {
tmp = -z * y;
} else if (t_1 <= 1e+298) {
tmp = a + x;
} else {
tmp = -a * 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 = (b * ((t + y) - 2.0d0)) + ((x - (z * (y - 1.0d0))) - (a * (t - 1.0d0)))
if (t_1 <= (-1.2d+307)) then
tmp = -z * y
else if (t_1 <= 1d+298) then
tmp = a + x
else
tmp = -a * 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 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= -1.2e+307) {
tmp = -z * y;
} else if (t_1 <= 1e+298) {
tmp = a + x;
} else {
tmp = -a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))) tmp = 0 if t_1 <= -1.2e+307: tmp = -z * y elif t_1 <= 1e+298: tmp = a + x else: tmp = -a * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y - 1.0))) - Float64(a * Float64(t - 1.0)))) tmp = 0.0 if (t_1 <= -1.2e+307) tmp = Float64(Float64(-z) * y); elseif (t_1 <= 1e+298) tmp = Float64(a + x); else tmp = Float64(Float64(-a) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))); tmp = 0.0; if (t_1 <= -1.2e+307) tmp = -z * y; elseif (t_1 <= 1e+298) tmp = a + x; else tmp = -a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.2e+307], N[((-z) * y), $MachinePrecision], If[LessEqual[t$95$1, 1e+298], N[(a + x), $MachinePrecision], N[((-a) * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)\right)\\
\mathbf{if}\;t\_1 \leq -1.2 \cdot 10^{+307}:\\
\;\;\;\;\left(-z\right) \cdot y\\
\mathbf{elif}\;t\_1 \leq 10^{+298}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\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)) < -1.20000000000000008e307Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites59.1%
Taylor expanded in y around inf
Applied rewrites33.4%
if -1.20000000000000008e307 < (+.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)) < 9.9999999999999996e297Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6474.1
Applied rewrites74.1%
Taylor expanded in b around 0
Applied rewrites47.8%
Taylor expanded in t around 0
Applied rewrites40.9%
if 9.9999999999999996e297 < (+.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 69.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6454.2
Applied rewrites54.2%
Taylor expanded in b around 0
Applied rewrites42.3%
Final simplification39.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (* b (- (+ t y) 2.0)) (- (- x (* z (- y 1.0))) (* a (- t 1.0))))))
(if (<= t_1 -1.2e+307) (* b t) (if (<= t_1 1e+298) (+ a x) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= -1.2e+307) {
tmp = b * t;
} else if (t_1 <= 1e+298) {
tmp = a + 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) :: t_1
real(8) :: tmp
t_1 = (b * ((t + y) - 2.0d0)) + ((x - (z * (y - 1.0d0))) - (a * (t - 1.0d0)))
if (t_1 <= (-1.2d+307)) then
tmp = b * t
else if (t_1 <= 1d+298) then
tmp = a + 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 t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= -1.2e+307) {
tmp = b * t;
} else if (t_1 <= 1e+298) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))) tmp = 0 if t_1 <= -1.2e+307: tmp = b * t elif t_1 <= 1e+298: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y - 1.0))) - Float64(a * Float64(t - 1.0)))) tmp = 0.0 if (t_1 <= -1.2e+307) tmp = Float64(b * t); elseif (t_1 <= 1e+298) tmp = Float64(a + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))); tmp = 0.0; if (t_1 <= -1.2e+307) tmp = b * t; elseif (t_1 <= 1e+298) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.2e+307], N[(b * t), $MachinePrecision], If[LessEqual[t$95$1, 1e+298], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)\right)\\
\mathbf{if}\;t\_1 \leq -1.2 \cdot 10^{+307}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t\_1 \leq 10^{+298}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\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)) < -1.20000000000000008e307 or 9.9999999999999996e297 < (+.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 84.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6449.9
Applied rewrites49.9%
Taylor expanded in t around inf
Applied rewrites27.2%
if -1.20000000000000008e307 < (+.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)) < 9.9999999999999996e297Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6474.1
Applied rewrites74.1%
Taylor expanded in b around 0
Applied rewrites47.8%
Taylor expanded in t around 0
Applied rewrites40.9%
Final simplification35.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b a) t (fma (- y 2.0) b (fma (- 1.0 y) z a)))))
(if (<= a -2.7e+104)
t_1
(if (<= a 20000000000000.0)
(fma (- 1.0 y) z (fma (- (+ t y) 2.0) b x))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - a), t, fma((y - 2.0), b, fma((1.0 - y), z, a)));
double tmp;
if (a <= -2.7e+104) {
tmp = t_1;
} else if (a <= 20000000000000.0) {
tmp = fma((1.0 - y), z, fma(((t + y) - 2.0), b, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - a), t, fma(Float64(y - 2.0), b, fma(Float64(1.0 - y), z, a))) tmp = 0.0 if (a <= -2.7e+104) tmp = t_1; elseif (a <= 20000000000000.0) tmp = fma(Float64(1.0 - y), z, fma(Float64(Float64(t + y) - 2.0), b, x)); 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 + N[(N[(y - 2.0), $MachinePrecision] * b + N[(N[(1.0 - y), $MachinePrecision] * z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.7e+104], t$95$1, If[LessEqual[a, 20000000000000.0], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, \mathsf{fma}\left(1 - y, z, a\right)\right)\right)\\
\mathbf{if}\;a \leq -2.7 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 20000000000000:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.69999999999999985e104 or 2e13 < a Initial program 89.4%
Taylor expanded in x around 0
Applied rewrites92.9%
if -2.69999999999999985e104 < a < 2e13Initial program 97.3%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6494.1
Applied rewrites94.1%
Final simplification93.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 t) a x)) (t_2 (* (- b z) y)))
(if (<= y -8.5e+67)
t_2
(if (<= y -5.3e-265)
t_1
(if (<= y 4.2e-92) (fma (- t 2.0) b z) (if (<= y 8.2e+44) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - t), a, x);
double t_2 = (b - z) * y;
double tmp;
if (y <= -8.5e+67) {
tmp = t_2;
} else if (y <= -5.3e-265) {
tmp = t_1;
} else if (y <= 4.2e-92) {
tmp = fma((t - 2.0), b, z);
} else if (y <= 8.2e+44) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - t), a, x) t_2 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -8.5e+67) tmp = t_2; elseif (y <= -5.3e-265) tmp = t_1; elseif (y <= 4.2e-92) tmp = fma(Float64(t - 2.0), b, z); elseif (y <= 8.2e+44) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -8.5e+67], t$95$2, If[LessEqual[y, -5.3e-265], t$95$1, If[LessEqual[y, 4.2e-92], N[(N[(t - 2.0), $MachinePrecision] * b + z), $MachinePrecision], If[LessEqual[y, 8.2e+44], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - t, a, x\right)\\
t_2 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.3 \cdot 10^{-265}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-92}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z\right)\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -8.50000000000000038e67 or 8.1999999999999993e44 < y Initial program 90.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6475.0
Applied rewrites75.0%
if -8.50000000000000038e67 < y < -5.3e-265 or 4.2e-92 < y < 8.1999999999999993e44Initial program 96.2%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6485.5
Applied rewrites85.5%
Taylor expanded in b around 0
Applied rewrites61.1%
if -5.3e-265 < y < 4.2e-92Initial program 96.1%
Taylor expanded in x around 0
Applied rewrites80.5%
Taylor expanded in a around 0
Applied rewrites61.5%
Taylor expanded in y around 0
Applied rewrites61.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= b -1.9e+32)
(fma (- 1.0 y) z t_1)
(if (<= b 1.02e+40)
(fma (- 1.0 t) a (fma (- 1.0 y) z x))
(fma (- 1.0 t) a t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -1.9e+32) {
tmp = fma((1.0 - y), z, t_1);
} else if (b <= 1.02e+40) {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
} else {
tmp = fma((1.0 - t), a, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -1.9e+32) tmp = fma(Float64(1.0 - y), z, t_1); elseif (b <= 1.02e+40) tmp = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x)); else tmp = fma(Float64(1.0 - t), a, 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 + x), $MachinePrecision]}, If[LessEqual[b, -1.9e+32], N[(N[(1.0 - y), $MachinePrecision] * z + t$95$1), $MachinePrecision], If[LessEqual[b, 1.02e+40], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - t), $MachinePrecision] * a + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -1.9 \cdot 10^{+32}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, t\_1\right)\\
\mathbf{elif}\;b \leq 1.02 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, t\_1\right)\\
\end{array}
\end{array}
if b < -1.9000000000000002e32Initial program 86.6%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6487.6
Applied rewrites87.6%
if -1.9000000000000002e32 < b < 1.02e40Initial program 98.6%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites93.1%
if 1.02e40 < b Initial program 90.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6492.5
Applied rewrites92.5%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 t) a (fma (- (+ t y) 2.0) b x))))
(if (<= b -8.4e+27)
t_1
(if (<= b 1.02e+40) (fma (- 1.0 t) a (fma (- 1.0 y) z x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - t), a, fma(((t + y) - 2.0), b, x));
double tmp;
if (b <= -8.4e+27) {
tmp = t_1;
} else if (b <= 1.02e+40) {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - t), a, fma(Float64(Float64(t + y) - 2.0), b, x)) tmp = 0.0 if (b <= -8.4e+27) tmp = t_1; elseif (b <= 1.02e+40) tmp = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.4e+27], t$95$1, If[LessEqual[b, 1.02e+40], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{if}\;b \leq -8.4 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.02 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.39999999999999978e27 or 1.02e40 < b Initial program 88.7%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6487.5
Applied rewrites87.5%
if -8.39999999999999978e27 < b < 1.02e40Initial program 98.5%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites93.7%
Final simplification90.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z (* b (- (+ t y) 2.0)))))
(if (<= b -4.6e+48)
t_1
(if (<= b 540000000.0) (fma (- 1.0 t) a (fma (- 1.0 y) z x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - y), z, (b * ((t + y) - 2.0)));
double tmp;
if (b <= -4.6e+48) {
tmp = t_1;
} else if (b <= 540000000.0) {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - y), z, Float64(b * Float64(Float64(t + y) - 2.0))) tmp = 0.0 if (b <= -4.6e+48) tmp = t_1; elseif (b <= 540000000.0) tmp = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.6e+48], t$95$1, If[LessEqual[b, 540000000.0], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, b \cdot \left(\left(t + y\right) - 2\right)\right)\\
\mathbf{if}\;b \leq -4.6 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 540000000:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.6e48 or 5.4e8 < b Initial program 88.9%
Taylor expanded in x around 0
Applied rewrites90.2%
Taylor expanded in a around 0
Applied rewrites81.1%
if -4.6e48 < b < 5.4e8Initial program 98.5%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites93.6%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= b -5.4e+31)
t_1
(if (<= b -4.6e-303)
(fma (- 1.0 t) a (+ z x))
(if (<= b 1.16e+42) (+ (fma (- 1.0 y) z x) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -5.4e+31) {
tmp = t_1;
} else if (b <= -4.6e-303) {
tmp = fma((1.0 - t), a, (z + x));
} else if (b <= 1.16e+42) {
tmp = fma((1.0 - y), z, x) + a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -5.4e+31) tmp = t_1; elseif (b <= -4.6e-303) tmp = fma(Float64(1.0 - t), a, Float64(z + x)); elseif (b <= 1.16e+42) tmp = Float64(fma(Float64(1.0 - y), z, x) + a); 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 + x), $MachinePrecision]}, If[LessEqual[b, -5.4e+31], t$95$1, If[LessEqual[b, -4.6e-303], N[(N[(1.0 - t), $MachinePrecision] * a + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.16e+42], N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -5.4 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.6 \cdot 10^{-303}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z + x\right)\\
\mathbf{elif}\;b \leq 1.16 \cdot 10^{+42}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.39999999999999971e31 or 1.15999999999999995e42 < b Initial program 88.5%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6487.3
Applied rewrites87.3%
Taylor expanded in a around 0
Applied rewrites77.2%
if -5.39999999999999971e31 < b < -4.59999999999999991e-303Initial program 96.9%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites94.1%
Taylor expanded in y around 0
Applied rewrites77.8%
if -4.59999999999999991e-303 < b < 1.15999999999999995e42Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites92.3%
Taylor expanded in t around 0
Applied rewrites81.0%
Final simplification78.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ t y) 2.0)))
(if (<= b -8.5e+123)
(* b t_1)
(if (<= b 1.2e+47) (fma (- 1.0 t) a (fma (- 1.0 y) z x)) (fma t_1 b x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + y) - 2.0;
double tmp;
if (b <= -8.5e+123) {
tmp = b * t_1;
} else if (b <= 1.2e+47) {
tmp = fma((1.0 - t), a, fma((1.0 - y), z, x));
} else {
tmp = fma(t_1, b, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + y) - 2.0) tmp = 0.0 if (b <= -8.5e+123) tmp = Float64(b * t_1); elseif (b <= 1.2e+47) tmp = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, x)); else tmp = fma(t_1, b, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]}, If[LessEqual[b, -8.5e+123], N[(b * t$95$1), $MachinePrecision], If[LessEqual[b, 1.2e+47], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * b + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + y\right) - 2\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+123}:\\
\;\;\;\;b \cdot t\_1\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, x\right)\\
\end{array}
\end{array}
if b < -8.5e123Initial program 80.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6481.7
Applied rewrites81.7%
if -8.5e123 < b < 1.20000000000000009e47Initial program 98.7%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites89.4%
if 1.20000000000000009e47 < b Initial program 90.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6492.5
Applied rewrites92.5%
Taylor expanded in a around 0
Applied rewrites79.2%
Final simplification86.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -1e+49)
t_1
(if (<= b 1.05e-280)
(fma (- 1.0 t) a x)
(if (<= b 1.25e+78) (fma (- 1.0 y) z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -1e+49) {
tmp = t_1;
} else if (b <= 1.05e-280) {
tmp = fma((1.0 - t), a, x);
} else if (b <= 1.25e+78) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -1e+49) tmp = t_1; elseif (b <= 1.05e-280) tmp = fma(Float64(1.0 - t), a, x); elseif (b <= 1.25e+78) tmp = fma(Float64(1.0 - y), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e+49], t$95$1, If[LessEqual[b, 1.05e-280], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[b, 1.25e+78], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -1 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{-280}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.99999999999999946e48 or 1.24999999999999996e78 < b Initial program 87.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6473.2
Applied rewrites73.2%
if -9.99999999999999946e48 < b < 1.05e-280Initial program 97.3%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6472.2
Applied rewrites72.2%
Taylor expanded in b around 0
Applied rewrites66.3%
if 1.05e-280 < b < 1.24999999999999996e78Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites90.6%
Taylor expanded in a around 0
Applied rewrites73.9%
Final simplification71.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4.4e+32)
(fma (- y 2.0) b x)
(if (<= b 1.05e-280)
(fma (- 1.0 t) a x)
(if (<= b 1.25e+78) (fma (- 1.0 y) z x) (fma (- y 2.0) b a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.4e+32) {
tmp = fma((y - 2.0), b, x);
} else if (b <= 1.05e-280) {
tmp = fma((1.0 - t), a, x);
} else if (b <= 1.25e+78) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = fma((y - 2.0), b, a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.4e+32) tmp = fma(Float64(y - 2.0), b, x); elseif (b <= 1.05e-280) tmp = fma(Float64(1.0 - t), a, x); elseif (b <= 1.25e+78) tmp = fma(Float64(1.0 - y), z, x); else tmp = fma(Float64(y - 2.0), b, a); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.4e+32], N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision], If[LessEqual[b, 1.05e-280], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[b, 1.25e+78], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+32}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{-280}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\end{array}
\end{array}
if b < -4.40000000000000002e32Initial program 86.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6482.7
Applied rewrites82.7%
Taylor expanded in t around 0
Applied rewrites58.7%
Taylor expanded in a around 0
Applied rewrites54.6%
if -4.40000000000000002e32 < b < 1.05e-280Initial program 97.2%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6470.7
Applied rewrites70.7%
Taylor expanded in b around 0
Applied rewrites66.8%
if 1.05e-280 < b < 1.24999999999999996e78Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites90.6%
Taylor expanded in a around 0
Applied rewrites73.9%
if 1.24999999999999996e78 < b Initial program 90.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6492.1
Applied rewrites92.1%
Taylor expanded in t around 0
Applied rewrites60.5%
Taylor expanded in x around 0
Applied rewrites58.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.1e+122)
(* (- y 2.0) b)
(if (<= b -1.28e-231)
(fma (- t) a x)
(if (<= b 1.28e+70) (* (- 1.0 y) z) (* (- t 2.0) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.1e+122) {
tmp = (y - 2.0) * b;
} else if (b <= -1.28e-231) {
tmp = fma(-t, a, x);
} else if (b <= 1.28e+70) {
tmp = (1.0 - y) * z;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.1e+122) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= -1.28e-231) tmp = fma(Float64(-t), a, x); elseif (b <= 1.28e+70) tmp = Float64(Float64(1.0 - y) * z); else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.1e+122], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, -1.28e-231], N[((-t) * a + x), $MachinePrecision], If[LessEqual[b, 1.28e+70], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{+122}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq -1.28 \cdot 10^{-231}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
\mathbf{elif}\;b \leq 1.28 \cdot 10^{+70}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -1.1e122Initial program 80.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
Applied rewrites60.7%
if -1.1e122 < b < -1.27999999999999995e-231Initial program 97.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.9
Applied rewrites75.9%
Taylor expanded in b around 0
Applied rewrites62.0%
Taylor expanded in t around inf
Applied rewrites49.9%
if -1.27999999999999995e-231 < b < 1.27999999999999994e70Initial program 100.0%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f6448.6
Applied rewrites48.6%
if 1.27999999999999994e70 < b Initial program 90.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.0
Applied rewrites75.0%
Taylor expanded in y around 0
Applied rewrites55.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= b -3.8e+33)
t_1
(if (<= b 1.16e+42) (+ (fma (- 1.0 y) z x) a) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -3.8e+33) {
tmp = t_1;
} else if (b <= 1.16e+42) {
tmp = fma((1.0 - y), z, x) + a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -3.8e+33) tmp = t_1; elseif (b <= 1.16e+42) tmp = Float64(fma(Float64(1.0 - y), z, x) + a); 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 + x), $MachinePrecision]}, If[LessEqual[b, -3.8e+33], t$95$1, If[LessEqual[b, 1.16e+42], N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -3.8 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.16 \cdot 10^{+42}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.80000000000000002e33 or 1.15999999999999995e42 < b Initial program 88.5%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6487.3
Applied rewrites87.3%
Taylor expanded in a around 0
Applied rewrites77.2%
if -3.80000000000000002e33 < b < 1.15999999999999995e42Initial program 98.6%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites93.1%
Taylor expanded in t around 0
Applied rewrites74.4%
Final simplification75.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- (+ t y) 2.0)))) (if (<= b -1.86e+80) t_1 (if (<= b 7e+78) (+ (fma (- 1.0 y) z x) a) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -1.86e+80) {
tmp = t_1;
} else if (b <= 7e+78) {
tmp = fma((1.0 - y), z, x) + a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -1.86e+80) tmp = t_1; elseif (b <= 7e+78) tmp = Float64(fma(Float64(1.0 - y), z, x) + a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.86e+80], t$95$1, If[LessEqual[b, 7e+78], N[(N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -1.86 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 7 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.8599999999999999e80 or 7.0000000000000003e78 < b Initial program 86.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6476.3
Applied rewrites76.3%
if -1.8599999999999999e80 < b < 7.0000000000000003e78Initial program 98.7%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites89.7%
Taylor expanded in t around 0
Applied rewrites72.9%
Final simplification74.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -8.4e+27) (fma (- y 2.0) b x) (if (<= b 1.25e+78) (fma (- 1.0 y) z x) (fma (- y 2.0) b a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.4e+27) {
tmp = fma((y - 2.0), b, x);
} else if (b <= 1.25e+78) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = fma((y - 2.0), b, a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.4e+27) tmp = fma(Float64(y - 2.0), b, x); elseif (b <= 1.25e+78) tmp = fma(Float64(1.0 - y), z, x); else tmp = fma(Float64(y - 2.0), b, a); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.4e+27], N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision], If[LessEqual[b, 1.25e+78], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.4 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\end{array}
\end{array}
if b < -8.39999999999999978e27Initial program 87.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6483.3
Applied rewrites83.3%
Taylor expanded in t around 0
Applied rewrites60.0%
Taylor expanded in a around 0
Applied rewrites54.5%
if -8.39999999999999978e27 < b < 1.24999999999999996e78Initial program 98.6%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites93.1%
Taylor expanded in a around 0
Applied rewrites65.0%
if 1.24999999999999996e78 < b Initial program 90.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6492.1
Applied rewrites92.1%
Taylor expanded in t around 0
Applied rewrites60.5%
Taylor expanded in x around 0
Applied rewrites58.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (fma (- y 2.0) b a))) (if (<= b -8.5e+104) t_1 (if (<= b 1.25e+78) (fma (- 1.0 y) z x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y - 2.0), b, a);
double tmp;
if (b <= -8.5e+104) {
tmp = t_1;
} else if (b <= 1.25e+78) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(y - 2.0), b, a) tmp = 0.0 if (b <= -8.5e+104) tmp = t_1; elseif (b <= 1.25e+78) tmp = fma(Float64(1.0 - y), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision]}, If[LessEqual[b, -8.5e+104], t$95$1, If[LessEqual[b, 1.25e+78], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.4999999999999999e104 or 1.24999999999999996e78 < b Initial program 85.9%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6490.4
Applied rewrites90.4%
Taylor expanded in t around 0
Applied rewrites62.0%
Taylor expanded in x around 0
Applied rewrites59.9%
if -8.4999999999999999e104 < b < 1.24999999999999996e78Initial program 98.7%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites88.9%
Taylor expanded in a around 0
Applied rewrites61.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.15e+122) (* (- y 2.0) b) (if (<= b 1.16e+92) (fma (- 1.0 y) z x) (* (- t 2.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.15e+122) {
tmp = (y - 2.0) * b;
} else if (b <= 1.16e+92) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.15e+122) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= 1.16e+92) tmp = fma(Float64(1.0 - y), z, x); else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.15e+122], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 1.16e+92], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.15 \cdot 10^{+122}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq 1.16 \cdot 10^{+92}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -1.15e122Initial program 80.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
Applied rewrites60.7%
if -1.15e122 < b < 1.16000000000000006e92Initial program 98.8%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites88.6%
Taylor expanded in a around 0
Applied rewrites61.0%
if 1.16000000000000006e92 < b Initial program 89.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.0
Applied rewrites77.0%
Taylor expanded in y around 0
Applied rewrites58.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b z) y))) (if (<= y -1.55e+67) t_1 (if (<= y 1.65e+16) (fma (- t) a x) 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.55e+67) {
tmp = t_1;
} else if (y <= 1.65e+16) {
tmp = fma(-t, a, x);
} 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.55e+67) tmp = t_1; elseif (y <= 1.65e+16) tmp = fma(Float64(-t), a, x); 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.55e+67], t$95$1, If[LessEqual[y, 1.65e+16], N[((-t) * a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+16}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.54999999999999998e67 or 1.65e16 < y Initial program 91.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6472.4
Applied rewrites72.4%
if -1.54999999999999998e67 < y < 1.65e16Initial program 96.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6478.9
Applied rewrites78.9%
Taylor expanded in b around 0
Applied rewrites53.4%
Taylor expanded in t around inf
Applied rewrites42.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.1e+122) (* (- y 2.0) b) (if (<= b 1.9e+80) (fma (- t) a x) (* (- t 2.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.1e+122) {
tmp = (y - 2.0) * b;
} else if (b <= 1.9e+80) {
tmp = fma(-t, a, x);
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.1e+122) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= 1.9e+80) tmp = fma(Float64(-t), a, x); else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.1e+122], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 1.9e+80], N[((-t) * a + x), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{+122}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -1.1e122Initial program 80.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
Applied rewrites60.7%
if -1.1e122 < b < 1.89999999999999999e80Initial program 98.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6463.5
Applied rewrites63.5%
Taylor expanded in b around 0
Applied rewrites53.6%
Taylor expanded in t around inf
Applied rewrites43.1%
if 1.89999999999999999e80 < b Initial program 89.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.5
Applied rewrites75.5%
Taylor expanded in y around 0
Applied rewrites57.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.15e+122) (* b y) (if (<= b 1.9e+80) (fma (- t) a x) (* (- t 2.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.15e+122) {
tmp = b * y;
} else if (b <= 1.9e+80) {
tmp = fma(-t, a, x);
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.15e+122) tmp = Float64(b * y); elseif (b <= 1.9e+80) tmp = fma(Float64(-t), a, x); else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.15e+122], N[(b * y), $MachinePrecision], If[LessEqual[b, 1.9e+80], N[((-t) * a + x), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.15 \cdot 10^{+122}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -1.15e122Initial program 80.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6487.7
Applied rewrites87.7%
Taylor expanded in y around inf
Applied rewrites45.1%
if -1.15e122 < b < 1.89999999999999999e80Initial program 98.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6463.5
Applied rewrites63.5%
Taylor expanded in b around 0
Applied rewrites53.6%
Taylor expanded in t around inf
Applied rewrites43.1%
if 1.89999999999999999e80 < b Initial program 89.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.5
Applied rewrites75.5%
Taylor expanded in y around 0
Applied rewrites57.7%
Final simplification46.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (fma (- t) a x))) (if (<= t -2.25e+21) t_1 (if (<= t 0.7) (+ a x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(-t, a, x);
double tmp;
if (t <= -2.25e+21) {
tmp = t_1;
} else if (t <= 0.7) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(-t), a, x) tmp = 0.0 if (t <= -2.25e+21) tmp = t_1; elseif (t <= 0.7) tmp = Float64(a + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-t) * a + x), $MachinePrecision]}, If[LessEqual[t, -2.25e+21], t$95$1, If[LessEqual[t, 0.7], N[(a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, x\right)\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 0.7:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.25e21 or 0.69999999999999996 < t Initial program 91.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.1
Applied rewrites75.1%
Taylor expanded in b around 0
Applied rewrites51.1%
Taylor expanded in t around inf
Applied rewrites50.5%
if -2.25e21 < t < 0.69999999999999996Initial program 96.3%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6470.7
Applied rewrites70.7%
Taylor expanded in b around 0
Applied rewrites37.6%
Taylor expanded in t around 0
Applied rewrites36.9%
Final simplification43.2%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.2e+122) (* b y) (if (<= b 2e+90) (+ a x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.2e+122) {
tmp = b * y;
} else if (b <= 2e+90) {
tmp = a + 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.2d+122)) then
tmp = b * y
else if (b <= 2d+90) then
tmp = a + 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.2e+122) {
tmp = b * y;
} else if (b <= 2e+90) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.2e+122: tmp = b * y elif b <= 2e+90: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.2e+122) tmp = Float64(b * y); elseif (b <= 2e+90) tmp = Float64(a + 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.2e+122) tmp = b * y; elseif (b <= 2e+90) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.2e+122], N[(b * y), $MachinePrecision], If[LessEqual[b, 2e+90], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{+122}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+90}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -1.2000000000000001e122Initial program 80.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6487.7
Applied rewrites87.7%
Taylor expanded in y around inf
Applied rewrites45.1%
if -1.2000000000000001e122 < b < 1.99999999999999993e90Initial program 98.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6463.8
Applied rewrites63.8%
Taylor expanded in b around 0
Applied rewrites53.9%
Taylor expanded in t around 0
Applied rewrites35.5%
if 1.99999999999999993e90 < b Initial program 89.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.0
Applied rewrites77.0%
Taylor expanded in t around inf
Applied rewrites38.5%
Final simplification37.6%
(FPCore (x y z t a b) :precision binary64 (+ a x))
double code(double x, double y, double z, double t, double a, double b) {
return a + 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 = a + x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a + x;
}
def code(x, y, z, t, a, b): return a + x
function code(x, y, z, t, a, b) return Float64(a + x) end
function tmp = code(x, y, z, t, a, b) tmp = a + x; end
code[x_, y_, z_, t_, a_, b_] := N[(a + x), $MachinePrecision]
\begin{array}{l}
\\
a + x
\end{array}
Initial program 94.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6472.7
Applied rewrites72.7%
Taylor expanded in b around 0
Applied rewrites44.0%
Taylor expanded in t around 0
Applied rewrites26.8%
Final simplification26.8%
herbie shell --seed 2024235
(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)))