
(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
(let* ((t_1
(- (- (- x (* z (- y 1.0))) (* a (- t 1.0))) (* (- 2.0 (+ t y)) b))))
(if (<= t_1 INFINITY) t_1 (* (- b z) y))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (z * (y - 1.0))) - (a * (t - 1.0))) - ((2.0 - (t + y)) * b);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (b - z) * y;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (z * (y - 1.0))) - (a * (t - 1.0))) - ((2.0 - (t + y)) * b);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (b - z) * y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x - (z * (y - 1.0))) - (a * (t - 1.0))) - ((2.0 - (t + y)) * b) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (b - z) * y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(z * Float64(y - 1.0))) - Float64(a * Float64(t - 1.0))) - Float64(Float64(2.0 - Float64(t + y)) * b)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(b - z) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x - (z * (y - 1.0))) - (a * (t - 1.0))) - ((2.0 - (t + y)) * b); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (b - z) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(2.0 - N[(t + y), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)\right) - \left(2 - \left(t + y\right)\right) \cdot b\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\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 y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6479.5
Applied rewrites79.5%
Final simplification98.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 y) z)) (t_2 (* (- y 2.0) b)))
(if (<= b -2.6e+96)
t_2
(if (<= b -1.08e-42)
t_1
(if (<= b -2.3e-211)
(+ z x)
(if (<= b 7.2e-272)
(* (- 1.0 t) a)
(if (<= b 9.6e-71)
(fma (- y) z a)
(if (<= b 2.6e+63) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double t_2 = (y - 2.0) * b;
double tmp;
if (b <= -2.6e+96) {
tmp = t_2;
} else if (b <= -1.08e-42) {
tmp = t_1;
} else if (b <= -2.3e-211) {
tmp = z + x;
} else if (b <= 7.2e-272) {
tmp = (1.0 - t) * a;
} else if (b <= 9.6e-71) {
tmp = fma(-y, z, a);
} else if (b <= 2.6e+63) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - y) * z) t_2 = Float64(Float64(y - 2.0) * b) tmp = 0.0 if (b <= -2.6e+96) tmp = t_2; elseif (b <= -1.08e-42) tmp = t_1; elseif (b <= -2.3e-211) tmp = Float64(z + x); elseif (b <= 7.2e-272) tmp = Float64(Float64(1.0 - t) * a); elseif (b <= 9.6e-71) tmp = fma(Float64(-y), z, a); elseif (b <= 2.6e+63) 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 - y), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.6e+96], t$95$2, If[LessEqual[b, -1.08e-42], t$95$1, If[LessEqual[b, -2.3e-211], N[(z + x), $MachinePrecision], If[LessEqual[b, 7.2e-272], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 9.6e-71], N[((-y) * z + a), $MachinePrecision], If[LessEqual[b, 2.6e+63], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - y\right) \cdot z\\
t_2 := \left(y - 2\right) \cdot b\\
\mathbf{if}\;b \leq -2.6 \cdot 10^{+96}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.08 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.3 \cdot 10^{-211}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-272}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;b \leq 9.6 \cdot 10^{-71}:\\
\;\;\;\;\mathsf{fma}\left(-y, z, a\right)\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -2.6e96 or 2.6000000000000001e63 < b Initial program 90.1%
Taylor expanded in x around 0
Applied rewrites90.3%
Taylor expanded in t around 0
Applied rewrites54.7%
Taylor expanded in b around inf
Applied rewrites52.3%
if -2.6e96 < b < -1.07999999999999996e-42 or 9.6e-71 < b < 2.6000000000000001e63Initial program 92.3%
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
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f6449.5
Applied rewrites49.5%
if -1.07999999999999996e-42 < b < -2.29999999999999988e-211Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites64.0%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6473.7
Applied rewrites73.7%
Taylor expanded in y around 0
Applied rewrites52.7%
Taylor expanded in b around 0
Applied rewrites50.3%
if -2.29999999999999988e-211 < b < 7.19999999999999937e-272Initial program 100.0%
Taylor expanded in a 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
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f6456.4
Applied rewrites56.4%
if 7.19999999999999937e-272 < b < 9.6e-71Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites82.0%
Taylor expanded in b around 0
Applied rewrites77.3%
Taylor expanded in t around 0
Applied rewrites68.5%
Taylor expanded in y around inf
Applied rewrites59.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z (* (- 1.0 t) a)))
(t_2 (fma (- (+ t y) 2.0) b x)))
(if (<= b -1.6e+96)
t_2
(if (<= b -1.46e-58)
t_1
(if (<= b -2.1e-211)
(fma (- 1.0 y) z (+ a x))
(if (<= b 2.9e+62) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - y), z, ((1.0 - t) * a));
double t_2 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -1.6e+96) {
tmp = t_2;
} else if (b <= -1.46e-58) {
tmp = t_1;
} else if (b <= -2.1e-211) {
tmp = fma((1.0 - y), z, (a + x));
} else if (b <= 2.9e+62) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - y), z, Float64(Float64(1.0 - t) * a)) t_2 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -1.6e+96) tmp = t_2; elseif (b <= -1.46e-58) tmp = t_1; elseif (b <= -2.1e-211) tmp = fma(Float64(1.0 - y), z, Float64(a + x)); elseif (b <= 2.9e+62) 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 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -1.6e+96], t$95$2, If[LessEqual[b, -1.46e-58], t$95$1, If[LessEqual[b, -2.1e-211], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.9e+62], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, \left(1 - t\right) \cdot a\right)\\
t_2 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -1.6 \cdot 10^{+96}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.46 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.1 \cdot 10^{-211}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -1.60000000000000003e96 or 2.89999999999999984e62 < b Initial program 90.1%
Taylor expanded in x around 0
Applied rewrites90.3%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6495.8
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites44.7%
Taylor expanded in z around 0
Applied rewrites92.0%
if -1.60000000000000003e96 < b < -1.4600000000000001e-58 or -2.10000000000000008e-211 < b < 2.89999999999999984e62Initial program 96.6%
Taylor expanded in x around 0
Applied rewrites84.3%
Taylor expanded in b around 0
Applied rewrites73.9%
if -1.4600000000000001e-58 < b < -2.10000000000000008e-211Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites60.0%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6475.9
Applied rewrites75.9%
Taylor expanded in b around 0
associate--r+N/A
*-commutativeN/A
remove-double-negN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
mul-1-negN/A
cancel-sign-sub-invN/A
*-commutativeN/A
*-commutativeN/A
Applied rewrites96.4%
Taylor expanded in t around 0
Applied rewrites83.1%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ t y) 2.0))
(t_2 (fma (- 1.0 t) a (fma (- 1.0 y) z (* b t_1)))))
(if (<= a -2e-29)
t_2
(if (<= a 7.5e+73) (fma (- 1.0 y) z (fma t_1 b x)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + y) - 2.0;
double t_2 = fma((1.0 - t), a, fma((1.0 - y), z, (b * t_1)));
double tmp;
if (a <= -2e-29) {
tmp = t_2;
} else if (a <= 7.5e+73) {
tmp = fma((1.0 - y), z, fma(t_1, b, x));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + y) - 2.0) t_2 = fma(Float64(1.0 - t), a, fma(Float64(1.0 - y), z, Float64(b * t_1))) tmp = 0.0 if (a <= -2e-29) tmp = t_2; elseif (a <= 7.5e+73) tmp = fma(Float64(1.0 - y), z, fma(t_1, b, x)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(1.0 - y), $MachinePrecision] * z + N[(b * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e-29], t$95$2, If[LessEqual[a, 7.5e+73], N[(N[(1.0 - y), $MachinePrecision] * z + N[(t$95$1 * b + x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + y\right) - 2\\
t_2 := \mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(1 - y, z, b \cdot t\_1\right)\right)\\
\mathbf{if}\;a \leq -2 \cdot 10^{-29}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+73}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(t\_1, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.99999999999999989e-29 or 7.5e73 < a Initial program 91.3%
Taylor expanded in x around 0
Applied rewrites88.9%
if -1.99999999999999989e-29 < a < 7.5e73Initial program 97.2%
Taylor expanded in x around 0
Applied rewrites78.6%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6496.6
Applied rewrites96.6%
Final simplification93.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y 2.0) b)) (t_2 (* (- b a) t)))
(if (<= t -5.5e+64)
t_2
(if (<= t -1.15e-16)
(* (- 1.0 y) z)
(if (<= t -4.5e-112)
t_1
(if (<= t 1.28e-141) (+ z x) (if (<= t 1450000.0) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 2.0) * b;
double t_2 = (b - a) * t;
double tmp;
if (t <= -5.5e+64) {
tmp = t_2;
} else if (t <= -1.15e-16) {
tmp = (1.0 - y) * z;
} else if (t <= -4.5e-112) {
tmp = t_1;
} else if (t <= 1.28e-141) {
tmp = z + x;
} else if (t <= 1450000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y - 2.0d0) * b
t_2 = (b - a) * t
if (t <= (-5.5d+64)) then
tmp = t_2
else if (t <= (-1.15d-16)) then
tmp = (1.0d0 - y) * z
else if (t <= (-4.5d-112)) then
tmp = t_1
else if (t <= 1.28d-141) then
tmp = z + x
else if (t <= 1450000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 2.0) * b;
double t_2 = (b - a) * t;
double tmp;
if (t <= -5.5e+64) {
tmp = t_2;
} else if (t <= -1.15e-16) {
tmp = (1.0 - y) * z;
} else if (t <= -4.5e-112) {
tmp = t_1;
} else if (t <= 1.28e-141) {
tmp = z + x;
} else if (t <= 1450000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y - 2.0) * b t_2 = (b - a) * t tmp = 0 if t <= -5.5e+64: tmp = t_2 elif t <= -1.15e-16: tmp = (1.0 - y) * z elif t <= -4.5e-112: tmp = t_1 elif t <= 1.28e-141: tmp = z + x elif t <= 1450000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 2.0) * b) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -5.5e+64) tmp = t_2; elseif (t <= -1.15e-16) tmp = Float64(Float64(1.0 - y) * z); elseif (t <= -4.5e-112) tmp = t_1; elseif (t <= 1.28e-141) tmp = Float64(z + x); elseif (t <= 1450000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y - 2.0) * b; t_2 = (b - a) * t; tmp = 0.0; if (t <= -5.5e+64) tmp = t_2; elseif (t <= -1.15e-16) tmp = (1.0 - y) * z; elseif (t <= -4.5e-112) tmp = t_1; elseif (t <= 1.28e-141) tmp = z + x; elseif (t <= 1450000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.5e+64], t$95$2, If[LessEqual[t, -1.15e-16], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, -4.5e-112], t$95$1, If[LessEqual[t, 1.28e-141], N[(z + x), $MachinePrecision], If[LessEqual[t, 1450000.0], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 2\right) \cdot b\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-16}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.28 \cdot 10^{-141}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;t \leq 1450000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.4999999999999996e64 or 1.45e6 < t Initial program 91.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.3
Applied rewrites67.3%
if -5.4999999999999996e64 < t < -1.15e-16Initial 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
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f6458.6
Applied rewrites58.6%
if -1.15e-16 < t < -4.50000000000000012e-112 or 1.2799999999999999e-141 < t < 1.45e6Initial program 93.9%
Taylor expanded in x around 0
Applied rewrites82.2%
Taylor expanded in t around 0
Applied rewrites79.1%
Taylor expanded in b around inf
Applied rewrites53.4%
if -4.50000000000000012e-112 < t < 1.2799999999999999e-141Initial program 98.6%
Taylor expanded in x around 0
Applied rewrites73.4%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6479.4
Applied rewrites79.4%
Taylor expanded in y around 0
Applied rewrites50.4%
Taylor expanded in b around 0
Applied rewrites42.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y 2.0) b)))
(if (<= b -4.7e+153)
t_1
(if (<= b -6.2e+86)
(* b t)
(if (<= b -2.3e-211)
(+ z x)
(if (<= b 7.2e-272)
(* (- 1.0 t) a)
(if (<= b 1.22e+123) (fma (- y) z a) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 2.0) * b;
double tmp;
if (b <= -4.7e+153) {
tmp = t_1;
} else if (b <= -6.2e+86) {
tmp = b * t;
} else if (b <= -2.3e-211) {
tmp = z + x;
} else if (b <= 7.2e-272) {
tmp = (1.0 - t) * a;
} else if (b <= 1.22e+123) {
tmp = fma(-y, z, a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 2.0) * b) tmp = 0.0 if (b <= -4.7e+153) tmp = t_1; elseif (b <= -6.2e+86) tmp = Float64(b * t); elseif (b <= -2.3e-211) tmp = Float64(z + x); elseif (b <= 7.2e-272) tmp = Float64(Float64(1.0 - t) * a); elseif (b <= 1.22e+123) tmp = fma(Float64(-y), z, a); 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), $MachinePrecision]}, If[LessEqual[b, -4.7e+153], t$95$1, If[LessEqual[b, -6.2e+86], N[(b * t), $MachinePrecision], If[LessEqual[b, -2.3e-211], N[(z + x), $MachinePrecision], If[LessEqual[b, 7.2e-272], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 1.22e+123], N[((-y) * z + a), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 2\right) \cdot b\\
\mathbf{if}\;b \leq -4.7 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -6.2 \cdot 10^{+86}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;b \leq -2.3 \cdot 10^{-211}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-272}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;b \leq 1.22 \cdot 10^{+123}:\\
\;\;\;\;\mathsf{fma}\left(-y, z, a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.69999999999999968e153 or 1.22e123 < b Initial program 89.2%
Taylor expanded in x around 0
Applied rewrites94.2%
Taylor expanded in t around 0
Applied rewrites60.0%
Taylor expanded in b around inf
Applied rewrites59.5%
if -4.69999999999999968e153 < b < -6.2000000000000004e86Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites86.7%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6487.1
Applied rewrites87.1%
Taylor expanded in t around inf
Applied rewrites48.2%
if -6.2000000000000004e86 < b < -2.29999999999999988e-211Initial program 96.8%
Taylor expanded in x around 0
Applied rewrites71.1%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6472.9
Applied rewrites72.9%
Taylor expanded in y around 0
Applied rewrites51.9%
Taylor expanded in b around 0
Applied rewrites44.9%
if -2.29999999999999988e-211 < b < 7.19999999999999937e-272Initial program 100.0%
Taylor expanded in a 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
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f6456.4
Applied rewrites56.4%
if 7.19999999999999937e-272 < b < 1.22e123Initial program 95.4%
Taylor expanded in x around 0
Applied rewrites80.3%
Taylor expanded in b around 0
Applied rewrites69.1%
Taylor expanded in t around 0
Applied rewrites56.0%
Taylor expanded in y around inf
Applied rewrites45.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z (fma (- (+ t y) 2.0) b x))))
(if (<= b -1.45e+16)
t_1
(if (<= b 1.9e-30) (- x (fma z (- y 1.0) (* a (- t 1.0)))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - y), z, fma(((t + y) - 2.0), b, x));
double tmp;
if (b <= -1.45e+16) {
tmp = t_1;
} else if (b <= 1.9e-30) {
tmp = x - fma(z, (y - 1.0), (a * (t - 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - y), z, fma(Float64(Float64(t + y) - 2.0), b, x)) tmp = 0.0 if (b <= -1.45e+16) tmp = t_1; elseif (b <= 1.9e-30) tmp = Float64(x - fma(z, Float64(y - 1.0), 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[(1.0 - y), $MachinePrecision] * z + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.45e+16], t$95$1, If[LessEqual[b, 1.9e-30], N[(x - N[(z * N[(y - 1.0), $MachinePrecision] + N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{if}\;b \leq -1.45 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-30}:\\
\;\;\;\;x - \mathsf{fma}\left(z, y - 1, a \cdot \left(t - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.45e16 or 1.9000000000000002e-30 < b Initial program 90.4%
Taylor expanded in x around 0
Applied rewrites89.2%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6492.6
Applied rewrites92.6%
if -1.45e16 < b < 1.9000000000000002e-30Initial program 99.2%
Taylor expanded in x around 0
Applied rewrites76.5%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6493.0
Applied rewrites93.0%
(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 -2.6e+96)
t_1
(if (<= b 1.8e+62) (- x (fma z (- y 1.0) (* a (- t 1.0)))) 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 <= -2.6e+96) {
tmp = t_1;
} else if (b <= 1.8e+62) {
tmp = x - fma(z, (y - 1.0), (a * (t - 1.0)));
} 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 <= -2.6e+96) tmp = t_1; elseif (b <= 1.8e+62) tmp = Float64(x - fma(z, Float64(y - 1.0), 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[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.6e+96], t$95$1, If[LessEqual[b, 1.8e+62], N[(x - N[(z * N[(y - 1.0), $MachinePrecision] + N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $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 -2.6 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{+62}:\\
\;\;\;\;x - \mathsf{fma}\left(z, y - 1, a \cdot \left(t - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.6e96 or 1.8e62 < b Initial program 90.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
lower-+.f6494.2
Applied rewrites94.2%
if -2.6e96 < b < 1.8e62Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites78.6%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6489.5
Applied rewrites89.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -7.5e+25)
t_1
(if (<= y -2.9e-81)
(+ z x)
(if (<= y 3.8e-206) (* (- b a) t) (if (<= y 3950.0) (+ z 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 <= -7.5e+25) {
tmp = t_1;
} else if (y <= -2.9e-81) {
tmp = z + x;
} else if (y <= 3.8e-206) {
tmp = (b - a) * t;
} else if (y <= 3950.0) {
tmp = z + x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (b - z) * y
if (y <= (-7.5d+25)) then
tmp = t_1
else if (y <= (-2.9d-81)) then
tmp = z + x
else if (y <= 3.8d-206) then
tmp = (b - a) * t
else if (y <= 3950.0d0) then
tmp = z + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -7.5e+25) {
tmp = t_1;
} else if (y <= -2.9e-81) {
tmp = z + x;
} else if (y <= 3.8e-206) {
tmp = (b - a) * t;
} else if (y <= 3950.0) {
tmp = z + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - z) * y tmp = 0 if y <= -7.5e+25: tmp = t_1 elif y <= -2.9e-81: tmp = z + x elif y <= 3.8e-206: tmp = (b - a) * t elif y <= 3950.0: tmp = z + 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 <= -7.5e+25) tmp = t_1; elseif (y <= -2.9e-81) tmp = Float64(z + x); elseif (y <= 3.8e-206) tmp = Float64(Float64(b - a) * t); elseif (y <= 3950.0) tmp = Float64(z + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - z) * y; tmp = 0.0; if (y <= -7.5e+25) tmp = t_1; elseif (y <= -2.9e-81) tmp = z + x; elseif (y <= 3.8e-206) tmp = (b - a) * t; elseif (y <= 3950.0) tmp = z + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -7.5e+25], t$95$1, If[LessEqual[y, -2.9e-81], N[(z + x), $MachinePrecision], If[LessEqual[y, 3.8e-206], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 3950.0], N[(z + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-81}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-206}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{elif}\;y \leq 3950:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.49999999999999993e25 or 3950 < y Initial program 91.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.8
Applied rewrites68.8%
if -7.49999999999999993e25 < y < -2.89999999999999989e-81 or 3.80000000000000003e-206 < y < 3950Initial program 96.9%
Taylor expanded in x around 0
Applied rewrites67.4%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6475.7
Applied rewrites75.7%
Taylor expanded in y around 0
Applied rewrites72.0%
Taylor expanded in b around 0
Applied rewrites50.2%
if -2.89999999999999989e-81 < y < 3.80000000000000003e-206Initial program 98.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6450.9
Applied rewrites50.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y 2.0) b)))
(if (<= b -4.7e+153)
t_1
(if (<= b -6.2e+86)
(* b t)
(if (<= b -4.6e-246)
(+ z x)
(if (<= b 1.22e+123) (fma (- y) z a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 2.0) * b;
double tmp;
if (b <= -4.7e+153) {
tmp = t_1;
} else if (b <= -6.2e+86) {
tmp = b * t;
} else if (b <= -4.6e-246) {
tmp = z + x;
} else if (b <= 1.22e+123) {
tmp = fma(-y, z, a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 2.0) * b) tmp = 0.0 if (b <= -4.7e+153) tmp = t_1; elseif (b <= -6.2e+86) tmp = Float64(b * t); elseif (b <= -4.6e-246) tmp = Float64(z + x); elseif (b <= 1.22e+123) tmp = fma(Float64(-y), z, a); 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), $MachinePrecision]}, If[LessEqual[b, -4.7e+153], t$95$1, If[LessEqual[b, -6.2e+86], N[(b * t), $MachinePrecision], If[LessEqual[b, -4.6e-246], N[(z + x), $MachinePrecision], If[LessEqual[b, 1.22e+123], N[((-y) * z + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 2\right) \cdot b\\
\mathbf{if}\;b \leq -4.7 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -6.2 \cdot 10^{+86}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;b \leq -4.6 \cdot 10^{-246}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;b \leq 1.22 \cdot 10^{+123}:\\
\;\;\;\;\mathsf{fma}\left(-y, z, a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.69999999999999968e153 or 1.22e123 < b Initial program 89.2%
Taylor expanded in x around 0
Applied rewrites94.2%
Taylor expanded in t around 0
Applied rewrites60.0%
Taylor expanded in b around inf
Applied rewrites59.5%
if -4.69999999999999968e153 < b < -6.2000000000000004e86Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites86.7%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6487.1
Applied rewrites87.1%
Taylor expanded in t around inf
Applied rewrites48.2%
if -6.2000000000000004e86 < b < -4.5999999999999995e-246Initial program 97.3%
Taylor expanded in x around 0
Applied rewrites72.4%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6469.7
Applied rewrites69.7%
Taylor expanded in y around 0
Applied rewrites49.3%
Taylor expanded in b around 0
Applied rewrites43.2%
if -4.5999999999999995e-246 < b < 1.22e123Initial program 96.5%
Taylor expanded in x around 0
Applied rewrites81.3%
Taylor expanded in b around 0
Applied rewrites71.6%
Taylor expanded in t around 0
Applied rewrites53.5%
Taylor expanded in y around inf
Applied rewrites44.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= b -2.7e+96)
t_1
(if (<= b 7.2e+62) (- x (fma z (- y 1.0) (* a (- t 1.0)))) 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 <= -2.7e+96) {
tmp = t_1;
} else if (b <= 7.2e+62) {
tmp = x - fma(z, (y - 1.0), (a * (t - 1.0)));
} 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 <= -2.7e+96) tmp = t_1; elseif (b <= 7.2e+62) tmp = Float64(x - fma(z, Float64(y - 1.0), 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 + x), $MachinePrecision]}, If[LessEqual[b, -2.7e+96], t$95$1, If[LessEqual[b, 7.2e+62], N[(x - N[(z * N[(y - 1.0), $MachinePrecision] + N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -2.7 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{+62}:\\
\;\;\;\;x - \mathsf{fma}\left(z, y - 1, a \cdot \left(t - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.70000000000000022e96 or 7.2e62 < b Initial program 90.1%
Taylor expanded in x around 0
Applied rewrites90.3%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6495.8
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites44.7%
Taylor expanded in z around 0
Applied rewrites92.0%
if -2.70000000000000022e96 < b < 7.2e62Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites78.6%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6489.5
Applied rewrites89.5%
Final simplification90.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -6e+64)
t_1
(if (<= t -5.8e-50)
(* (- b z) y)
(if (<= t 1450000.0) (fma (- y 2.0) b a) 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 <= -6e+64) {
tmp = t_1;
} else if (t <= -5.8e-50) {
tmp = (b - z) * y;
} else if (t <= 1450000.0) {
tmp = fma((y - 2.0), b, a);
} 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 <= -6e+64) tmp = t_1; elseif (t <= -5.8e-50) tmp = Float64(Float64(b - z) * y); elseif (t <= 1450000.0) tmp = fma(Float64(y - 2.0), b, a); 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, -6e+64], t$95$1, If[LessEqual[t, -5.8e-50], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1450000.0], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -6 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-50}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq 1450000:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.0000000000000004e64 or 1.45e6 < t Initial program 91.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.3
Applied rewrites67.3%
if -6.0000000000000004e64 < t < -5.80000000000000016e-50Initial program 95.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6473.6
Applied rewrites73.6%
if -5.80000000000000016e-50 < t < 1.45e6Initial program 97.3%
Taylor expanded in x around 0
Applied rewrites77.1%
Taylor expanded in t around 0
Applied rewrites74.0%
Taylor expanded in z around 0
Applied rewrites50.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -6e+64)
t_1
(if (<= t -6.2e-119)
(* (- b z) y)
(if (<= t 6.5e+31) (fma (- 1.0 y) z a) 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 <= -6e+64) {
tmp = t_1;
} else if (t <= -6.2e-119) {
tmp = (b - z) * y;
} else if (t <= 6.5e+31) {
tmp = fma((1.0 - y), z, a);
} 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 <= -6e+64) tmp = t_1; elseif (t <= -6.2e-119) tmp = Float64(Float64(b - z) * y); elseif (t <= 6.5e+31) tmp = fma(Float64(1.0 - y), z, a); 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, -6e+64], t$95$1, If[LessEqual[t, -6.2e-119], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 6.5e+31], N[(N[(1.0 - y), $MachinePrecision] * z + a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -6 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6.2 \cdot 10^{-119}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.0000000000000004e64 or 6.5000000000000004e31 < t Initial program 91.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.0
Applied rewrites69.0%
if -6.0000000000000004e64 < t < -6.19999999999999956e-119Initial program 94.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6464.1
Applied rewrites64.1%
if -6.19999999999999956e-119 < t < 6.5000000000000004e31Initial program 98.1%
Taylor expanded in x around 0
Applied rewrites76.7%
Taylor expanded in b around 0
Applied rewrites51.1%
Taylor expanded in t around 0
Applied rewrites50.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.2e+86) (* b t) (if (<= b -4.6e-246) (+ z x) (if (<= b 5.9e+85) (fma (- y) z a) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.2e+86) {
tmp = b * t;
} else if (b <= -4.6e-246) {
tmp = z + x;
} else if (b <= 5.9e+85) {
tmp = fma(-y, z, a);
} else {
tmp = b * t;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.2e+86) tmp = Float64(b * t); elseif (b <= -4.6e-246) tmp = Float64(z + x); elseif (b <= 5.9e+85) tmp = fma(Float64(-y), z, a); else tmp = Float64(b * t); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.2e+86], N[(b * t), $MachinePrecision], If[LessEqual[b, -4.6e-246], N[(z + x), $MachinePrecision], If[LessEqual[b, 5.9e+85], N[((-y) * z + a), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+86}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;b \leq -4.6 \cdot 10^{-246}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;b \leq 5.9 \cdot 10^{+85}:\\
\;\;\;\;\mathsf{fma}\left(-y, z, a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -6.2000000000000004e86 or 5.9e85 < b Initial program 90.4%
Taylor expanded in x around 0
Applied rewrites91.6%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6495.0
Applied rewrites95.0%
Taylor expanded in t around inf
Applied rewrites45.4%
if -6.2000000000000004e86 < b < -4.5999999999999995e-246Initial program 97.3%
Taylor expanded in x around 0
Applied rewrites72.4%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6469.7
Applied rewrites69.7%
Taylor expanded in y around 0
Applied rewrites49.3%
Taylor expanded in b around 0
Applied rewrites43.2%
if -4.5999999999999995e-246 < b < 5.9e85Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites82.3%
Taylor expanded in b around 0
Applied rewrites73.0%
Taylor expanded in t around 0
Applied rewrites56.1%
Taylor expanded in y around inf
Applied rewrites45.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (fma (- (+ t y) 2.0) b x))) (if (<= b -4.7e+86) t_1 (if (<= b 1.2e+32) (fma (- 1.0 y) z (+ a x)) 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 <= -4.7e+86) {
tmp = t_1;
} else if (b <= 1.2e+32) {
tmp = fma((1.0 - y), z, (a + x));
} 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 <= -4.7e+86) tmp = t_1; elseif (b <= 1.2e+32) tmp = fma(Float64(1.0 - y), z, Float64(a + x)); 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, -4.7e+86], t$95$1, If[LessEqual[b, 1.2e+32], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + x), $MachinePrecision]), $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 -4.7 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{+32}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.7000000000000002e86 or 1.19999999999999996e32 < b Initial program 90.1%
Taylor expanded in x around 0
Applied rewrites90.3%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6493.5
Applied rewrites93.5%
Taylor expanded in t around inf
Applied rewrites43.5%
Taylor expanded in z around 0
Applied rewrites87.5%
if -4.7000000000000002e86 < b < 1.19999999999999996e32Initial program 97.9%
Taylor expanded in x around 0
Applied rewrites77.8%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6466.9
Applied rewrites66.9%
Taylor expanded in b around 0
associate--r+N/A
*-commutativeN/A
remove-double-negN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
+-commutativeN/A
sub-negN/A
mul-1-negN/A
mul-1-negN/A
cancel-sign-sub-invN/A
*-commutativeN/A
*-commutativeN/A
Applied rewrites90.8%
Taylor expanded in t around 0
Applied rewrites72.8%
Final simplification79.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (fma (- (+ t y) 2.0) b x))) (if (<= b -2.5e+86) t_1 (if (<= b 8.5e+30) (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(((t + y) - 2.0), b, x);
double tmp;
if (b <= -2.5e+86) {
tmp = t_1;
} else if (b <= 8.5e+30) {
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(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -2.5e+86) tmp = t_1; elseif (b <= 8.5e+30) 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[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -2.5e+86], t$95$1, If[LessEqual[b, 8.5e+30], N[(N[(1.0 - y), $MachinePrecision] * z + x), $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 -2.5 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.4999999999999999e86 or 8.4999999999999995e30 < b Initial program 90.1%
Taylor expanded in x around 0
Applied rewrites90.3%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6493.5
Applied rewrites93.5%
Taylor expanded in t around inf
Applied rewrites43.5%
Taylor expanded in z around 0
Applied rewrites87.5%
if -2.4999999999999999e86 < b < 8.4999999999999995e30Initial program 97.9%
Taylor expanded in x around 0
Applied rewrites77.8%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6466.9
Applied rewrites66.9%
Taylor expanded in b around 0
Applied rewrites59.8%
Final simplification71.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b z) y))) (if (<= y -4.9e+26) t_1 (if (<= y 7.5e+22) (+ (fma (- t 2.0) b z) 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 <= -4.9e+26) {
tmp = t_1;
} else if (y <= 7.5e+22) {
tmp = fma((t - 2.0), b, z) + 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 <= -4.9e+26) tmp = t_1; elseif (y <= 7.5e+22) tmp = Float64(fma(Float64(t - 2.0), b, z) + 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, -4.9e+26], t$95$1, If[LessEqual[y, 7.5e+22], N[(N[(N[(t - 2.0), $MachinePrecision] * b + z), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -4.9 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.89999999999999974e26 or 7.5000000000000002e22 < y Initial program 90.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6471.4
Applied rewrites71.4%
if -4.89999999999999974e26 < y < 7.5000000000000002e22Initial program 97.8%
Taylor expanded in x around 0
Applied rewrites76.8%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6474.9
Applied rewrites74.9%
Taylor expanded in y around 0
Applied rewrites71.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b z) y))) (if (<= y -4.9e+26) t_1 (if (<= y 7.5e+22) (fma (- t 2.0) b 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 <= -4.9e+26) {
tmp = t_1;
} else if (y <= 7.5e+22) {
tmp = fma((t - 2.0), b, 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 <= -4.9e+26) tmp = t_1; elseif (y <= 7.5e+22) tmp = fma(Float64(t - 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 - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.9e+26], t$95$1, If[LessEqual[y, 7.5e+22], N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -4.9 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.89999999999999974e26 or 7.5000000000000002e22 < y Initial program 90.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6471.4
Applied rewrites71.4%
if -4.89999999999999974e26 < y < 7.5000000000000002e22Initial program 97.8%
Taylor expanded in x around 0
Applied rewrites76.8%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6474.9
Applied rewrites74.9%
Taylor expanded in y around 0
Applied rewrites71.7%
Taylor expanded in z around 0
Applied rewrites55.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.2e+86) (* b t) (if (<= b 4.2e+98) (+ z x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.2e+86) {
tmp = b * t;
} else if (b <= 4.2e+98) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-6.2d+86)) then
tmp = b * t
else if (b <= 4.2d+98) then
tmp = z + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.2e+86) {
tmp = b * t;
} else if (b <= 4.2e+98) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.2e+86: tmp = b * t elif b <= 4.2e+98: tmp = z + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.2e+86) tmp = Float64(b * t); elseif (b <= 4.2e+98) tmp = Float64(z + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.2e+86) tmp = b * t; elseif (b <= 4.2e+98) tmp = z + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.2e+86], N[(b * t), $MachinePrecision], If[LessEqual[b, 4.2e+98], N[(z + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+86}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+98}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -6.2000000000000004e86 or 4.20000000000000008e98 < b Initial program 90.2%
Taylor expanded in x around 0
Applied rewrites92.3%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6495.8
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites46.2%
if -6.2000000000000004e86 < b < 4.20000000000000008e98Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites77.2%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6466.9
Applied rewrites66.9%
Taylor expanded in y around 0
Applied rewrites39.9%
Taylor expanded in b around 0
Applied rewrites35.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a -3.3e+177) (+ a z) (if (<= a 4.4e+133) (+ z x) (+ a z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.3e+177) {
tmp = a + z;
} else if (a <= 4.4e+133) {
tmp = z + x;
} else {
tmp = a + 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 (a <= (-3.3d+177)) then
tmp = a + z
else if (a <= 4.4d+133) then
tmp = z + x
else
tmp = a + 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 (a <= -3.3e+177) {
tmp = a + z;
} else if (a <= 4.4e+133) {
tmp = z + x;
} else {
tmp = a + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.3e+177: tmp = a + z elif a <= 4.4e+133: tmp = z + x else: tmp = a + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.3e+177) tmp = Float64(a + z); elseif (a <= 4.4e+133) tmp = Float64(z + x); else tmp = Float64(a + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -3.3e+177) tmp = a + z; elseif (a <= 4.4e+133) tmp = z + x; else tmp = a + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.3e+177], N[(a + z), $MachinePrecision], If[LessEqual[a, 4.4e+133], N[(z + x), $MachinePrecision], N[(a + z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{+177}:\\
\;\;\;\;a + z\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{+133}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;a + z\\
\end{array}
\end{array}
if a < -3.3000000000000001e177 or 4.4e133 < a Initial program 89.5%
Taylor expanded in x around 0
Applied rewrites93.1%
Taylor expanded in b around 0
Applied rewrites77.9%
Taylor expanded in t around 0
Applied rewrites41.8%
Taylor expanded in y around 0
Applied rewrites30.5%
if -3.3000000000000001e177 < a < 4.4e133Initial program 96.0%
Taylor expanded in x around 0
Applied rewrites80.4%
Taylor expanded in a around 0
cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
mul-1-negN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6490.4
Applied rewrites90.4%
Taylor expanded in y around 0
Applied rewrites59.3%
Taylor expanded in b around 0
Applied rewrites31.4%
Final simplification31.2%
(FPCore (x y z t a b) :precision binary64 (+ a z))
double code(double x, double y, double z, double t, double a, double b) {
return a + z;
}
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 + z
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a + z;
}
def code(x, y, z, t, a, b): return a + z
function code(x, y, z, t, a, b) return Float64(a + z) end
function tmp = code(x, y, z, t, a, b) tmp = a + z; end
code[x_, y_, z_, t_, a_, b_] := N[(a + z), $MachinePrecision]
\begin{array}{l}
\\
a + z
\end{array}
Initial program 94.5%
Taylor expanded in x around 0
Applied rewrites83.2%
Taylor expanded in b around 0
Applied rewrites51.0%
Taylor expanded in t around 0
Applied rewrites36.2%
Taylor expanded in y around 0
Applied rewrites18.6%
Final simplification18.6%
herbie shell --seed 2024298
(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)))