
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(if (<= t_1 INFINITY) t_1 (* t (- b a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * (b - a);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * (b - a) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(b - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = t * (b - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - 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 t around inf
lower-*.f64N/A
lower--.f6486.0
Applied rewrites86.0%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(if (<= t_1 (- INFINITY))
(* t (- a))
(if (<= t_1 1e+307) (+ x (+ z a)) (* b (+ y -2.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t * -a;
} else if (t_1 <= 1e+307) {
tmp = x + (z + a);
} else {
tmp = b * (y + -2.0);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t * -a;
} else if (t_1 <= 1e+307) {
tmp = x + (z + a);
} else {
tmp = b * (y + -2.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b) tmp = 0 if t_1 <= -math.inf: tmp = t * -a elif t_1 <= 1e+307: tmp = x + (z + a) else: tmp = b * (y + -2.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(t * Float64(-a)); elseif (t_1 <= 1e+307) tmp = Float64(x + Float64(z + a)); else tmp = Float64(b * Float64(y + -2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b); tmp = 0.0; if (t_1 <= -Inf) tmp = t * -a; elseif (t_1 <= 1e+307) tmp = x + (z + a); else tmp = b * (y + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t * (-a)), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;x + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(y + -2\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < -inf.0Initial program 100.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6463.1
Applied rewrites63.1%
Taylor expanded in b around 0
Applied rewrites50.2%
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)) < 9.99999999999999986e306Initial program 100.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites80.9%
Taylor expanded in y around 0
Applied rewrites59.9%
Taylor expanded in b around 0
Applied rewrites51.3%
if 9.99999999999999986e306 < (+.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 72.0%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval53.0
Applied rewrites53.0%
Taylor expanded in t around 0
Applied rewrites33.7%
Final simplification47.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(if (<= t_1 (- INFINITY))
(* t (- a))
(if (<= t_1 1e+307) (+ x (+ z a)) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t * -a;
} else if (t_1 <= 1e+307) {
tmp = x + (z + a);
} else {
tmp = y * b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t * -a;
} else if (t_1 <= 1e+307) {
tmp = x + (z + a);
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b) tmp = 0 if t_1 <= -math.inf: tmp = t * -a elif t_1 <= 1e+307: tmp = x + (z + a) else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(t * Float64(-a)); elseif (t_1 <= 1e+307) tmp = Float64(x + Float64(z + a)); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b); tmp = 0.0; if (t_1 <= -Inf) tmp = t * -a; elseif (t_1 <= 1e+307) tmp = x + (z + a); else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(t * (-a)), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(y * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;x + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < -inf.0Initial program 100.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6463.1
Applied rewrites63.1%
Taylor expanded in b around 0
Applied rewrites50.2%
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)) < 9.99999999999999986e306Initial program 100.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites80.9%
Taylor expanded in y around 0
Applied rewrites59.9%
Taylor expanded in b around 0
Applied rewrites51.3%
if 9.99999999999999986e306 < (+.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 72.0%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6474.3
Applied rewrites74.3%
Taylor expanded in y around inf
Applied rewrites32.9%
Final simplification47.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(if (<= t_1 (- INFINITY))
(* y (- z))
(if (<= t_1 1e+307) (+ x (+ z a)) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * -z;
} else if (t_1 <= 1e+307) {
tmp = x + (z + a);
} else {
tmp = y * b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * -z;
} else if (t_1 <= 1e+307) {
tmp = x + (z + a);
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b) tmp = 0 if t_1 <= -math.inf: tmp = y * -z elif t_1 <= 1e+307: tmp = x + (z + a) else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(-z)); elseif (t_1 <= 1e+307) tmp = Float64(x + Float64(z + a)); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b); tmp = 0.0; if (t_1 <= -Inf) tmp = y * -z; elseif (t_1 <= 1e+307) tmp = x + (z + a); else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * (-z)), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(y * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;x + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < -inf.0Initial program 100.0%
Taylor expanded in z around inf
sub-negN/A
neg-mul-1N/A
distribute-rgt-inN/A
associate-*r*N/A
*-lft-identityN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
Taylor expanded in y around inf
Applied rewrites26.2%
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)) < 9.99999999999999986e306Initial program 100.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites80.9%
Taylor expanded in y around 0
Applied rewrites59.9%
Taylor expanded in b around 0
Applied rewrites51.3%
if 9.99999999999999986e306 < (+.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 72.0%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6474.3
Applied rewrites74.3%
Taylor expanded in y around inf
Applied rewrites32.9%
Final simplification44.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(if (<= t_1 (- INFINITY))
(* y b)
(if (<= t_1 1e+307) (+ x (+ z a)) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * b;
} else if (t_1 <= 1e+307) {
tmp = x + (z + a);
} else {
tmp = y * b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * b;
} else if (t_1 <= 1e+307) {
tmp = x + (z + a);
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b) tmp = 0 if t_1 <= -math.inf: tmp = y * b elif t_1 <= 1e+307: tmp = x + (z + a) else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * b); elseif (t_1 <= 1e+307) tmp = Float64(x + Float64(z + a)); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b); tmp = 0.0; if (t_1 <= -Inf) tmp = y * b; elseif (t_1 <= 1e+307) tmp = x + (z + a); else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * b), $MachinePrecision], If[LessEqual[t$95$1, 1e+307], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(y * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;x + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\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.0 or 9.99999999999999986e306 < (+.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 83.9%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6475.5
Applied rewrites75.5%
Taylor expanded in y around inf
Applied rewrites28.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)) < 9.99999999999999986e306Initial program 100.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites80.9%
Taylor expanded in y around 0
Applied rewrites59.9%
Taylor expanded in b around 0
Applied rewrites51.3%
Final simplification43.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 y) x)) (t_2 (* t (- b a))))
(if (<= t -1.7e+125)
t_2
(if (<= t -1.75e-23)
t_1
(if (<= t -7.5e-161)
(* b (+ y -2.0))
(if (<= t 4.2e-243)
t_1
(if (<= t 3.2e-37) (+ x (+ z a)) (if (<= t 5.4e+110) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (1.0 - y), x);
double t_2 = t * (b - a);
double tmp;
if (t <= -1.7e+125) {
tmp = t_2;
} else if (t <= -1.75e-23) {
tmp = t_1;
} else if (t <= -7.5e-161) {
tmp = b * (y + -2.0);
} else if (t <= 4.2e-243) {
tmp = t_1;
} else if (t <= 3.2e-37) {
tmp = x + (z + a);
} else if (t <= 5.4e+110) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - y), x) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1.7e+125) tmp = t_2; elseif (t <= -1.75e-23) tmp = t_1; elseif (t <= -7.5e-161) tmp = Float64(b * Float64(y + -2.0)); elseif (t <= 4.2e-243) tmp = t_1; elseif (t <= 3.2e-37) tmp = Float64(x + Float64(z + a)); elseif (t <= 5.4e+110) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+125], t$95$2, If[LessEqual[t, -1.75e-23], t$95$1, If[LessEqual[t, -7.5e-161], N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-243], t$95$1, If[LessEqual[t, 3.2e-37], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+110], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-161}:\\
\;\;\;\;b \cdot \left(y + -2\right)\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-37}:\\
\;\;\;\;x + \left(z + a\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.6999999999999999e125 or 5.40000000000000019e110 < t Initial program 87.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6479.6
Applied rewrites79.6%
if -1.6999999999999999e125 < t < -1.74999999999999997e-23 or -7.49999999999999991e-161 < t < 4.2000000000000002e-243 or 3.1999999999999999e-37 < t < 5.40000000000000019e110Initial program 97.7%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites79.0%
Taylor expanded in a around 0
Applied rewrites62.3%
if -1.74999999999999997e-23 < t < -7.49999999999999991e-161Initial program 97.1%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval54.8
Applied rewrites54.8%
Taylor expanded in t around 0
Applied rewrites54.8%
if 4.2000000000000002e-243 < t < 3.1999999999999999e-37Initial program 100.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites100.0%
Taylor expanded in y around 0
Applied rewrites71.8%
Taylor expanded in b around 0
Applied rewrites61.3%
Final simplification67.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -1e+165)
t_1
(if (<= t -7e+23)
(fma a (- t) (+ x z))
(if (<= t -8.4e-22)
(fma a (- 1.0 t) (* y (- z)))
(if (<= t -5.5e-239)
(fma b (+ y -2.0) (+ x a))
(if (<= t 5.4e+110) (+ a (fma z (- 1.0 y) x)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -1e+165) {
tmp = t_1;
} else if (t <= -7e+23) {
tmp = fma(a, -t, (x + z));
} else if (t <= -8.4e-22) {
tmp = fma(a, (1.0 - t), (y * -z));
} else if (t <= -5.5e-239) {
tmp = fma(b, (y + -2.0), (x + a));
} else if (t <= 5.4e+110) {
tmp = a + fma(z, (1.0 - y), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1e+165) tmp = t_1; elseif (t <= -7e+23) tmp = fma(a, Float64(-t), Float64(x + z)); elseif (t <= -8.4e-22) tmp = fma(a, Float64(1.0 - t), Float64(y * Float64(-z))); elseif (t <= -5.5e-239) tmp = fma(b, Float64(y + -2.0), Float64(x + a)); elseif (t <= 5.4e+110) tmp = Float64(a + fma(z, Float64(1.0 - y), x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+165], t$95$1, If[LessEqual[t, -7e+23], N[(a * (-t) + N[(x + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8.4e-22], N[(a * N[(1.0 - t), $MachinePrecision] + N[(y * (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-239], N[(b * N[(y + -2.0), $MachinePrecision] + N[(x + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+110], N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7 \cdot 10^{+23}:\\
\;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\
\mathbf{elif}\;t \leq -8.4 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, y \cdot \left(-z\right)\right)\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-239}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, x + a\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\
\;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.99999999999999899e164 or 5.40000000000000019e110 < t Initial program 86.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6480.4
Applied rewrites80.4%
if -9.99999999999999899e164 < t < -7.0000000000000004e23Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites89.6%
Taylor expanded in y around 0
Applied rewrites89.6%
Taylor expanded in t around inf
Applied rewrites89.6%
if -7.0000000000000004e23 < t < -8.40000000000000031e-22Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites91.5%
Taylor expanded in y around inf
Applied rewrites91.5%
if -8.40000000000000031e-22 < t < -5.49999999999999978e-239Initial program 97.9%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites97.9%
Taylor expanded in z around 0
Applied rewrites81.5%
if -5.49999999999999978e-239 < t < 5.40000000000000019e110Initial program 97.9%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites91.9%
Taylor expanded in b around 0
Applied rewrites69.6%
Final simplification77.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (fma z (- 1.0 y) x))) (t_2 (* t (- b a))))
(if (<= t -1e+165)
t_2
(if (<= t -4.35e+18)
(fma a (- t) (+ x z))
(if (<= t -3.8e-23)
t_1
(if (<= t -5.5e-239)
(fma b (+ y -2.0) (+ x a))
(if (<= t 5.4e+110) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + fma(z, (1.0 - y), x);
double t_2 = t * (b - a);
double tmp;
if (t <= -1e+165) {
tmp = t_2;
} else if (t <= -4.35e+18) {
tmp = fma(a, -t, (x + z));
} else if (t <= -3.8e-23) {
tmp = t_1;
} else if (t <= -5.5e-239) {
tmp = fma(b, (y + -2.0), (x + a));
} else if (t <= 5.4e+110) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a + fma(z, Float64(1.0 - y), x)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1e+165) tmp = t_2; elseif (t <= -4.35e+18) tmp = fma(a, Float64(-t), Float64(x + z)); elseif (t <= -3.8e-23) tmp = t_1; elseif (t <= -5.5e-239) tmp = fma(b, Float64(y + -2.0), Float64(x + a)); elseif (t <= 5.4e+110) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+165], t$95$2, If[LessEqual[t, -4.35e+18], N[(a * (-t) + N[(x + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-23], t$95$1, If[LessEqual[t, -5.5e-239], N[(b * N[(y + -2.0), $MachinePrecision] + N[(x + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+110], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \mathsf{fma}\left(z, 1 - y, x\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+165}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.35 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-239}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, x + a\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -9.99999999999999899e164 or 5.40000000000000019e110 < t Initial program 86.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6480.4
Applied rewrites80.4%
if -9.99999999999999899e164 < t < -4.35e18Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites90.6%
Taylor expanded in y around 0
Applied rewrites90.6%
Taylor expanded in t around inf
Applied rewrites90.6%
if -4.35e18 < t < -3.80000000000000011e-23 or -5.49999999999999978e-239 < t < 5.40000000000000019e110Initial program 98.1%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites92.6%
Taylor expanded in b around 0
Applied rewrites71.3%
if -3.80000000000000011e-23 < t < -5.49999999999999978e-239Initial program 97.9%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites97.9%
Taylor expanded in z around 0
Applied rewrites81.5%
Final simplification77.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 y) x))
(t_2 (fma b (+ y (+ t -2.0)) (fma a (- 1.0 t) x))))
(if (<= t -4e+184)
t_2
(if (<= t -2.5e+18)
(fma a (- 1.0 t) t_1)
(if (<= t 2.5e+102) (fma b (+ y -2.0) (+ a t_1)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (1.0 - y), x);
double t_2 = fma(b, (y + (t + -2.0)), fma(a, (1.0 - t), x));
double tmp;
if (t <= -4e+184) {
tmp = t_2;
} else if (t <= -2.5e+18) {
tmp = fma(a, (1.0 - t), t_1);
} else if (t <= 2.5e+102) {
tmp = fma(b, (y + -2.0), (a + t_1));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - y), x) t_2 = fma(b, Float64(y + Float64(t + -2.0)), fma(a, Float64(1.0 - t), x)) tmp = 0.0 if (t <= -4e+184) tmp = t_2; elseif (t <= -2.5e+18) tmp = fma(a, Float64(1.0 - t), t_1); elseif (t <= 2.5e+102) tmp = fma(b, Float64(y + -2.0), Float64(a + t_1)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+184], t$95$2, If[LessEqual[t, -2.5e+18], N[(a * N[(1.0 - t), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2.5e+102], N[(b * N[(y + -2.0), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\
t_2 := \mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, 1 - t, x\right)\right)\\
\mathbf{if}\;t \leq -4 \cdot 10^{+184}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, t\_1\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+102}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, a + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -4.00000000000000007e184 or 2.5e102 < t Initial program 86.4%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6487.3
Applied rewrites87.3%
if -4.00000000000000007e184 < t < -2.5e18Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites88.5%
if -2.5e18 < t < 2.5e102Initial program 98.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites94.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (+ x (+ z a))) (t_3 (* t (- b a))))
(if (<= t -3.45e+18)
t_3
(if (<= t -1.9e-70)
t_1
(if (<= t -9e-236)
t_2
(if (<= t 2.2e-196) t_1 (if (<= t 4.9e+64) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = x + (z + a);
double t_3 = t * (b - a);
double tmp;
if (t <= -3.45e+18) {
tmp = t_3;
} else if (t <= -1.9e-70) {
tmp = t_1;
} else if (t <= -9e-236) {
tmp = t_2;
} else if (t <= 2.2e-196) {
tmp = t_1;
} else if (t <= 4.9e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = y * (b - z)
t_2 = x + (z + a)
t_3 = t * (b - a)
if (t <= (-3.45d+18)) then
tmp = t_3
else if (t <= (-1.9d-70)) then
tmp = t_1
else if (t <= (-9d-236)) then
tmp = t_2
else if (t <= 2.2d-196) then
tmp = t_1
else if (t <= 4.9d+64) then
tmp = t_2
else
tmp = t_3
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 * (b - z);
double t_2 = x + (z + a);
double t_3 = t * (b - a);
double tmp;
if (t <= -3.45e+18) {
tmp = t_3;
} else if (t <= -1.9e-70) {
tmp = t_1;
} else if (t <= -9e-236) {
tmp = t_2;
} else if (t <= 2.2e-196) {
tmp = t_1;
} else if (t <= 4.9e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = x + (z + a) t_3 = t * (b - a) tmp = 0 if t <= -3.45e+18: tmp = t_3 elif t <= -1.9e-70: tmp = t_1 elif t <= -9e-236: tmp = t_2 elif t <= 2.2e-196: tmp = t_1 elif t <= 4.9e+64: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) t_2 = Float64(x + Float64(z + a)) t_3 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -3.45e+18) tmp = t_3; elseif (t <= -1.9e-70) tmp = t_1; elseif (t <= -9e-236) tmp = t_2; elseif (t <= 2.2e-196) tmp = t_1; elseif (t <= 4.9e+64) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); t_2 = x + (z + a); t_3 = t * (b - a); tmp = 0.0; if (t <= -3.45e+18) tmp = t_3; elseif (t <= -1.9e-70) tmp = t_1; elseif (t <= -9e-236) tmp = t_2; elseif (t <= 2.2e-196) tmp = t_1; elseif (t <= 4.9e+64) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.45e+18], t$95$3, If[LessEqual[t, -1.9e-70], t$95$1, If[LessEqual[t, -9e-236], t$95$2, If[LessEqual[t, 2.2e-196], t$95$1, If[LessEqual[t, 4.9e+64], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := x + \left(z + a\right)\\
t_3 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -3.45 \cdot 10^{+18}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-236}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -3.45e18 or 4.9000000000000003e64 < t Initial program 89.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6470.7
Applied rewrites70.7%
if -3.45e18 < t < -1.8999999999999999e-70 or -8.99999999999999997e-236 < t < 2.20000000000000015e-196Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6461.1
Applied rewrites61.1%
if -1.8999999999999999e-70 < t < -8.99999999999999997e-236 or 2.20000000000000015e-196 < t < 4.9000000000000003e64Initial program 97.6%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites94.2%
Taylor expanded in y around 0
Applied rewrites65.7%
Taylor expanded in b around 0
Applied rewrites55.4%
Final simplification63.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma a (- 1.0 t) (+ x z))) (t_2 (* b (+ y (+ t -2.0)))))
(if (<= b -6.5e+74)
t_2
(if (<= b -1.35e-25)
t_1
(if (<= b 1.32e-164)
(+ a (fma z (- 1.0 y) x))
(if (<= b 6.8e+224) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(a, (1.0 - t), (x + z));
double t_2 = b * (y + (t + -2.0));
double tmp;
if (b <= -6.5e+74) {
tmp = t_2;
} else if (b <= -1.35e-25) {
tmp = t_1;
} else if (b <= 1.32e-164) {
tmp = a + fma(z, (1.0 - y), x);
} else if (b <= 6.8e+224) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(a, Float64(1.0 - t), Float64(x + z)) t_2 = Float64(b * Float64(y + Float64(t + -2.0))) tmp = 0.0 if (b <= -6.5e+74) tmp = t_2; elseif (b <= -1.35e-25) tmp = t_1; elseif (b <= 1.32e-164) tmp = Float64(a + fma(z, Float64(1.0 - y), x)); elseif (b <= 6.8e+224) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.5e+74], t$95$2, If[LessEqual[b, -1.35e-25], t$95$1, If[LessEqual[b, 1.32e-164], N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.8e+224], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, 1 - t, x + z\right)\\
t_2 := b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{if}\;b \leq -6.5 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.35 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.32 \cdot 10^{-164}:\\
\;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -6.49999999999999962e74 or 6.8000000000000004e224 < b Initial program 89.1%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval80.1
Applied rewrites80.1%
if -6.49999999999999962e74 < b < -1.35000000000000008e-25 or 1.3199999999999999e-164 < b < 6.8000000000000004e224Initial program 93.1%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites76.0%
Taylor expanded in y around 0
Applied rewrites70.8%
if -1.35000000000000008e-25 < b < 1.3199999999999999e-164Initial program 100.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites78.5%
Taylor expanded in b around 0
Applied rewrites75.9%
Final simplification75.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma a (- t) (+ x z))) (t_2 (* b (+ y (+ t -2.0)))))
(if (<= b -3.5e+71)
t_2
(if (<= b -1.35e-25)
t_1
(if (<= b 1.32e-164)
(fma z (- 1.0 y) x)
(if (<= b 2.1e+199) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(a, -t, (x + z));
double t_2 = b * (y + (t + -2.0));
double tmp;
if (b <= -3.5e+71) {
tmp = t_2;
} else if (b <= -1.35e-25) {
tmp = t_1;
} else if (b <= 1.32e-164) {
tmp = fma(z, (1.0 - y), x);
} else if (b <= 2.1e+199) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(a, Float64(-t), Float64(x + z)) t_2 = Float64(b * Float64(y + Float64(t + -2.0))) tmp = 0.0 if (b <= -3.5e+71) tmp = t_2; elseif (b <= -1.35e-25) tmp = t_1; elseif (b <= 1.32e-164) tmp = fma(z, Float64(1.0 - y), x); elseif (b <= 2.1e+199) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * (-t) + N[(x + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e+71], t$95$2, If[LessEqual[b, -1.35e-25], t$95$1, If[LessEqual[b, 1.32e-164], N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[b, 2.1e+199], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, -t, x + z\right)\\
t_2 := b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.35 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.32 \cdot 10^{-164}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{+199}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3.4999999999999999e71 or 2.1e199 < b Initial program 89.7%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval78.4
Applied rewrites78.4%
if -3.4999999999999999e71 < b < -1.35000000000000008e-25 or 1.3199999999999999e-164 < b < 2.1e199Initial program 92.8%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites76.1%
Taylor expanded in y around 0
Applied rewrites70.7%
Taylor expanded in t around inf
Applied rewrites58.5%
if -1.35000000000000008e-25 < b < 1.3199999999999999e-164Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites94.2%
Taylor expanded in a around 0
Applied rewrites64.7%
Final simplification66.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 y) x)))
(if (<= t -2.5e+18)
(fma a (- 1.0 t) t_1)
(if (<= t 5.4e+110) (fma b (+ y -2.0) (+ a t_1)) (* t (- b a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (1.0 - y), x);
double tmp;
if (t <= -2.5e+18) {
tmp = fma(a, (1.0 - t), t_1);
} else if (t <= 5.4e+110) {
tmp = fma(b, (y + -2.0), (a + t_1));
} else {
tmp = t * (b - a);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - y), x) tmp = 0.0 if (t <= -2.5e+18) tmp = fma(a, Float64(1.0 - t), t_1); elseif (t <= 5.4e+110) tmp = fma(b, Float64(y + -2.0), Float64(a + t_1)); else tmp = Float64(t * Float64(b - a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -2.5e+18], N[(a * N[(1.0 - t), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 5.4e+110], N[(b * N[(y + -2.0), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, t\_1\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, a + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if t < -2.5e18Initial program 91.4%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites74.8%
if -2.5e18 < t < 5.40000000000000019e110Initial program 98.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites94.2%
if 5.40000000000000019e110 < t Initial program 86.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6489.1
Applied rewrites89.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -1e+165)
t_1
(if (<= t -4.35e+18)
(fma a (- t) (+ x z))
(if (<= t 5.4e+110) (+ a (fma z (- 1.0 y) x)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -1e+165) {
tmp = t_1;
} else if (t <= -4.35e+18) {
tmp = fma(a, -t, (x + z));
} else if (t <= 5.4e+110) {
tmp = a + fma(z, (1.0 - y), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1e+165) tmp = t_1; elseif (t <= -4.35e+18) tmp = fma(a, Float64(-t), Float64(x + z)); elseif (t <= 5.4e+110) tmp = Float64(a + fma(z, Float64(1.0 - y), x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+165], t$95$1, If[LessEqual[t, -4.35e+18], N[(a * (-t) + N[(x + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+110], N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.35 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(a, -t, x + z\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+110}:\\
\;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.99999999999999899e164 or 5.40000000000000019e110 < t Initial program 86.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6480.4
Applied rewrites80.4%
if -9.99999999999999899e164 < t < -4.35e18Initial program 100.0%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites90.6%
Taylor expanded in y around 0
Applied rewrites90.6%
Taylor expanded in t around inf
Applied rewrites90.6%
if -4.35e18 < t < 5.40000000000000019e110Initial program 98.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites94.2%
Taylor expanded in b around 0
Applied rewrites65.0%
Final simplification72.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (+ y (+ t -2.0)))))
(if (<= b -7e+75)
t_1
(if (<= b 6.8e+224) (fma a (- 1.0 t) (fma z (- 1.0 y) x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y + (t + -2.0));
double tmp;
if (b <= -7e+75) {
tmp = t_1;
} else if (b <= 6.8e+224) {
tmp = fma(a, (1.0 - t), fma(z, (1.0 - y), x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y + Float64(t + -2.0))) tmp = 0.0 if (b <= -7e+75) tmp = t_1; elseif (b <= 6.8e+224) tmp = fma(a, Float64(1.0 - t), fma(z, Float64(1.0 - y), x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7e+75], t$95$1, If[LessEqual[b, 6.8e+224], N[(a * N[(1.0 - t), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{if}\;b \leq -7 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{+224}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.9999999999999997e75 or 6.8000000000000004e224 < b Initial program 89.1%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval80.1
Applied rewrites80.1%
if -6.9999999999999997e75 < b < 6.8000000000000004e224Initial program 96.4%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites84.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (fma a (- 1.0 t) x))) (if (<= a -3.5e+114) t_1 (if (<= a 1.2e+68) (fma z (- 1.0 y) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(a, (1.0 - t), x);
double tmp;
if (a <= -3.5e+114) {
tmp = t_1;
} else if (a <= 1.2e+68) {
tmp = fma(z, (1.0 - y), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(a, Float64(1.0 - t), x) tmp = 0.0 if (a <= -3.5e+114) tmp = t_1; elseif (a <= 1.2e+68) tmp = fma(z, Float64(1.0 - y), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.5e+114], t$95$1, If[LessEqual[a, 1.2e+68], N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.5000000000000001e114 or 1.20000000000000004e68 < a Initial program 89.8%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6486.6
Applied rewrites86.6%
Taylor expanded in b around 0
Applied rewrites75.0%
if -3.5000000000000001e114 < a < 1.20000000000000004e68Initial program 97.5%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites59.8%
Taylor expanded in a around 0
Applied rewrites54.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* t (- b a)))) (if (<= t -6.8e+124) t_1 (if (<= t 4.9e+64) (+ x (+ z a)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -6.8e+124) {
tmp = t_1;
} else if (t <= 4.9e+64) {
tmp = x + (z + 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 = t * (b - a)
if (t <= (-6.8d+124)) then
tmp = t_1
else if (t <= 4.9d+64) then
tmp = x + (z + 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 = t * (b - a);
double tmp;
if (t <= -6.8e+124) {
tmp = t_1;
} else if (t <= 4.9e+64) {
tmp = x + (z + a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -6.8e+124: tmp = t_1 elif t <= 4.9e+64: tmp = x + (z + a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -6.8e+124) tmp = t_1; elseif (t <= 4.9e+64) tmp = Float64(x + Float64(z + a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -6.8e+124) tmp = t_1; elseif (t <= 4.9e+64) tmp = x + (z + a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e+124], t$95$1, If[LessEqual[t, 4.9e+64], N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+64}:\\
\;\;\;\;x + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.8e124 or 4.9000000000000003e64 < t Initial program 88.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6475.2
Applied rewrites75.2%
if -6.8e124 < t < 4.9000000000000003e64Initial program 98.7%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites94.5%
Taylor expanded in y around 0
Applied rewrites56.5%
Taylor expanded in b around 0
Applied rewrites47.0%
Final simplification58.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -7.6e+167) (* t b) (if (<= t 1.6e+65) (+ z a) (* t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.6e+167) {
tmp = t * b;
} else if (t <= 1.6e+65) {
tmp = z + a;
} else {
tmp = t * 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 (t <= (-7.6d+167)) then
tmp = t * b
else if (t <= 1.6d+65) then
tmp = z + a
else
tmp = t * 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 (t <= -7.6e+167) {
tmp = t * b;
} else if (t <= 1.6e+65) {
tmp = z + a;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.6e+167: tmp = t * b elif t <= 1.6e+65: tmp = z + a else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.6e+167) tmp = Float64(t * b); elseif (t <= 1.6e+65) tmp = Float64(z + a); else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7.6e+167) tmp = t * b; elseif (t <= 1.6e+65) tmp = z + a; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.6e+167], N[(t * b), $MachinePrecision], If[LessEqual[t, 1.6e+65], N[(z + a), $MachinePrecision], N[(t * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.6 \cdot 10^{+167}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+65}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -7.59999999999999987e167 or 1.60000000000000003e65 < t Initial program 87.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6476.2
Applied rewrites76.2%
Taylor expanded in b around inf
Applied rewrites35.6%
if -7.59999999999999987e167 < t < 1.60000000000000003e65Initial program 98.8%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites91.9%
Taylor expanded in y around 0
Applied rewrites55.2%
Taylor expanded in x around 0
Applied rewrites41.7%
Taylor expanded in b around 0
Applied rewrites32.6%
Final simplification33.7%
(FPCore (x y z t a b) :precision binary64 (+ z a))
double code(double x, double y, double z, double t, double a, double b) {
return z + a;
}
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 + a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return z + a;
}
def code(x, y, z, t, a, b): return z + a
function code(x, y, z, t, a, b) return Float64(z + a) end
function tmp = code(x, y, z, t, a, b) tmp = z + a; end
code[x_, y_, z_, t_, a_, b_] := N[(z + a), $MachinePrecision]
\begin{array}{l}
\\
z + a
\end{array}
Initial program 94.5%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites70.2%
Taylor expanded in y around 0
Applied rewrites40.8%
Taylor expanded in x around 0
Applied rewrites28.6%
Taylor expanded in b around 0
Applied rewrites22.7%
Final simplification22.7%
herbie shell --seed 2024222
(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)))