
(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 22 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 z) y (* (- 1.0 t) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma((b - z), y, ((1.0 - t) * a));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y - 1.0))) - Float64(a * Float64(t - 1.0)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(Float64(b - z), y, Float64(Float64(1.0 - t) * a)); 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 - z), $MachinePrecision] * y + N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x - z \cdot \left(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 - z, y, \left(1 - t\right) \cdot a\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 rewrites87.5%
Taylor expanded in a around inf
Applied rewrites87.5%
Final simplification99.6%
(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.8e-23)
t_1
(if (<= b 3.2e-129)
(fma (- 1.0 y) z (fma (- 1.0 t) a x))
(if (<= b 8.5e-23) (fma (- b z) y (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 = fma((1.0 - t), a, fma(((t + y) - 2.0), b, x));
double tmp;
if (b <= -8.8e-23) {
tmp = t_1;
} else if (b <= 3.2e-129) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else if (b <= 8.5e-23) {
tmp = fma((b - z), y, fma((t - 2.0), b, (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.8e-23) tmp = t_1; elseif (b <= 3.2e-129) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); elseif (b <= 8.5e-23) tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, Float64(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.8e-23], t$95$1, If[LessEqual[b, 3.2e-129], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e-23], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $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 -8.8 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{-129}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.7999999999999998e-23 or 8.4999999999999996e-23 < b Initial program 93.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-+.f6487.9
Applied rewrites87.9%
if -8.7999999999999998e-23 < b < 3.2000000000000003e-129Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites95.3%
if 3.2000000000000003e-129 < b < 8.4999999999999996e-23Initial program 99.9%
Taylor expanded in a around 0
Applied rewrites93.6%
Final simplification91.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b z) y (fma (- t 2.0) b (fma (- 1.0 t) a z)))))
(if (<= z -2.2e-20)
t_1
(if (<= z 4.7e-11) (fma (- 1.0 t) a (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 - z), y, fma((t - 2.0), b, fma((1.0 - t), a, z)));
double tmp;
if (z <= -2.2e-20) {
tmp = t_1;
} else if (z <= 4.7e-11) {
tmp = fma((1.0 - t), a, 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 - z), y, fma(Float64(t - 2.0), b, fma(Float64(1.0 - t), a, z))) tmp = 0.0 if (z <= -2.2e-20) tmp = t_1; elseif (z <= 4.7e-11) tmp = fma(Float64(1.0 - t), a, 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 - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(N[(1.0 - t), $MachinePrecision] * a + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e-20], t$95$1, If[LessEqual[z, 4.7e-11], N[(N[(1.0 - t), $MachinePrecision] * a + 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 - z, y, \mathsf{fma}\left(t - 2, b, \mathsf{fma}\left(1 - t, a, z\right)\right)\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.19999999999999991e-20 or 4.69999999999999993e-11 < z Initial program 93.9%
Taylor expanded in x around 0
Applied rewrites94.0%
if -2.19999999999999991e-20 < z < 4.69999999999999993e-11Initial 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-+.f6496.8
Applied rewrites96.8%
Final simplification95.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- y) z x)) (t_2 (* (- a) t)))
(if (<= t -1e+137)
t_2
(if (<= t -2.1e-25)
t_1
(if (<= t -8.5e-206)
(* (- y 2.0) b)
(if (<= t 3.6e+37) t_1 (if (<= t 1.05e+231) (* b t) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(-y, z, x);
double t_2 = -a * t;
double tmp;
if (t <= -1e+137) {
tmp = t_2;
} else if (t <= -2.1e-25) {
tmp = t_1;
} else if (t <= -8.5e-206) {
tmp = (y - 2.0) * b;
} else if (t <= 3.6e+37) {
tmp = t_1;
} else if (t <= 1.05e+231) {
tmp = b * t;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(-y), z, x) t_2 = Float64(Float64(-a) * t) tmp = 0.0 if (t <= -1e+137) tmp = t_2; elseif (t <= -2.1e-25) tmp = t_1; elseif (t <= -8.5e-206) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 3.6e+37) tmp = t_1; elseif (t <= 1.05e+231) tmp = Float64(b * t); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z + x), $MachinePrecision]}, Block[{t$95$2 = N[((-a) * t), $MachinePrecision]}, If[LessEqual[t, -1e+137], t$95$2, If[LessEqual[t, -2.1e-25], t$95$1, If[LessEqual[t, -8.5e-206], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 3.6e+37], t$95$1, If[LessEqual[t, 1.05e+231], N[(b * t), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, z, x\right)\\
t_2 := \left(-a\right) \cdot t\\
\mathbf{if}\;t \leq -1 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-206}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+231}:\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1e137 or 1.04999999999999992e231 < t Initial program 90.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6486.1
Applied rewrites86.1%
Taylor expanded in b around 0
Applied rewrites60.0%
if -1e137 < t < -2.10000000000000002e-25 or -8.5000000000000005e-206 < t < 3.59999999999999998e37Initial program 98.4%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites76.3%
Taylor expanded in a around 0
Applied rewrites57.6%
Taylor expanded in y around inf
Applied rewrites46.5%
if -2.10000000000000002e-25 < t < -8.5000000000000005e-206Initial program 97.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6451.5
Applied rewrites51.5%
Taylor expanded in t around 0
Applied rewrites51.5%
if 3.59999999999999998e37 < t < 1.04999999999999992e231Initial program 100.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6450.6
Applied rewrites50.6%
Taylor expanded in t around inf
Applied rewrites43.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- y) z x)) (t_2 (* (- a) t)))
(if (<= t -1e+137)
t_2
(if (<= t -1.15e-79)
t_1
(if (<= t -1.2e-205)
(* b y)
(if (<= t 3.6e+37) t_1 (if (<= t 1.05e+231) (* b t) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(-y, z, x);
double t_2 = -a * t;
double tmp;
if (t <= -1e+137) {
tmp = t_2;
} else if (t <= -1.15e-79) {
tmp = t_1;
} else if (t <= -1.2e-205) {
tmp = b * y;
} else if (t <= 3.6e+37) {
tmp = t_1;
} else if (t <= 1.05e+231) {
tmp = b * t;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(-y), z, x) t_2 = Float64(Float64(-a) * t) tmp = 0.0 if (t <= -1e+137) tmp = t_2; elseif (t <= -1.15e-79) tmp = t_1; elseif (t <= -1.2e-205) tmp = Float64(b * y); elseif (t <= 3.6e+37) tmp = t_1; elseif (t <= 1.05e+231) tmp = Float64(b * t); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z + x), $MachinePrecision]}, Block[{t$95$2 = N[((-a) * t), $MachinePrecision]}, If[LessEqual[t, -1e+137], t$95$2, If[LessEqual[t, -1.15e-79], t$95$1, If[LessEqual[t, -1.2e-205], N[(b * y), $MachinePrecision], If[LessEqual[t, 3.6e+37], t$95$1, If[LessEqual[t, 1.05e+231], N[(b * t), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, z, x\right)\\
t_2 := \left(-a\right) \cdot t\\
\mathbf{if}\;t \leq -1 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-205}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+231}:\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1e137 or 1.04999999999999992e231 < t Initial program 90.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6486.1
Applied rewrites86.1%
Taylor expanded in b around 0
Applied rewrites60.0%
if -1e137 < t < -1.15000000000000006e-79 or -1.2000000000000001e-205 < t < 3.59999999999999998e37Initial program 98.4%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites76.0%
Taylor expanded in a around 0
Applied rewrites56.9%
Taylor expanded in y around inf
Applied rewrites45.6%
if -1.15000000000000006e-79 < t < -1.2000000000000001e-205Initial program 96.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-+.f6486.4
Applied rewrites86.4%
Taylor expanded in y around inf
Applied rewrites43.5%
if 3.59999999999999998e37 < t < 1.04999999999999992e231Initial program 100.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6450.6
Applied rewrites50.6%
Taylor expanded in t around inf
Applied rewrites43.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a) t)))
(if (<= t -7.6e+118)
t_1
(if (<= t -1.15e-79)
(+ z x)
(if (<= t -3.7e-139)
(* b y)
(if (<= t 1.45e+27) (+ z x) (if (<= t 1.05e+231) (* b t) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a * t;
double tmp;
if (t <= -7.6e+118) {
tmp = t_1;
} else if (t <= -1.15e-79) {
tmp = z + x;
} else if (t <= -3.7e-139) {
tmp = b * y;
} else if (t <= 1.45e+27) {
tmp = z + x;
} else if (t <= 1.05e+231) {
tmp = b * t;
} 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 = -a * t
if (t <= (-7.6d+118)) then
tmp = t_1
else if (t <= (-1.15d-79)) then
tmp = z + x
else if (t <= (-3.7d-139)) then
tmp = b * y
else if (t <= 1.45d+27) then
tmp = z + x
else if (t <= 1.05d+231) then
tmp = b * t
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 = -a * t;
double tmp;
if (t <= -7.6e+118) {
tmp = t_1;
} else if (t <= -1.15e-79) {
tmp = z + x;
} else if (t <= -3.7e-139) {
tmp = b * y;
} else if (t <= 1.45e+27) {
tmp = z + x;
} else if (t <= 1.05e+231) {
tmp = b * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a * t tmp = 0 if t <= -7.6e+118: tmp = t_1 elif t <= -1.15e-79: tmp = z + x elif t <= -3.7e-139: tmp = b * y elif t <= 1.45e+27: tmp = z + x elif t <= 1.05e+231: tmp = b * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) * t) tmp = 0.0 if (t <= -7.6e+118) tmp = t_1; elseif (t <= -1.15e-79) tmp = Float64(z + x); elseif (t <= -3.7e-139) tmp = Float64(b * y); elseif (t <= 1.45e+27) tmp = Float64(z + x); elseif (t <= 1.05e+231) tmp = Float64(b * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a * t; tmp = 0.0; if (t <= -7.6e+118) tmp = t_1; elseif (t <= -1.15e-79) tmp = z + x; elseif (t <= -3.7e-139) tmp = b * y; elseif (t <= 1.45e+27) tmp = z + x; elseif (t <= 1.05e+231) tmp = b * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) * t), $MachinePrecision]}, If[LessEqual[t, -7.6e+118], t$95$1, If[LessEqual[t, -1.15e-79], N[(z + x), $MachinePrecision], If[LessEqual[t, -3.7e-139], N[(b * y), $MachinePrecision], If[LessEqual[t, 1.45e+27], N[(z + x), $MachinePrecision], If[LessEqual[t, 1.05e+231], N[(b * t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-a\right) \cdot t\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-79}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-139}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+27}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+231}:\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.60000000000000033e118 or 1.04999999999999992e231 < t Initial program 90.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6484.8
Applied rewrites84.8%
Taylor expanded in b around 0
Applied rewrites59.7%
if -7.60000000000000033e118 < t < -1.15000000000000006e-79 or -3.70000000000000005e-139 < t < 1.4500000000000001e27Initial program 98.5%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites73.9%
Taylor expanded in a around 0
Applied rewrites55.1%
Taylor expanded in y around 0
Applied rewrites35.9%
if -1.15000000000000006e-79 < t < -3.70000000000000005e-139Initial 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-+.f6494.2
Applied rewrites94.2%
Taylor expanded in y around inf
Applied rewrites60.0%
if 1.4500000000000001e27 < t < 1.04999999999999992e231Initial program 100.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6450.7
Applied rewrites50.7%
Taylor expanded in t around inf
Applied rewrites44.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z (+ a x))) (t_2 (fma (- (+ t y) 2.0) b x)))
(if (<= b -9.8e+73)
t_2
(if (<= b -3.8e-96)
t_1
(if (<= b 5.4e-138)
(fma (- 1.0 y) z (* (- 1.0 t) a))
(if (<= b 1.6e+35) 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, (a + x));
double t_2 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -9.8e+73) {
tmp = t_2;
} else if (b <= -3.8e-96) {
tmp = t_1;
} else if (b <= 5.4e-138) {
tmp = fma((1.0 - y), z, ((1.0 - t) * a));
} else if (b <= 1.6e+35) {
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(a + x)) t_2 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -9.8e+73) tmp = t_2; elseif (b <= -3.8e-96) tmp = t_1; elseif (b <= 5.4e-138) tmp = fma(Float64(1.0 - y), z, Float64(Float64(1.0 - t) * a)); elseif (b <= 1.6e+35) 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[(a + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -9.8e+73], t$95$2, If[LessEqual[b, -3.8e-96], t$95$1, If[LessEqual[b, 5.4e-138], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e+35], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, a + x\right)\\
t_2 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -9.8 \cdot 10^{+73}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -3.8 \cdot 10^{-96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.4 \cdot 10^{-138}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \left(1 - t\right) \cdot a\right)\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -9.7999999999999998e73 or 1.59999999999999991e35 < b Initial program 92.4%
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-+.f6488.6
Applied rewrites88.6%
Taylor expanded in a around 0
Applied rewrites74.3%
if -9.7999999999999998e73 < b < -3.8000000000000001e-96 or 5.40000000000000057e-138 < b < 1.59999999999999991e35Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites79.5%
Taylor expanded in t around 0
Applied rewrites69.7%
if -3.8000000000000001e-96 < b < 5.40000000000000057e-138Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites88.4%
Taylor expanded in b around 0
Applied rewrites83.7%
Final simplification76.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 t) a x)) (t_2 (* b (- (+ t y) 2.0))))
(if (<= b -2.8e+111)
t_2
(if (<= b 1.1e-140)
t_1
(if (<= b 8.3e-23) (fma (- 1.0 y) z x) (if (<= b 8e+85) 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 * ((t + y) - 2.0);
double tmp;
if (b <= -2.8e+111) {
tmp = t_2;
} else if (b <= 1.1e-140) {
tmp = t_1;
} else if (b <= 8.3e-23) {
tmp = fma((1.0 - y), z, x);
} else if (b <= 8e+85) {
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(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -2.8e+111) tmp = t_2; elseif (b <= 1.1e-140) tmp = t_1; elseif (b <= 8.3e-23) tmp = fma(Float64(1.0 - y), z, x); elseif (b <= 8e+85) 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[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.8e+111], t$95$2, If[LessEqual[b, 1.1e-140], t$95$1, If[LessEqual[b, 8.3e-23], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[b, 8e+85], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - t, a, x\right)\\
t_2 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -2.8 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8.3 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -2.7999999999999999e111 or 8.0000000000000001e85 < b Initial program 90.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.8
Applied rewrites75.8%
if -2.7999999999999999e111 < b < 1.1e-140 or 8.29999999999999986e-23 < b < 8.0000000000000001e85Initial 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-+.f6475.3
Applied rewrites75.3%
Taylor expanded in b around 0
Applied rewrites62.0%
if 1.1e-140 < b < 8.29999999999999986e-23Initial program 99.9%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites77.6%
Taylor expanded in a around 0
Applied rewrites71.0%
Final simplification67.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b z) y (* (- 1.0 t) a))))
(if (<= a -5e+81)
t_1
(if (<= a -5.1e-238)
(fma (- z) y (fma (- t 2.0) b z))
(if (<= a 1.45e+45) (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 - z), y, ((1.0 - t) * a));
double tmp;
if (a <= -5e+81) {
tmp = t_1;
} else if (a <= -5.1e-238) {
tmp = fma(-z, y, fma((t - 2.0), b, z));
} else if (a <= 1.45e+45) {
tmp = 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 - z), y, Float64(Float64(1.0 - t) * a)) tmp = 0.0 if (a <= -5e+81) tmp = t_1; elseif (a <= -5.1e-238) tmp = fma(Float64(-z), y, fma(Float64(t - 2.0), b, z)); elseif (a <= 1.45e+45) tmp = 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 - z), $MachinePrecision] * y + N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5e+81], t$95$1, If[LessEqual[a, -5.1e-238], N[((-z) * y + N[(N[(t - 2.0), $MachinePrecision] * b + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e+45], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - z, y, \left(1 - t\right) \cdot a\right)\\
\mathbf{if}\;a \leq -5 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5.1 \cdot 10^{-238}:\\
\;\;\;\;\mathsf{fma}\left(-z, y, \mathsf{fma}\left(t - 2, b, z\right)\right)\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.9999999999999998e81 or 1.4499999999999999e45 < a Initial program 95.3%
Taylor expanded in x around 0
Applied rewrites91.1%
Taylor expanded in a around inf
Applied rewrites81.8%
if -4.9999999999999998e81 < a < -5.1000000000000001e-238Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites87.4%
Taylor expanded in a around 0
Applied rewrites76.9%
Taylor expanded in b around 0
Applied rewrites67.6%
if -5.1000000000000001e-238 < a < 1.4499999999999999e45Initial program 96.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-+.f6477.5
Applied rewrites77.5%
Taylor expanded in a around 0
Applied rewrites72.8%
Final simplification75.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z x)) (t_2 (* (- b a) t)))
(if (<= t -4.5e+135)
t_2
(if (<= t -1.15e-79)
t_1
(if (<= t -1.25e-205) (* (- y 2.0) b) (if (<= t 5.2e+33) 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, x);
double t_2 = (b - a) * t;
double tmp;
if (t <= -4.5e+135) {
tmp = t_2;
} else if (t <= -1.15e-79) {
tmp = t_1;
} else if (t <= -1.25e-205) {
tmp = (y - 2.0) * b;
} else if (t <= 5.2e+33) {
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, x) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -4.5e+135) tmp = t_2; elseif (t <= -1.15e-79) tmp = t_1; elseif (t <= -1.25e-205) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 5.2e+33) 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 + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4.5e+135], t$95$2, If[LessEqual[t, -1.15e-79], t$95$1, If[LessEqual[t, -1.25e-205], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 5.2e+33], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, x\right)\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+135}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-205}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -4.50000000000000007e135 or 5.1999999999999995e33 < t Initial program 94.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6479.8
Applied rewrites79.8%
if -4.50000000000000007e135 < t < -1.15000000000000006e-79 or -1.25e-205 < t < 5.1999999999999995e33Initial program 98.4%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites76.0%
Taylor expanded in a around 0
Applied rewrites56.9%
if -1.15000000000000006e-79 < t < -1.25e-205Initial program 96.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6456.6
Applied rewrites56.6%
Taylor expanded in t around 0
Applied rewrites56.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 -2.2e+108)
t_2
(if (<= y -1.8e+22)
t_1
(if (<= y -3.5e-117)
(fma (- t 2.0) b x)
(if (<= y 1.7e+86) 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 <= -2.2e+108) {
tmp = t_2;
} else if (y <= -1.8e+22) {
tmp = t_1;
} else if (y <= -3.5e-117) {
tmp = fma((t - 2.0), b, x);
} else if (y <= 1.7e+86) {
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 <= -2.2e+108) tmp = t_2; elseif (y <= -1.8e+22) tmp = t_1; elseif (y <= -3.5e-117) tmp = fma(Float64(t - 2.0), b, x); elseif (y <= 1.7e+86) 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, -2.2e+108], t$95$2, If[LessEqual[y, -1.8e+22], t$95$1, If[LessEqual[y, -3.5e-117], N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision], If[LessEqual[y, 1.7e+86], 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 -2.2 \cdot 10^{+108}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-117}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, x\right)\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.2000000000000001e108 or 1.6999999999999999e86 < y Initial program 92.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.6
Applied rewrites70.6%
if -2.2000000000000001e108 < y < -1.8e22 or -3.4999999999999998e-117 < y < 1.6999999999999999e86Initial program 98.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-+.f6479.7
Applied rewrites79.7%
Taylor expanded in b around 0
Applied rewrites56.4%
if -1.8e22 < y < -3.4999999999999998e-117Initial program 99.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-+.f6492.8
Applied rewrites92.8%
Taylor expanded in a around 0
Applied rewrites75.8%
Taylor expanded in y around 0
Applied rewrites72.8%
(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.8e-23)
t_1
(if (<= b 8.5e-22) (fma (- 1.0 y) z (fma (- 1.0 t) a 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.8e-23) {
tmp = t_1;
} else if (b <= 8.5e-22) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, 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.8e-23) tmp = t_1; elseif (b <= 8.5e-22) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, 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.8e-23], t$95$1, If[LessEqual[b, 8.5e-22], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + 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.8 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.7999999999999998e-23 or 8.5000000000000001e-22 < b Initial program 93.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-+.f6487.9
Applied rewrites87.9%
if -8.7999999999999998e-23 < b < 8.5000000000000001e-22Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites91.5%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- y) z x)) (t_2 (* (- b a) t)))
(if (<= t -1.35e+38)
t_2
(if (<= t -2.1e-25)
t_1
(if (<= t -8.5e-206) (* (- y 2.0) b) (if (<= t 1.2e+33) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(-y, z, x);
double t_2 = (b - a) * t;
double tmp;
if (t <= -1.35e+38) {
tmp = t_2;
} else if (t <= -2.1e-25) {
tmp = t_1;
} else if (t <= -8.5e-206) {
tmp = (y - 2.0) * b;
} else if (t <= 1.2e+33) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(-y), z, x) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -1.35e+38) tmp = t_2; elseif (t <= -2.1e-25) tmp = t_1; elseif (t <= -8.5e-206) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 1.2e+33) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.35e+38], t$95$2, If[LessEqual[t, -2.1e-25], t$95$1, If[LessEqual[t, -8.5e-206], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 1.2e+33], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, z, x\right)\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-206}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.34999999999999998e38 or 1.2e33 < t Initial program 95.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6473.0
Applied rewrites73.0%
if -1.34999999999999998e38 < t < -2.10000000000000002e-25 or -8.5000000000000005e-206 < t < 1.2e33Initial program 98.1%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites78.4%
Taylor expanded in a around 0
Applied rewrites60.0%
Taylor expanded in y around inf
Applied rewrites48.8%
if -2.10000000000000002e-25 < t < -8.5000000000000005e-206Initial program 97.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6451.5
Applied rewrites51.5%
Taylor expanded in t around 0
Applied rewrites51.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.8e+111)
(fma (- b z) y (fma (- t 2.0) b z))
(if (<= b 8.3e+99)
(fma (- 1.0 y) z (fma (- 1.0 t) a x))
(fma (- b z) y (* (- t 2.0) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.8e+111) {
tmp = fma((b - z), y, fma((t - 2.0), b, z));
} else if (b <= 8.3e+99) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = fma((b - z), y, ((t - 2.0) * b));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.8e+111) tmp = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, z)); elseif (b <= 8.3e+99) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = fma(Float64(b - z), y, Float64(Float64(t - 2.0) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.8e+111], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.3e+99], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z\right)\right)\\
\mathbf{elif}\;b \leq 8.3 \cdot 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \left(t - 2\right) \cdot b\right)\\
\end{array}
\end{array}
if b < -2.7999999999999999e111Initial program 90.9%
Taylor expanded in x around 0
Applied rewrites95.5%
Taylor expanded in a around 0
Applied rewrites86.6%
if -2.7999999999999999e111 < b < 8.3e99Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites84.6%
if 8.3e99 < b Initial program 89.5%
Taylor expanded in x around 0
Applied rewrites92.3%
Taylor expanded in b around inf
Applied rewrites79.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.8e+75)
(fma (- (+ t y) 2.0) b x)
(if (<= b 8.3e+99)
(fma (- 1.0 y) z (fma (- 1.0 t) a x))
(fma (- b z) y (* (- t 2.0) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.8e+75) {
tmp = fma(((t + y) - 2.0), b, x);
} else if (b <= 8.3e+99) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = fma((b - z), y, ((t - 2.0) * b));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.8e+75) tmp = fma(Float64(Float64(t + y) - 2.0), b, x); elseif (b <= 8.3e+99) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = fma(Float64(b - z), y, Float64(Float64(t - 2.0) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.8e+75], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision], If[LessEqual[b, 8.3e+99], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+75}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{elif}\;b \leq 8.3 \cdot 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, \left(t - 2\right) \cdot b\right)\\
\end{array}
\end{array}
if b < -2.80000000000000012e75Initial program 92.4%
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.7
Applied rewrites90.7%
Taylor expanded in a around 0
Applied rewrites79.8%
if -2.80000000000000012e75 < b < 8.3e99Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites86.2%
if 8.3e99 < b Initial program 89.5%
Taylor expanded in x around 0
Applied rewrites92.3%
Taylor expanded in b around inf
Applied rewrites79.4%
Final simplification83.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -6.4e+150)
(* b t)
(if (<= t -1.15e-79)
(+ z x)
(if (<= t -3.7e-139) (* b y) (if (<= t 1.45e+27) (+ z x) (* b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.4e+150) {
tmp = b * t;
} else if (t <= -1.15e-79) {
tmp = z + x;
} else if (t <= -3.7e-139) {
tmp = b * y;
} else if (t <= 1.45e+27) {
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 (t <= (-6.4d+150)) then
tmp = b * t
else if (t <= (-1.15d-79)) then
tmp = z + x
else if (t <= (-3.7d-139)) then
tmp = b * y
else if (t <= 1.45d+27) 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 (t <= -6.4e+150) {
tmp = b * t;
} else if (t <= -1.15e-79) {
tmp = z + x;
} else if (t <= -3.7e-139) {
tmp = b * y;
} else if (t <= 1.45e+27) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.4e+150: tmp = b * t elif t <= -1.15e-79: tmp = z + x elif t <= -3.7e-139: tmp = b * y elif t <= 1.45e+27: tmp = z + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.4e+150) tmp = Float64(b * t); elseif (t <= -1.15e-79) tmp = Float64(z + x); elseif (t <= -3.7e-139) tmp = Float64(b * y); elseif (t <= 1.45e+27) 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 (t <= -6.4e+150) tmp = b * t; elseif (t <= -1.15e-79) tmp = z + x; elseif (t <= -3.7e-139) tmp = b * y; elseif (t <= 1.45e+27) tmp = z + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.4e+150], N[(b * t), $MachinePrecision], If[LessEqual[t, -1.15e-79], N[(z + x), $MachinePrecision], If[LessEqual[t, -3.7e-139], N[(b * y), $MachinePrecision], If[LessEqual[t, 1.45e+27], N[(z + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{+150}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-79}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-139}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+27}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -6.40000000000000031e150 or 1.4500000000000001e27 < t Initial program 94.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6443.8
Applied rewrites43.8%
Taylor expanded in t around inf
Applied rewrites39.0%
if -6.40000000000000031e150 < t < -1.15000000000000006e-79 or -3.70000000000000005e-139 < t < 1.4500000000000001e27Initial program 98.6%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites75.0%
Taylor expanded in a around 0
Applied rewrites54.4%
Taylor expanded in y around 0
Applied rewrites35.2%
if -1.15000000000000006e-79 < t < -3.70000000000000005e-139Initial 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-+.f6494.2
Applied rewrites94.2%
Taylor expanded in y around inf
Applied rewrites60.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 t) a)))
(if (<= a -1.55e+117)
t_1
(if (<= a -2.85e-152) (+ z x) (if (<= a 1.8e+45) (fma (- y) z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (a <= -1.55e+117) {
tmp = t_1;
} else if (a <= -2.85e-152) {
tmp = z + x;
} else if (a <= 1.8e+45) {
tmp = fma(-y, z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - t) * a) tmp = 0.0 if (a <= -1.55e+117) tmp = t_1; elseif (a <= -2.85e-152) tmp = Float64(z + x); elseif (a <= 1.8e+45) tmp = fma(Float64(-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), $MachinePrecision]}, If[LessEqual[a, -1.55e+117], t$95$1, If[LessEqual[a, -2.85e-152], N[(z + x), $MachinePrecision], If[LessEqual[a, 1.8e+45], N[((-y) * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;a \leq -1.55 \cdot 10^{+117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.85 \cdot 10^{-152}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(-y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.54999999999999988e117 or 1.8e45 < a Initial program 95.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--.f6467.1
Applied rewrites67.1%
if -1.54999999999999988e117 < a < -2.8500000000000002e-152Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites65.6%
Taylor expanded in a around 0
Applied rewrites54.3%
Taylor expanded in y around 0
Applied rewrites44.0%
if -2.8500000000000002e-152 < a < 1.8e45Initial program 97.1%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites53.0%
Taylor expanded in a around 0
Applied rewrites47.4%
Taylor expanded in y around inf
Applied rewrites38.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- y) z)))
(if (<= y -2.05e+164)
(* b y)
(if (<= y -1.55e+101) t_1 (if (<= y 3e+47) (+ z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (y <= -2.05e+164) {
tmp = b * y;
} else if (y <= -1.55e+101) {
tmp = t_1;
} else if (y <= 3e+47) {
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 = -y * z
if (y <= (-2.05d+164)) then
tmp = b * y
else if (y <= (-1.55d+101)) then
tmp = t_1
else if (y <= 3d+47) 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 = -y * z;
double tmp;
if (y <= -2.05e+164) {
tmp = b * y;
} else if (y <= -1.55e+101) {
tmp = t_1;
} else if (y <= 3e+47) {
tmp = z + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -y * z tmp = 0 if y <= -2.05e+164: tmp = b * y elif y <= -1.55e+101: tmp = t_1 elif y <= 3e+47: tmp = z + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-y) * z) tmp = 0.0 if (y <= -2.05e+164) tmp = Float64(b * y); elseif (y <= -1.55e+101) tmp = t_1; elseif (y <= 3e+47) tmp = Float64(z + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -y * z; tmp = 0.0; if (y <= -2.05e+164) tmp = b * y; elseif (y <= -1.55e+101) tmp = t_1; elseif (y <= 3e+47) tmp = z + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[y, -2.05e+164], N[(b * y), $MachinePrecision], If[LessEqual[y, -1.55e+101], t$95$1, If[LessEqual[y, 3e+47], N[(z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot z\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+164}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+47}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.05000000000000008e164Initial program 87.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-+.f6479.1
Applied rewrites79.1%
Taylor expanded in y around inf
Applied rewrites58.1%
if -2.05000000000000008e164 < y < -1.55e101 or 3.0000000000000001e47 < y Initial program 94.2%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites69.7%
Taylor expanded in y around inf
Applied rewrites44.1%
if -1.55e101 < y < 3.0000000000000001e47Initial program 99.4%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites70.4%
Taylor expanded in a around 0
Applied rewrites35.0%
Taylor expanded in y around 0
Applied rewrites33.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -4.5e+135)
t_1
(if (<= t 1.2e+33) (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 = (b - a) * t;
double tmp;
if (t <= -4.5e+135) {
tmp = t_1;
} else if (t <= 1.2e+33) {
tmp = fma((1.0 - y), z, (a + x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -4.5e+135) tmp = t_1; elseif (t <= 1.2e+33) 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[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -4.5e+135], t$95$1, If[LessEqual[t, 1.2e+33], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.50000000000000007e135 or 1.2e33 < t Initial program 94.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6479.8
Applied rewrites79.8%
if -4.50000000000000007e135 < t < 1.2e33Initial program 98.1%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites71.2%
Taylor expanded in t around 0
Applied rewrites66.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 t) a x)))
(if (<= a -1.55e+82)
t_1
(if (<= a 4.4e+115) (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((1.0 - t), a, x);
double tmp;
if (a <= -1.55e+82) {
tmp = t_1;
} else if (a <= 4.4e+115) {
tmp = 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(1.0 - t), a, x) tmp = 0.0 if (a <= -1.55e+82) tmp = t_1; elseif (a <= 4.4e+115) tmp = 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[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]}, If[LessEqual[a, -1.55e+82], t$95$1, If[LessEqual[a, 4.4e+115], N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{if}\;a \leq -1.55 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{+115}:\\
\;\;\;\;\mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.55000000000000016e82 or 4.4000000000000001e115 < a Initial program 94.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.4
Applied rewrites87.4%
Taylor expanded in b around 0
Applied rewrites77.3%
if -1.55000000000000016e82 < a < 4.4000000000000001e115Initial program 98.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-+.f6471.3
Applied rewrites71.3%
Taylor expanded in a around 0
Applied rewrites62.3%
Final simplification67.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -6.4e+150) (* b t) (if (<= t 1.45e+27) (+ z x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.4e+150) {
tmp = b * t;
} else if (t <= 1.45e+27) {
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 (t <= (-6.4d+150)) then
tmp = b * t
else if (t <= 1.45d+27) 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 (t <= -6.4e+150) {
tmp = b * t;
} else if (t <= 1.45e+27) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.4e+150: tmp = b * t elif t <= 1.45e+27: tmp = z + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.4e+150) tmp = Float64(b * t); elseif (t <= 1.45e+27) 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 (t <= -6.4e+150) tmp = b * t; elseif (t <= 1.45e+27) tmp = z + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.4e+150], N[(b * t), $MachinePrecision], If[LessEqual[t, 1.45e+27], N[(z + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{+150}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+27}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -6.40000000000000031e150 or 1.4500000000000001e27 < t Initial program 94.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6443.8
Applied rewrites43.8%
Taylor expanded in t around inf
Applied rewrites39.0%
if -6.40000000000000031e150 < t < 1.4500000000000001e27Initial program 98.1%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites72.2%
Taylor expanded in a around 0
Applied rewrites50.1%
Taylor expanded in y around 0
Applied rewrites32.3%
(FPCore (x y z t a b) :precision binary64 (+ z x))
double code(double x, double y, double z, double t, double a, double b) {
return z + x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = z + x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return z + x;
}
def code(x, y, z, t, a, b): return z + x
function code(x, y, z, t, a, b) return Float64(z + x) end
function tmp = code(x, y, z, t, a, b) tmp = z + x; end
code[x_, y_, z_, t_, a_, b_] := N[(z + x), $MachinePrecision]
\begin{array}{l}
\\
z + x
\end{array}
Initial program 96.9%
Taylor expanded in b around 0
+-commutativeN/A
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 rewrites67.9%
Taylor expanded in a around 0
Applied rewrites38.6%
Taylor expanded in y around 0
Applied rewrites23.9%
herbie shell --seed 2024284
(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)))