
(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
(+ (* b (- (+ t y) 2.0)) (- (- x (* z (- y 1.0))) (* a (- t 1.0))))))
(if (<= t_1 INFINITY) t_1 (fma (- b a) t (* (- 1.0 y) z)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma((b - a), t, ((1.0 - y) * z));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y - 1.0))) - Float64(a * Float64(t - 1.0)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(Float64(b - a), t, Float64(Float64(1.0 - y) * z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(b - a), $MachinePrecision] * t + N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \left(1 - y\right) \cdot z\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in x around 0
Applied rewrites60.0%
Taylor expanded in z around inf
Applied rewrites66.7%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (* b (- (+ t y) 2.0)) (- (- x (* z (- y 1.0))) (* a (- t 1.0))))))
(if (<= t_1 -1.2e+307)
(* (- z) y)
(if (<= t_1 1e+298) (+ (+ z x) a) (* (- a) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= -1.2e+307) {
tmp = -z * y;
} else if (t_1 <= 1e+298) {
tmp = (z + x) + a;
} else {
tmp = -a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (b * ((t + y) - 2.0d0)) + ((x - (z * (y - 1.0d0))) - (a * (t - 1.0d0)))
if (t_1 <= (-1.2d+307)) then
tmp = -z * y
else if (t_1 <= 1d+298) then
tmp = (z + x) + a
else
tmp = -a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= -1.2e+307) {
tmp = -z * y;
} else if (t_1 <= 1e+298) {
tmp = (z + x) + a;
} else {
tmp = -a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))) tmp = 0 if t_1 <= -1.2e+307: tmp = -z * y elif t_1 <= 1e+298: tmp = (z + x) + a else: tmp = -a * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y - 1.0))) - Float64(a * Float64(t - 1.0)))) tmp = 0.0 if (t_1 <= -1.2e+307) tmp = Float64(Float64(-z) * y); elseif (t_1 <= 1e+298) tmp = Float64(Float64(z + x) + a); else tmp = Float64(Float64(-a) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))); tmp = 0.0; if (t_1 <= -1.2e+307) tmp = -z * y; elseif (t_1 <= 1e+298) tmp = (z + x) + a; else tmp = -a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1.2e+307], N[((-z) * y), $MachinePrecision], If[LessEqual[t$95$1, 1e+298], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], N[((-a) * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)\right)\\
\mathbf{if}\;t\_1 \leq -1.2 \cdot 10^{+307}:\\
\;\;\;\;\left(-z\right) \cdot y\\
\mathbf{elif}\;t\_1 \leq 10^{+298}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < -1.20000000000000008e307Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6454.1
Applied rewrites54.1%
Taylor expanded in b around 0
Applied rewrites33.4%
if -1.20000000000000008e307 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < 9.9999999999999996e297Initial program 100.0%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites86.5%
Taylor expanded in y around 0
Applied rewrites67.3%
Taylor expanded in b around 0
Applied rewrites55.5%
if 9.9999999999999996e297 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 69.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6454.2
Applied rewrites54.2%
Taylor expanded in b around 0
Applied rewrites42.3%
Final simplification48.9%
(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)))))
(t_2 (* (- a) t)))
(if (<= t_1 -3e+300) t_2 (if (<= t_1 1e+298) (+ (+ z x) a) t_2))))
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 t_2 = -a * t;
double tmp;
if (t_1 <= -3e+300) {
tmp = t_2;
} else if (t_1 <= 1e+298) {
tmp = (z + x) + a;
} 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 = (b * ((t + y) - 2.0d0)) + ((x - (z * (y - 1.0d0))) - (a * (t - 1.0d0)))
t_2 = -a * t
if (t_1 <= (-3d+300)) then
tmp = t_2
else if (t_1 <= 1d+298) then
tmp = (z + x) + a
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 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double t_2 = -a * t;
double tmp;
if (t_1 <= -3e+300) {
tmp = t_2;
} else if (t_1 <= 1e+298) {
tmp = (z + x) + a;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))) t_2 = -a * t tmp = 0 if t_1 <= -3e+300: tmp = t_2 elif t_1 <= 1e+298: tmp = (z + x) + a else: tmp = t_2 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)))) t_2 = Float64(Float64(-a) * t) tmp = 0.0 if (t_1 <= -3e+300) tmp = t_2; elseif (t_1 <= 1e+298) tmp = Float64(Float64(z + x) + a); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))); t_2 = -a * t; tmp = 0.0; if (t_1 <= -3e+300) tmp = t_2; elseif (t_1 <= 1e+298) tmp = (z + x) + a; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-a) * t), $MachinePrecision]}, If[LessEqual[t$95$1, -3e+300], t$95$2, If[LessEqual[t$95$1, 1e+298], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], t$95$2]]]]
\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)\\
t_2 := \left(-a\right) \cdot t\\
\mathbf{if}\;t\_1 \leq -3 \cdot 10^{+300}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+298}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\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)) < -3.00000000000000016e300 or 9.9999999999999996e297 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 85.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6451.9
Applied rewrites51.9%
Taylor expanded in b around 0
Applied rewrites35.9%
if -3.00000000000000016e300 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < 9.9999999999999996e297Initial program 99.9%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites87.3%
Taylor expanded in y around 0
Applied rewrites68.0%
Taylor expanded in b around 0
Applied rewrites56.9%
Final simplification48.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- y 2.0) b (+ a x))) (t_2 (fma (- b a) t (* (- 1.0 y) z))))
(if (<= t -2.25e+21)
t_2
(if (<= t -7.5e-233)
t_1
(if (<= t 1.66e-239)
(fma (- 1.0 y) z (+ a x))
(if (<= t 2.3e+17) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y - 2.0), b, (a + x));
double t_2 = fma((b - a), t, ((1.0 - y) * z));
double tmp;
if (t <= -2.25e+21) {
tmp = t_2;
} else if (t <= -7.5e-233) {
tmp = t_1;
} else if (t <= 1.66e-239) {
tmp = fma((1.0 - y), z, (a + x));
} else if (t <= 2.3e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(y - 2.0), b, Float64(a + x)) t_2 = fma(Float64(b - a), t, Float64(Float64(1.0 - y) * z)) tmp = 0.0 if (t <= -2.25e+21) tmp = t_2; elseif (t <= -7.5e-233) tmp = t_1; elseif (t <= 1.66e-239) tmp = fma(Float64(1.0 - y), z, Float64(a + x)); elseif (t <= 2.3e+17) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y - 2.0), $MachinePrecision] * b + N[(a + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t + N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.25e+21], t$95$2, If[LessEqual[t, -7.5e-233], t$95$1, If[LessEqual[t, 1.66e-239], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+17], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - 2, b, a + x\right)\\
t_2 := \mathsf{fma}\left(b - a, t, \left(1 - y\right) \cdot z\right)\\
\mathbf{if}\;t \leq -2.25 \cdot 10^{+21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-233}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.66 \cdot 10^{-239}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.25e21 or 2.3e17 < t Initial program 91.4%
Taylor expanded in x around 0
Applied rewrites84.2%
Taylor expanded in z around inf
Applied rewrites80.9%
if -2.25e21 < t < -7.49999999999999974e-233 or 1.6599999999999999e-239 < t < 2.3e17Initial program 97.1%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites97.4%
Taylor expanded in z around 0
Applied rewrites74.9%
if -7.49999999999999974e-233 < t < 1.6599999999999999e-239Initial program 94.2%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites97.1%
Taylor expanded in b around 0
Applied rewrites84.9%
(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 -2e+68)
t_2
(if (<= y -2.3e-210)
t_1
(if (<= y 2.5e-96) (fma -2.0 b (+ z x)) (if (<= y 4.2e+44) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - t), a, x);
double t_2 = (b - z) * y;
double tmp;
if (y <= -2e+68) {
tmp = t_2;
} else if (y <= -2.3e-210) {
tmp = t_1;
} else if (y <= 2.5e-96) {
tmp = fma(-2.0, b, (z + x));
} else if (y <= 4.2e+44) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - t), a, x) t_2 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -2e+68) tmp = t_2; elseif (y <= -2.3e-210) tmp = t_1; elseif (y <= 2.5e-96) tmp = fma(-2.0, b, Float64(z + x)); elseif (y <= 4.2e+44) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -2e+68], t$95$2, If[LessEqual[y, -2.3e-210], t$95$1, If[LessEqual[y, 2.5e-96], N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+44], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - t, a, x\right)\\
t_2 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -2 \cdot 10^{+68}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-210}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-96}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, z + x\right)\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.99999999999999991e68 or 4.19999999999999974e44 < y Initial program 90.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6475.0
Applied rewrites75.0%
if -1.99999999999999991e68 < y < -2.3e-210 or 2.49999999999999997e-96 < y < 4.19999999999999974e44Initial program 96.8%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites91.7%
Taylor expanded in b around 0
Applied rewrites67.2%
Taylor expanded in z around 0
Applied rewrites61.4%
if -2.3e-210 < y < 2.49999999999999997e-96Initial program 95.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites96.9%
Taylor expanded in a around 0
Applied rewrites77.8%
Taylor expanded in t around 0
Applied rewrites61.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z (+ (fma (- y 2.0) b x) a))))
(if (<= y -1.5e+67)
t_1
(if (<= y 3.2e+17) (fma (- t 2.0) b (+ (fma (- 1.0 t) a x) z)) 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((y - 2.0), b, x) + a));
double tmp;
if (y <= -1.5e+67) {
tmp = t_1;
} else if (y <= 3.2e+17) {
tmp = fma((t - 2.0), b, (fma((1.0 - t), a, x) + z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - y), z, Float64(fma(Float64(y - 2.0), b, x) + a)) tmp = 0.0 if (y <= -1.5e+67) tmp = t_1; elseif (y <= 3.2e+17) tmp = fma(Float64(t - 2.0), b, Float64(fma(Float64(1.0 - t), a, x) + z)); 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[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+67], t$95$1, If[LessEqual[y, 3.2e+17], N[(N[(t - 2.0), $MachinePrecision] * b + N[(N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+17}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, \mathsf{fma}\left(1 - t, a, x\right) + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.50000000000000005e67 or 3.2e17 < y Initial program 91.3%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites88.2%
if -1.50000000000000005e67 < y < 3.2e17Initial program 96.0%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites95.5%
Final simplification92.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b a) t (* (- 1.0 y) z))))
(if (<= t -6e+110)
t_1
(if (<= t 3.5e+21) (fma (- 1.0 y) z (+ (fma (- y 2.0) b x) a)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - a), t, ((1.0 - y) * z));
double tmp;
if (t <= -6e+110) {
tmp = t_1;
} else if (t <= 3.5e+21) {
tmp = fma((1.0 - y), z, (fma((y - 2.0), b, x) + a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - a), t, Float64(Float64(1.0 - y) * z)) tmp = 0.0 if (t <= -6e+110) tmp = t_1; elseif (t <= 3.5e+21) tmp = fma(Float64(1.0 - y), z, Float64(fma(Float64(y - 2.0), b, x) + 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 + N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+110], t$95$1, If[LessEqual[t, 3.5e+21], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - a, t, \left(1 - y\right) \cdot z\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.00000000000000014e110 or 3.5e21 < t Initial program 90.3%
Taylor expanded in x around 0
Applied rewrites84.3%
Taylor expanded in z around inf
Applied rewrites85.5%
if -6.00000000000000014e110 < t < 3.5e21Initial program 96.3%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites95.4%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -9.5e+121)
t_1
(if (<= b -2.45e-303)
(+ (fma (- 1.0 t) a z) x)
(if (<= b 2.8e+79) (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 * ((t + y) - 2.0);
double tmp;
if (b <= -9.5e+121) {
tmp = t_1;
} else if (b <= -2.45e-303) {
tmp = fma((1.0 - t), a, z) + x;
} else if (b <= 2.8e+79) {
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(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -9.5e+121) tmp = t_1; elseif (b <= -2.45e-303) tmp = Float64(fma(Float64(1.0 - t), a, z) + x); elseif (b <= 2.8e+79) 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[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.5e+121], t$95$1, If[LessEqual[b, -2.45e-303], N[(N[(N[(1.0 - t), $MachinePrecision] * a + z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[b, 2.8e+79], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -9.5 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.45 \cdot 10^{-303}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z\right) + x\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.49999999999999949e121 or 2.8000000000000001e79 < b Initial program 85.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6478.5
Applied rewrites78.5%
if -9.49999999999999949e121 < b < -2.45e-303Initial program 97.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites78.8%
Taylor expanded in b around 0
Applied rewrites72.1%
if -2.45e-303 < b < 2.8000000000000001e79Initial program 100.0%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites85.8%
Taylor expanded in b around 0
Applied rewrites80.5%
Final simplification77.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -9.5e+121)
t_1
(if (<= b 9.8e+79) (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 = b * ((t + y) - 2.0);
double tmp;
if (b <= -9.5e+121) {
tmp = t_1;
} else if (b <= 9.8e+79) {
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 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -9.5e+121) tmp = t_1; elseif (b <= 9.8e+79) 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[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.5e+121], t$95$1, If[LessEqual[b, 9.8e+79], 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 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -9.5 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9.8 \cdot 10^{+79}:\\
\;\;\;\;\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 < -9.49999999999999949e121 or 9.7999999999999997e79 < b Initial program 85.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6478.5
Applied rewrites78.5%
if -9.49999999999999949e121 < b < 9.7999999999999997e79Initial program 98.7%
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
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
Applied rewrites88.4%
Final simplification84.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -7.5e+20)
t_1
(if (<= y 2.9e-96)
(+ (+ (fma -2.0 b z) x) a)
(if (<= y 4.2e+44) (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 = (b - z) * y;
double tmp;
if (y <= -7.5e+20) {
tmp = t_1;
} else if (y <= 2.9e-96) {
tmp = (fma(-2.0, b, z) + x) + a;
} else if (y <= 4.2e+44) {
tmp = fma((1.0 - t), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -7.5e+20) tmp = t_1; elseif (y <= 2.9e-96) tmp = Float64(Float64(fma(-2.0, b, z) + x) + a); elseif (y <= 4.2e+44) tmp = 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[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -7.5e+20], t$95$1, If[LessEqual[y, 2.9e-96], N[(N[(N[(-2.0 * b + z), $MachinePrecision] + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[y, 4.2e+44], N[(N[(1.0 - t), $MachinePrecision] * a + 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^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-96}:\\
\;\;\;\;\left(\mathsf{fma}\left(-2, b, z\right) + x\right) + a\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.5e20 or 4.19999999999999974e44 < y Initial program 91.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.1
Applied rewrites70.1%
if -7.5e20 < y < 2.89999999999999994e-96Initial program 96.6%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites67.3%
Taylor expanded in y around 0
Applied rewrites66.4%
if 2.89999999999999994e-96 < y < 4.19999999999999974e44Initial program 92.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites88.9%
Taylor expanded in b around 0
Applied rewrites75.2%
Taylor expanded in z around 0
Applied rewrites71.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -7.5e+20)
t_1
(if (<= y 4.2e-115)
(+ (+ z x) a)
(if (<= y 3.1e+17) (* (- b a) t) 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+20) {
tmp = t_1;
} else if (y <= 4.2e-115) {
tmp = (z + x) + a;
} else if (y <= 3.1e+17) {
tmp = (b - a) * 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 = (b - z) * y
if (y <= (-7.5d+20)) then
tmp = t_1
else if (y <= 4.2d-115) then
tmp = (z + x) + a
else if (y <= 3.1d+17) then
tmp = (b - a) * 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 = (b - z) * y;
double tmp;
if (y <= -7.5e+20) {
tmp = t_1;
} else if (y <= 4.2e-115) {
tmp = (z + x) + a;
} else if (y <= 3.1e+17) {
tmp = (b - a) * t;
} 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+20: tmp = t_1 elif y <= 4.2e-115: tmp = (z + x) + a elif y <= 3.1e+17: tmp = (b - a) * t 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+20) tmp = t_1; elseif (y <= 4.2e-115) tmp = Float64(Float64(z + x) + a); elseif (y <= 3.1e+17) tmp = Float64(Float64(b - a) * t); 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+20) tmp = t_1; elseif (y <= 4.2e-115) tmp = (z + x) + a; elseif (y <= 3.1e+17) tmp = (b - a) * t; 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+20], t$95$1, If[LessEqual[y, 4.2e-115], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[y, 3.1e+17], N[(N[(b - a), $MachinePrecision] * t), $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^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-115}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+17}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.5e20 or 3.1e17 < y Initial program 92.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.0
Applied rewrites68.0%
if -7.5e20 < y < 4.20000000000000003e-115Initial program 97.4%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites69.1%
Taylor expanded in y around 0
Applied rewrites68.2%
Taylor expanded in b around 0
Applied rewrites52.4%
if 4.20000000000000003e-115 < y < 3.1e17Initial program 88.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6462.6
Applied rewrites62.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -7.2e+87)
t_1
(if (<= t -2.15e+63)
(* (- y 2.0) b)
(if (<= t 3.1e+17) (+ (+ z x) 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 <= -7.2e+87) {
tmp = t_1;
} else if (t <= -2.15e+63) {
tmp = (y - 2.0) * b;
} else if (t <= 3.1e+17) {
tmp = (z + x) + a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (b - a) * t
if (t <= (-7.2d+87)) then
tmp = t_1
else if (t <= (-2.15d+63)) then
tmp = (y - 2.0d0) * b
else if (t <= 3.1d+17) then
tmp = (z + x) + a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -7.2e+87) {
tmp = t_1;
} else if (t <= -2.15e+63) {
tmp = (y - 2.0) * b;
} else if (t <= 3.1e+17) {
tmp = (z + x) + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -7.2e+87: tmp = t_1 elif t <= -2.15e+63: tmp = (y - 2.0) * b elif t <= 3.1e+17: tmp = (z + x) + 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 <= -7.2e+87) tmp = t_1; elseif (t <= -2.15e+63) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 3.1e+17) tmp = Float64(Float64(z + x) + a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -7.2e+87) tmp = t_1; elseif (t <= -2.15e+63) tmp = (y - 2.0) * b; elseif (t <= 3.1e+17) tmp = (z + x) + a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -7.2e+87], t$95$1, If[LessEqual[t, -2.15e+63], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 3.1e+17], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.15 \cdot 10^{+63}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+17}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.19999999999999988e87 or 3.1e17 < t Initial program 91.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.3
Applied rewrites67.3%
if -7.19999999999999988e87 < t < -2.15e63Initial program 88.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6468.3
Applied rewrites68.3%
Taylor expanded in t around 0
Applied rewrites57.9%
if -2.15e63 < t < 3.1e17Initial program 96.6%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites96.8%
Taylor expanded in y around 0
Applied rewrites62.3%
Taylor expanded in b around 0
Applied rewrites49.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -9.5e+121)
t_1
(if (<= b 7.5e+79) (+ (fma (- 1.0 t) a z) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -9.5e+121) {
tmp = t_1;
} else if (b <= 7.5e+79) {
tmp = fma((1.0 - t), a, z) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -9.5e+121) tmp = t_1; elseif (b <= 7.5e+79) tmp = Float64(fma(Float64(1.0 - t), a, z) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.5e+121], t$95$1, If[LessEqual[b, 7.5e+79], N[(N[(N[(1.0 - t), $MachinePrecision] * a + z), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -9.5 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.49999999999999949e121 or 7.49999999999999967e79 < b Initial program 85.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6478.5
Applied rewrites78.5%
if -9.49999999999999949e121 < b < 7.49999999999999967e79Initial program 98.7%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites73.0%
Taylor expanded in b around 0
Applied rewrites67.2%
Final simplification71.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- (+ t y) 2.0)))) (if (<= b -1.25e+46) t_1 (if (<= b 1.5e+14) (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 = b * ((t + y) - 2.0);
double tmp;
if (b <= -1.25e+46) {
tmp = t_1;
} else if (b <= 1.5e+14) {
tmp = fma((1.0 - t), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -1.25e+46) tmp = t_1; elseif (b <= 1.5e+14) tmp = 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[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.25e+46], t$95$1, If[LessEqual[b, 1.5e+14], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -1.25 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.2500000000000001e46 or 1.5e14 < b Initial program 88.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6470.1
Applied rewrites70.1%
if -1.2500000000000001e46 < b < 1.5e14Initial program 98.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites72.1%
Taylor expanded in b around 0
Applied rewrites69.4%
Taylor expanded in z around 0
Applied rewrites58.2%
Final simplification63.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b z) y))) (if (<= y -2e+68) t_1 (if (<= y 4.2e+44) (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 = (b - z) * y;
double tmp;
if (y <= -2e+68) {
tmp = t_1;
} else if (y <= 4.2e+44) {
tmp = fma((1.0 - t), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -2e+68) tmp = t_1; elseif (y <= 4.2e+44) tmp = 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[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -2e+68], t$95$1, If[LessEqual[y, 4.2e+44], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -2 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.99999999999999991e68 or 4.19999999999999974e44 < y Initial program 90.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6475.0
Applied rewrites75.0%
if -1.99999999999999991e68 < y < 4.19999999999999974e44Initial program 96.2%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites93.9%
Taylor expanded in b around 0
Applied rewrites68.5%
Taylor expanded in z around 0
Applied rewrites53.7%
(FPCore (x y z t a b) :precision binary64 (if (<= b -9e+121) (* (- y 2.0) b) (if (<= b 1.86e+90) (+ (+ z x) a) (* (- t 2.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9e+121) {
tmp = (y - 2.0) * b;
} else if (b <= 1.86e+90) {
tmp = (z + x) + a;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-9d+121)) then
tmp = (y - 2.0d0) * b
else if (b <= 1.86d+90) then
tmp = (z + x) + a
else
tmp = (t - 2.0d0) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9e+121) {
tmp = (y - 2.0) * b;
} else if (b <= 1.86e+90) {
tmp = (z + x) + a;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -9e+121: tmp = (y - 2.0) * b elif b <= 1.86e+90: tmp = (z + x) + a else: tmp = (t - 2.0) * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9e+121) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= 1.86e+90) tmp = Float64(Float64(z + x) + a); else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -9e+121) tmp = (y - 2.0) * b; elseif (b <= 1.86e+90) tmp = (z + x) + a; else tmp = (t - 2.0) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9e+121], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 1.86e+90], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{+121}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq 1.86 \cdot 10^{+90}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -9.0000000000000007e121Initial program 80.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
Applied rewrites60.7%
if -9.0000000000000007e121 < b < 1.8600000000000001e90Initial program 98.8%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites78.3%
Taylor expanded in y around 0
Applied rewrites50.0%
Taylor expanded in b around 0
Applied rewrites48.6%
if 1.8600000000000001e90 < b Initial program 89.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.0
Applied rewrites77.0%
Taylor expanded in y around 0
Applied rewrites58.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.32e+122) (* b y) (if (<= b 1.86e+90) (+ (+ z x) a) (* (- t 2.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.32e+122) {
tmp = b * y;
} else if (b <= 1.86e+90) {
tmp = (z + x) + a;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.32d+122)) then
tmp = b * y
else if (b <= 1.86d+90) then
tmp = (z + x) + a
else
tmp = (t - 2.0d0) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.32e+122) {
tmp = b * y;
} else if (b <= 1.86e+90) {
tmp = (z + x) + a;
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.32e+122: tmp = b * y elif b <= 1.86e+90: tmp = (z + x) + a else: tmp = (t - 2.0) * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.32e+122) tmp = Float64(b * y); elseif (b <= 1.86e+90) tmp = Float64(Float64(z + x) + a); else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.32e+122) tmp = b * y; elseif (b <= 1.86e+90) tmp = (z + x) + a; else tmp = (t - 2.0) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.32e+122], N[(b * y), $MachinePrecision], If[LessEqual[b, 1.86e+90], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.32 \cdot 10^{+122}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;b \leq 1.86 \cdot 10^{+90}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -1.31999999999999992e122Initial program 80.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6481.7
Applied rewrites81.7%
Taylor expanded in y around inf
Applied rewrites45.1%
if -1.31999999999999992e122 < b < 1.8600000000000001e90Initial program 98.8%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites78.3%
Taylor expanded in y around 0
Applied rewrites50.0%
Taylor expanded in b around 0
Applied rewrites48.6%
if 1.8600000000000001e90 < b Initial program 89.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.0
Applied rewrites77.0%
Taylor expanded in y around 0
Applied rewrites58.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.32e+122) (* b y) (if (<= b 2.45e+92) (+ (+ z x) a) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.32e+122) {
tmp = b * y;
} else if (b <= 2.45e+92) {
tmp = (z + x) + a;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.32d+122)) then
tmp = b * y
else if (b <= 2.45d+92) then
tmp = (z + x) + a
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.32e+122) {
tmp = b * y;
} else if (b <= 2.45e+92) {
tmp = (z + x) + a;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.32e+122: tmp = b * y elif b <= 2.45e+92: tmp = (z + x) + a else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.32e+122) tmp = Float64(b * y); elseif (b <= 2.45e+92) tmp = Float64(Float64(z + x) + a); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.32e+122) tmp = b * y; elseif (b <= 2.45e+92) tmp = (z + x) + a; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.32e+122], N[(b * y), $MachinePrecision], If[LessEqual[b, 2.45e+92], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.32 \cdot 10^{+122}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;b \leq 2.45 \cdot 10^{+92}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -1.31999999999999992e122Initial program 80.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6481.7
Applied rewrites81.7%
Taylor expanded in y around inf
Applied rewrites45.1%
if -1.31999999999999992e122 < b < 2.4500000000000001e92Initial program 98.8%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites78.3%
Taylor expanded in y around 0
Applied rewrites50.0%
Taylor expanded in b around 0
Applied rewrites48.6%
if 2.4500000000000001e92 < b Initial program 89.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6477.0
Applied rewrites77.0%
Taylor expanded in t around inf
Applied rewrites38.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.15e+122) (* b y) (if (<= b 3.7e+80) (+ z x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.15e+122) {
tmp = b * y;
} else if (b <= 3.7e+80) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.15d+122)) then
tmp = b * y
else if (b <= 3.7d+80) then
tmp = z + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.15e+122) {
tmp = b * y;
} else if (b <= 3.7e+80) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.15e+122: tmp = b * y elif b <= 3.7e+80: tmp = z + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.15e+122) tmp = Float64(b * y); elseif (b <= 3.7e+80) tmp = Float64(z + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.15e+122) tmp = b * y; elseif (b <= 3.7e+80) tmp = z + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.15e+122], N[(b * y), $MachinePrecision], If[LessEqual[b, 3.7e+80], N[(z + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.15 \cdot 10^{+122}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{+80}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -1.15e122Initial program 80.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6481.7
Applied rewrites81.7%
Taylor expanded in y around inf
Applied rewrites45.1%
if -1.15e122 < b < 3.69999999999999996e80Initial program 98.8%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites72.6%
Taylor expanded in b around 0
Applied rewrites66.8%
Taylor expanded in a around 0
Applied rewrites38.5%
if 3.69999999999999996e80 < b Initial program 89.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6475.5
Applied rewrites75.5%
Taylor expanded in t around inf
Applied rewrites37.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.46e+80) (* b t) (if (<= b 3.7e+80) (+ z x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.46e+80) {
tmp = b * t;
} else if (b <= 3.7e+80) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-1.46d+80)) then
tmp = b * t
else if (b <= 3.7d+80) then
tmp = z + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.46e+80) {
tmp = b * t;
} else if (b <= 3.7e+80) {
tmp = z + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.46e+80: tmp = b * t elif b <= 3.7e+80: tmp = z + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.46e+80) tmp = Float64(b * t); elseif (b <= 3.7e+80) tmp = Float64(z + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.46e+80) tmp = b * t; elseif (b <= 3.7e+80) tmp = z + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.46e+80], N[(b * t), $MachinePrecision], If[LessEqual[b, 3.7e+80], N[(z + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.46 \cdot 10^{+80}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{+80}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -1.4599999999999999e80 or 3.69999999999999996e80 < b Initial program 86.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6476.0
Applied rewrites76.0%
Taylor expanded in t around inf
Applied rewrites30.7%
if -1.4599999999999999e80 < b < 3.69999999999999996e80Initial program 98.7%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites72.5%
Taylor expanded in b around 0
Applied rewrites67.1%
Taylor expanded in a around 0
Applied rewrites39.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 94.1%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites70.2%
Taylor expanded in b around 0
Applied rewrites53.2%
Taylor expanded in a around 0
Applied rewrites26.9%
herbie shell --seed 2024235
(FPCore (x y z t a b)
:name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
:precision binary64
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))