
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(if (<= t_1 5e+306)
t_1
(fma b (+ t -2.0) (fma y (- b z) (fma a (- 1.0 t) z))))))
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 <= 5e+306) {
tmp = t_1;
} else {
tmp = fma(b, (t + -2.0), fma(y, (b - z), fma(a, (1.0 - t), z)));
}
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 <= 5e+306) tmp = t_1; else tmp = fma(b, Float64(t + -2.0), fma(y, Float64(b - z), fma(a, Float64(1.0 - t), z))); end return 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, 5e+306], t$95$1, N[(b * N[(t + -2.0), $MachinePrecision] + N[(y * N[(b - z), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision] + z), $MachinePrecision]), $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 5 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, t + -2, \mathsf{fma}\left(y, b - z, \mathsf{fma}\left(a, 1 - t, z\right)\right)\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)) < 4.99999999999999993e306Initial program 100.0%
if 4.99999999999999993e306 < (+.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 76.9%
Taylor expanded in x around 0
Applied rewrites96.2%
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 b) (if (<= t_1 1e+308) (+ x z) (* 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 * b;
} else if (t_1 <= 1e+308) {
tmp = x + z;
} 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 * b;
} else if (t_1 <= 1e+308) {
tmp = x + z;
} 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 * b elif t_1 <= 1e+308: tmp = x + z 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 * b); elseif (t_1 <= 1e+308) tmp = Float64(x + z); 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 * b; elseif (t_1 <= 1e+308) tmp = x + z; 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 * b), $MachinePrecision], If[LessEqual[t$95$1, 1e+308], N[(x + z), $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 b\\
\mathbf{elif}\;t\_1 \leq 10^{+308}:\\
\;\;\;\;x + z\\
\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--.f6460.4
Applied rewrites60.4%
Taylor expanded in b around inf
Applied rewrites37.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)) < 1e308Initial program 100.0%
Taylor expanded in a 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.1
Applied rewrites74.1%
Taylor expanded in y around 0
Applied rewrites54.3%
Taylor expanded in b around 0
Applied rewrites36.7%
if 1e308 < (+.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 76.5%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval65.4
Applied rewrites65.4%
Taylor expanded in y around inf
Applied rewrites31.0%
Final simplification35.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma b (+ t -2.0) (fma y (- b z) (fma a (- 1.0 t) z)))))
(if (<= a -9.8e+67)
t_1
(if (<= a 2e+30) (fma b (+ y (+ t -2.0)) (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(b, (t + -2.0), fma(y, (b - z), fma(a, (1.0 - t), z)));
double tmp;
if (a <= -9.8e+67) {
tmp = t_1;
} else if (a <= 2e+30) {
tmp = fma(b, (y + (t + -2.0)), fma(z, (1.0 - y), x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(b, Float64(t + -2.0), fma(y, Float64(b - z), fma(a, Float64(1.0 - t), z))) tmp = 0.0 if (a <= -9.8e+67) tmp = t_1; elseif (a <= 2e+30) tmp = fma(b, Float64(y + Float64(t + -2.0)), 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[(t + -2.0), $MachinePrecision] + N[(y * N[(b - z), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.8e+67], t$95$1, If[LessEqual[a, 2e+30], N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, t + -2, \mathsf{fma}\left(y, b - z, \mathsf{fma}\left(a, 1 - t, z\right)\right)\right)\\
\mathbf{if}\;a \leq -9.8 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(z, 1 - y, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.7999999999999998e67 or 2e30 < a Initial program 92.6%
Taylor expanded in x around 0
Applied rewrites95.6%
if -9.7999999999999998e67 < a < 2e30Initial program 97.3%
Taylor expanded in a 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--.f6491.7
Applied rewrites91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (+ y -2.0))) (t_2 (* t (- b a))))
(if (<= t -1.95e+15)
t_2
(if (<= t -2.5e-245)
(+ x z)
(if (<= t 5e-199)
t_1
(if (<= t 8.5e-58) (+ x z) (if (<= t 450.0) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y + -2.0);
double t_2 = t * (b - a);
double tmp;
if (t <= -1.95e+15) {
tmp = t_2;
} else if (t <= -2.5e-245) {
tmp = x + z;
} else if (t <= 5e-199) {
tmp = t_1;
} else if (t <= 8.5e-58) {
tmp = x + z;
} else if (t <= 450.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * (y + (-2.0d0))
t_2 = t * (b - a)
if (t <= (-1.95d+15)) then
tmp = t_2
else if (t <= (-2.5d-245)) then
tmp = x + z
else if (t <= 5d-199) then
tmp = t_1
else if (t <= 8.5d-58) then
tmp = x + z
else if (t <= 450.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y + -2.0);
double t_2 = t * (b - a);
double tmp;
if (t <= -1.95e+15) {
tmp = t_2;
} else if (t <= -2.5e-245) {
tmp = x + z;
} else if (t <= 5e-199) {
tmp = t_1;
} else if (t <= 8.5e-58) {
tmp = x + z;
} else if (t <= 450.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (y + -2.0) t_2 = t * (b - a) tmp = 0 if t <= -1.95e+15: tmp = t_2 elif t <= -2.5e-245: tmp = x + z elif t <= 5e-199: tmp = t_1 elif t <= 8.5e-58: tmp = x + z elif t <= 450.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y + -2.0)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1.95e+15) tmp = t_2; elseif (t <= -2.5e-245) tmp = Float64(x + z); elseif (t <= 5e-199) tmp = t_1; elseif (t <= 8.5e-58) tmp = Float64(x + z); elseif (t <= 450.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (y + -2.0); t_2 = t * (b - a); tmp = 0.0; if (t <= -1.95e+15) tmp = t_2; elseif (t <= -2.5e-245) tmp = x + z; elseif (t <= 5e-199) tmp = t_1; elseif (t <= 8.5e-58) tmp = x + z; elseif (t <= 450.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e+15], t$95$2, If[LessEqual[t, -2.5e-245], N[(x + z), $MachinePrecision], If[LessEqual[t, 5e-199], t$95$1, If[LessEqual[t, 8.5e-58], N[(x + z), $MachinePrecision], If[LessEqual[t, 450.0], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y + -2\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{+15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-245}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-199}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-58}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 450:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.95e15 or 450 < t Initial program 94.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6466.8
Applied rewrites66.8%
if -1.95e15 < t < -2.4999999999999998e-245 or 4.9999999999999996e-199 < t < 8.5000000000000004e-58Initial program 95.7%
Taylor expanded in a 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--.f6482.4
Applied rewrites82.4%
Taylor expanded in y around 0
Applied rewrites50.4%
Taylor expanded in b around 0
Applied rewrites39.9%
if -2.4999999999999998e-245 < t < 4.9999999999999996e-199 or 8.5000000000000004e-58 < t < 450Initial program 97.5%
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-eval51.6
Applied rewrites51.6%
Taylor expanded in t around 0
Applied rewrites50.6%
Final simplification54.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma b (+ t (+ y -2.0)) x)) (t_2 (fma z (- 1.0 y) x)))
(if (<= z -1.5e+134)
t_2
(if (<= z -3.5e-209)
t_1
(if (<= z 3.8e-153) (fma a (- 1.0 t) x) (if (<= z 0.12) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(b, (t + (y + -2.0)), x);
double t_2 = fma(z, (1.0 - y), x);
double tmp;
if (z <= -1.5e+134) {
tmp = t_2;
} else if (z <= -3.5e-209) {
tmp = t_1;
} else if (z <= 3.8e-153) {
tmp = fma(a, (1.0 - t), x);
} else if (z <= 0.12) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(b, Float64(t + Float64(y + -2.0)), x) t_2 = fma(z, Float64(1.0 - y), x) tmp = 0.0 if (z <= -1.5e+134) tmp = t_2; elseif (z <= -3.5e-209) tmp = t_1; elseif (z <= 3.8e-153) tmp = fma(a, Float64(1.0 - t), x); elseif (z <= 0.12) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(t + N[(y + -2.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -1.5e+134], t$95$2, If[LessEqual[z, -3.5e-209], t$95$1, If[LessEqual[z, 3.8e-153], N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 0.12], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, t + \left(y + -2\right), x\right)\\
t_2 := \mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+134}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-153}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{elif}\;z \leq 0.12:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.49999999999999998e134 or 0.12 < z Initial program 91.0%
Taylor expanded in a 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--.f6485.0
Applied rewrites85.0%
Taylor expanded in b around 0
Applied rewrites74.2%
if -1.49999999999999998e134 < z < -3.50000000000000002e-209 or 3.80000000000000023e-153 < z < 0.12Initial program 97.2%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval88.5
Applied rewrites88.5%
Taylor expanded in a around 0
Applied rewrites64.5%
if -3.50000000000000002e-209 < z < 3.80000000000000023e-153Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval100.0
Applied rewrites100.0%
Taylor expanded in b around 0
Applied rewrites68.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 y) x)) (t_2 (* b (+ y (+ t -2.0)))))
(if (<= b -6.8e+75)
t_2
(if (<= b -4.8e-41)
t_1
(if (<= b 8e-47) (fma a (- 1.0 t) x) (if (<= b 3e+66) 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 = b * (y + (t + -2.0));
double tmp;
if (b <= -6.8e+75) {
tmp = t_2;
} else if (b <= -4.8e-41) {
tmp = t_1;
} else if (b <= 8e-47) {
tmp = fma(a, (1.0 - t), x);
} else if (b <= 3e+66) {
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(b * Float64(y + Float64(t + -2.0))) tmp = 0.0 if (b <= -6.8e+75) tmp = t_2; elseif (b <= -4.8e-41) tmp = t_1; elseif (b <= 8e-47) tmp = fma(a, Float64(1.0 - t), x); elseif (b <= 3e+66) 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[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.8e+75], t$95$2, If[LessEqual[b, -4.8e-41], t$95$1, If[LessEqual[b, 8e-47], N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[b, 3e+66], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\
t_2 := b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{+75}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -4.8 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8 \cdot 10^{-47}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{elif}\;b \leq 3 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -6.80000000000000022e75 or 3.00000000000000002e66 < b Initial program 89.2%
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-eval72.0
Applied rewrites72.0%
if -6.80000000000000022e75 < b < -4.80000000000000044e-41 or 7.9999999999999998e-47 < b < 3.00000000000000002e66Initial program 100.0%
Taylor expanded in a 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--.f6477.1
Applied rewrites77.1%
Taylor expanded in b around 0
Applied rewrites64.9%
if -4.80000000000000044e-41 < b < 7.9999999999999998e-47Initial program 99.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval70.6
Applied rewrites70.6%
Taylor expanded in b around 0
Applied rewrites63.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -6.6e+40)
t_1
(if (<= t -3.8e-64)
(fma z (- 1.0 y) x)
(if (<= t 260.0)
(+ a (fma b (+ y -2.0) x))
(if (<= t 5.8e+106) (fma a (- 1.0 t) 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 <= -6.6e+40) {
tmp = t_1;
} else if (t <= -3.8e-64) {
tmp = fma(z, (1.0 - y), x);
} else if (t <= 260.0) {
tmp = a + fma(b, (y + -2.0), x);
} else if (t <= 5.8e+106) {
tmp = fma(a, (1.0 - t), 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 <= -6.6e+40) tmp = t_1; elseif (t <= -3.8e-64) tmp = fma(z, Float64(1.0 - y), x); elseif (t <= 260.0) tmp = Float64(a + fma(b, Float64(y + -2.0), x)); elseif (t <= 5.8e+106) tmp = fma(a, Float64(1.0 - t), 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, -6.6e+40], t$95$1, If[LessEqual[t, -3.8e-64], N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 260.0], N[(a + N[(b * N[(y + -2.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+106], N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-64}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{elif}\;t \leq 260:\\
\;\;\;\;a + \mathsf{fma}\left(b, y + -2, x\right)\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+106}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.5999999999999997e40 or 5.8000000000000004e106 < t Initial program 94.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6472.5
Applied rewrites72.5%
if -6.5999999999999997e40 < t < -3.8000000000000002e-64Initial program 95.5%
Taylor expanded in a 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--.f6484.9
Applied rewrites84.9%
Taylor expanded in b around 0
Applied rewrites67.6%
if -3.8000000000000002e-64 < t < 260Initial program 96.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval65.5
Applied rewrites65.5%
Taylor expanded in t around 0
Applied rewrites64.7%
if 260 < t < 5.8000000000000004e106Initial program 93.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval69.9
Applied rewrites69.9%
Taylor expanded in b around 0
Applied rewrites67.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 y) x)))
(if (<= z -1.3e+65)
t_1
(if (<= z 2.05e-143)
(fma a (- 1.0 t) x)
(if (<= z 2.45e-36)
(fma b (+ y -2.0) x)
(if (<= z 0.106) (fma b (+ t -2.0) x) t_1))))))
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 (z <= -1.3e+65) {
tmp = t_1;
} else if (z <= 2.05e-143) {
tmp = fma(a, (1.0 - t), x);
} else if (z <= 2.45e-36) {
tmp = fma(b, (y + -2.0), x);
} else if (z <= 0.106) {
tmp = fma(b, (t + -2.0), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - y), x) tmp = 0.0 if (z <= -1.3e+65) tmp = t_1; elseif (z <= 2.05e-143) tmp = fma(a, Float64(1.0 - t), x); elseif (z <= 2.45e-36) tmp = fma(b, Float64(y + -2.0), x); elseif (z <= 0.106) tmp = fma(b, Float64(t + -2.0), x); else tmp = t_1; 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[z, -1.3e+65], t$95$1, If[LessEqual[z, 2.05e-143], N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2.45e-36], N[(b * N[(y + -2.0), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 0.106], N[(b * N[(t + -2.0), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-143}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-36}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, x\right)\\
\mathbf{elif}\;z \leq 0.106:\\
\;\;\;\;\mathsf{fma}\left(b, t + -2, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.30000000000000001e65 or 0.105999999999999997 < z Initial program 91.8%
Taylor expanded in a 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--.f6485.0
Applied rewrites85.0%
Taylor expanded in b around 0
Applied rewrites70.6%
if -1.30000000000000001e65 < z < 2.05e-143Initial program 97.3%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval94.8
Applied rewrites94.8%
Taylor expanded in b around 0
Applied rewrites58.8%
if 2.05e-143 < z < 2.4499999999999998e-36Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval87.4
Applied rewrites87.4%
Taylor expanded in a around 0
Applied rewrites65.9%
Taylor expanded in t around 0
Applied rewrites62.1%
if 2.4499999999999998e-36 < z < 0.105999999999999997Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval100.0
Applied rewrites100.0%
Taylor expanded in a around 0
Applied rewrites85.1%
Taylor expanded in y around 0
Applied rewrites77.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma a (- 1.0 t) x)) (t_2 (* y (- b z))))
(if (<= y -1.5e+20)
t_2
(if (<= y 6.8e-268)
t_1
(if (<= y 0.0165) (fma b (+ t -2.0) x) (if (<= y 3e+80) 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);
double t_2 = y * (b - z);
double tmp;
if (y <= -1.5e+20) {
tmp = t_2;
} else if (y <= 6.8e-268) {
tmp = t_1;
} else if (y <= 0.0165) {
tmp = fma(b, (t + -2.0), x);
} else if (y <= 3e+80) {
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), x) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -1.5e+20) tmp = t_2; elseif (y <= 6.8e-268) tmp = t_1; elseif (y <= 0.0165) tmp = fma(b, Float64(t + -2.0), x); elseif (y <= 3e+80) 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] + x), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+20], t$95$2, If[LessEqual[y, 6.8e-268], t$95$1, If[LessEqual[y, 0.0165], N[(b * N[(t + -2.0), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[y, 3e+80], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, 1 - t, x\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.0165:\\
\;\;\;\;\mathsf{fma}\left(b, t + -2, x\right)\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.5e20 or 2.99999999999999987e80 < y Initial program 90.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6469.8
Applied rewrites69.8%
if -1.5e20 < y < 6.8e-268 or 0.016500000000000001 < y < 2.99999999999999987e80Initial program 98.9%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval82.4
Applied rewrites82.4%
Taylor expanded in b around 0
Applied rewrites59.5%
if 6.8e-268 < y < 0.016500000000000001Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval79.4
Applied rewrites79.4%
Taylor expanded in a around 0
Applied rewrites60.5%
Taylor expanded in y around 0
Applied rewrites60.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 y) x)) (t_2 (+ y (+ t -2.0))))
(if (<= z -1e+64)
(fma b t_2 t_1)
(if (<= z 3.1e-5)
(fma a (- 1.0 t) (fma b t_2 x))
(fma a (- 1.0 t) t_1)))))
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 = y + (t + -2.0);
double tmp;
if (z <= -1e+64) {
tmp = fma(b, t_2, t_1);
} else if (z <= 3.1e-5) {
tmp = fma(a, (1.0 - t), fma(b, t_2, x));
} else {
tmp = fma(a, (1.0 - t), t_1);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - y), x) t_2 = Float64(y + Float64(t + -2.0)) tmp = 0.0 if (z <= -1e+64) tmp = fma(b, t_2, t_1); elseif (z <= 3.1e-5) tmp = fma(a, Float64(1.0 - t), fma(b, t_2, x)); else tmp = fma(a, Float64(1.0 - t), t_1); 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[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+64], N[(b * t$95$2 + t$95$1), $MachinePrecision], If[LessEqual[z, 3.1e-5], N[(a * N[(1.0 - t), $MachinePrecision] + N[(b * t$95$2 + x), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 - t), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\
t_2 := y + \left(t + -2\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(b, t\_2, t\_1\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, t\_2, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, t\_1\right)\\
\end{array}
\end{array}
if z < -1.00000000000000002e64Initial program 94.2%
Taylor expanded in a 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.8
Applied rewrites87.8%
if -1.00000000000000002e64 < z < 3.10000000000000014e-5Initial program 97.9%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval94.1
Applied rewrites94.1%
if 3.10000000000000014e-5 < z Initial program 89.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
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/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.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 y) x)))
(if (<= z -2.85e+109)
(fma b (+ y -2.0) t_1)
(if (<= z 3.1e-5)
(fma a (- 1.0 t) (fma b (+ y (+ t -2.0)) x))
(fma a (- 1.0 t) t_1)))))
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 (z <= -2.85e+109) {
tmp = fma(b, (y + -2.0), t_1);
} else if (z <= 3.1e-5) {
tmp = fma(a, (1.0 - t), fma(b, (y + (t + -2.0)), x));
} else {
tmp = fma(a, (1.0 - t), t_1);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - y), x) tmp = 0.0 if (z <= -2.85e+109) tmp = fma(b, Float64(y + -2.0), t_1); elseif (z <= 3.1e-5) tmp = fma(a, Float64(1.0 - t), fma(b, Float64(y + Float64(t + -2.0)), x)); else tmp = fma(a, Float64(1.0 - t), t_1); 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[z, -2.85e+109], N[(b * N[(y + -2.0), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 3.1e-5], N[(a * N[(1.0 - t), $MachinePrecision] + N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 - t), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{if}\;z \leq -2.85 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, t\_1\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(b, y + \left(t + -2\right), x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, t\_1\right)\\
\end{array}
\end{array}
if z < -2.8500000000000001e109Initial program 93.5%
Taylor expanded in a 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--.f6488.4
Applied rewrites88.4%
Taylor expanded in t around 0
Applied rewrites84.3%
if -2.8500000000000001e109 < z < 3.10000000000000014e-5Initial program 98.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval93.0
Applied rewrites93.0%
if 3.10000000000000014e-5 < z Initial program 89.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
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/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.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -6.5e+19)
t_1
(if (<= y 2.16e-107)
(* t (- b a))
(if (<= y 80000.0) (+ x z) (if (<= y 1.05e+80) (- a (* t a)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -6.5e+19) {
tmp = t_1;
} else if (y <= 2.16e-107) {
tmp = t * (b - a);
} else if (y <= 80000.0) {
tmp = x + z;
} else if (y <= 1.05e+80) {
tmp = a - (t * 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 = y * (b - z)
if (y <= (-6.5d+19)) then
tmp = t_1
else if (y <= 2.16d-107) then
tmp = t * (b - a)
else if (y <= 80000.0d0) then
tmp = x + z
else if (y <= 1.05d+80) then
tmp = a - (t * 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 = y * (b - z);
double tmp;
if (y <= -6.5e+19) {
tmp = t_1;
} else if (y <= 2.16e-107) {
tmp = t * (b - a);
} else if (y <= 80000.0) {
tmp = x + z;
} else if (y <= 1.05e+80) {
tmp = a - (t * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -6.5e+19: tmp = t_1 elif y <= 2.16e-107: tmp = t * (b - a) elif y <= 80000.0: tmp = x + z elif y <= 1.05e+80: tmp = a - (t * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -6.5e+19) tmp = t_1; elseif (y <= 2.16e-107) tmp = Float64(t * Float64(b - a)); elseif (y <= 80000.0) tmp = Float64(x + z); elseif (y <= 1.05e+80) tmp = Float64(a - Float64(t * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -6.5e+19) tmp = t_1; elseif (y <= 2.16e-107) tmp = t * (b - a); elseif (y <= 80000.0) tmp = x + z; elseif (y <= 1.05e+80) tmp = a - (t * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+19], t$95$1, If[LessEqual[y, 2.16e-107], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 80000.0], N[(x + z), $MachinePrecision], If[LessEqual[y, 1.05e+80], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.16 \cdot 10^{-107}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 80000:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+80}:\\
\;\;\;\;a - t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.5e19 or 1.05000000000000001e80 < y Initial program 90.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6469.8
Applied rewrites69.8%
if -6.5e19 < y < 2.16000000000000004e-107Initial program 99.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6444.4
Applied rewrites44.4%
if 2.16000000000000004e-107 < y < 8e4Initial program 100.0%
Taylor expanded in a 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--.f64100.0
Applied rewrites100.0%
Taylor expanded in y around 0
Applied rewrites100.0%
Taylor expanded in b around 0
Applied rewrites62.4%
if 8e4 < y < 1.05000000000000001e80Initial program 100.0%
Taylor expanded in a around inf
sub-negN/A
neg-mul-1N/A
distribute-rgt-inN/A
*-lft-identityN/A
neg-mul-1N/A
distribute-lft-neg-inN/A
*-commutativeN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.8
Applied rewrites67.8%
Final simplification58.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma b (+ t (+ y -2.0)) x)))
(if (<= b -4e+88)
t_1
(if (<= b 6.5e+66) (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 = fma(b, (t + (y + -2.0)), x);
double tmp;
if (b <= -4e+88) {
tmp = t_1;
} else if (b <= 6.5e+66) {
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 = fma(b, Float64(t + Float64(y + -2.0)), x) tmp = 0.0 if (b <= -4e+88) tmp = t_1; elseif (b <= 6.5e+66) 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[(t + N[(y + -2.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[b, -4e+88], t$95$1, If[LessEqual[b, 6.5e+66], 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 := \mathsf{fma}\left(b, t + \left(y + -2\right), x\right)\\
\mathbf{if}\;b \leq -4 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+66}:\\
\;\;\;\;\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 < -3.99999999999999984e88 or 6.5000000000000001e66 < b Initial program 89.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval83.3
Applied rewrites83.3%
Taylor expanded in a around 0
Applied rewrites75.6%
if -3.99999999999999984e88 < b < 6.5000000000000001e66Initial program 99.3%
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
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/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.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma b (+ t (+ y -2.0)) x)))
(if (<= b -6e+73)
t_1
(if (<= b 2.7e+49) (fma y (- z) (fma a (- 1.0 t) z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(b, (t + (y + -2.0)), x);
double tmp;
if (b <= -6e+73) {
tmp = t_1;
} else if (b <= 2.7e+49) {
tmp = fma(y, -z, fma(a, (1.0 - t), z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(b, Float64(t + Float64(y + -2.0)), x) tmp = 0.0 if (b <= -6e+73) tmp = t_1; elseif (b <= 2.7e+49) tmp = fma(y, Float64(-z), fma(a, Float64(1.0 - t), z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(t + N[(y + -2.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[b, -6e+73], t$95$1, If[LessEqual[b, 2.7e+49], N[(y * (-z) + N[(a * N[(1.0 - t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, t + \left(y + -2\right), x\right)\\
\mathbf{if}\;b \leq -6 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{+49}:\\
\;\;\;\;\mathsf{fma}\left(y, -z, \mathsf{fma}\left(a, 1 - t, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.00000000000000021e73 or 2.7000000000000001e49 < b Initial program 89.5%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval84.1
Applied rewrites84.1%
Taylor expanded in a around 0
Applied rewrites74.9%
if -6.00000000000000021e73 < b < 2.7000000000000001e49Initial program 99.3%
Taylor expanded in x around 0
Applied rewrites81.3%
Taylor expanded in b around 0
Applied rewrites72.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -1.65e+19)
t_1
(if (<= y 0.0165)
(+ x (fma b (+ t -2.0) z))
(if (<= y 3e+80) (fma a (- 1.0 t) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -1.65e+19) {
tmp = t_1;
} else if (y <= 0.0165) {
tmp = x + fma(b, (t + -2.0), z);
} else if (y <= 3e+80) {
tmp = fma(a, (1.0 - t), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -1.65e+19) tmp = t_1; elseif (y <= 0.0165) tmp = Float64(x + fma(b, Float64(t + -2.0), z)); elseif (y <= 3e+80) tmp = fma(a, Float64(1.0 - t), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+19], t$95$1, If[LessEqual[y, 0.0165], N[(x + N[(b * N[(t + -2.0), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+80], N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.0165:\\
\;\;\;\;x + \mathsf{fma}\left(b, t + -2, z\right)\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.65e19 or 2.99999999999999987e80 < y Initial program 90.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6469.8
Applied rewrites69.8%
if -1.65e19 < y < 0.016500000000000001Initial program 99.2%
Taylor expanded in a 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--.f6472.8
Applied rewrites72.8%
Taylor expanded in y around 0
Applied rewrites72.4%
if 0.016500000000000001 < y < 2.99999999999999987e80Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval96.0
Applied rewrites96.0%
Taylor expanded in b around 0
Applied rewrites83.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- z))))
(if (<= y -280000000.0)
t_1
(if (<= y 460000.0) (+ x z) (if (<= y 1.25e+80) (* t (- a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * -z;
double tmp;
if (y <= -280000000.0) {
tmp = t_1;
} else if (y <= 460000.0) {
tmp = x + z;
} else if (y <= 1.25e+80) {
tmp = t * -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 = y * -z
if (y <= (-280000000.0d0)) then
tmp = t_1
else if (y <= 460000.0d0) then
tmp = x + z
else if (y <= 1.25d+80) then
tmp = t * -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 = y * -z;
double tmp;
if (y <= -280000000.0) {
tmp = t_1;
} else if (y <= 460000.0) {
tmp = x + z;
} else if (y <= 1.25e+80) {
tmp = t * -a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * -z tmp = 0 if y <= -280000000.0: tmp = t_1 elif y <= 460000.0: tmp = x + z elif y <= 1.25e+80: tmp = t * -a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(-z)) tmp = 0.0 if (y <= -280000000.0) tmp = t_1; elseif (y <= 460000.0) tmp = Float64(x + z); elseif (y <= 1.25e+80) tmp = Float64(t * Float64(-a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * -z; tmp = 0.0; if (y <= -280000000.0) tmp = t_1; elseif (y <= 460000.0) tmp = x + z; elseif (y <= 1.25e+80) tmp = t * -a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -280000000.0], t$95$1, If[LessEqual[y, 460000.0], N[(x + z), $MachinePrecision], If[LessEqual[y, 1.25e+80], N[(t * (-a)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -280000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 460000:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+80}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.8e8 or 1.2499999999999999e80 < y Initial program 90.5%
Taylor expanded in z around inf
sub-negN/A
neg-mul-1N/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-*.f6444.5
Applied rewrites44.5%
Taylor expanded in y around inf
Applied rewrites44.5%
if -2.8e8 < y < 4.6e5Initial program 99.2%
Taylor expanded in a 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--.f6473.4
Applied rewrites73.4%
Taylor expanded in y around 0
Applied rewrites73.0%
Taylor expanded in b around 0
Applied rewrites40.2%
if 4.6e5 < y < 1.2499999999999999e80Initial program 100.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6448.5
Applied rewrites48.5%
Taylor expanded in b around 0
Applied rewrites48.5%
Final simplification42.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* y (- b z)))) (if (<= y -1.5e+20) t_1 (if (<= y 3e+80) (fma a (- 1.0 t) x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -1.5e+20) {
tmp = t_1;
} else if (y <= 3e+80) {
tmp = fma(a, (1.0 - t), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -1.5e+20) tmp = t_1; elseif (y <= 3e+80) tmp = fma(a, Float64(1.0 - t), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+20], t$95$1, If[LessEqual[y, 3e+80], N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.5e20 or 2.99999999999999987e80 < y Initial program 90.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6469.8
Applied rewrites69.8%
if -1.5e20 < y < 2.99999999999999987e80Initial program 99.3%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval81.3
Applied rewrites81.3%
Taylor expanded in b around 0
Applied rewrites53.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* y (- b z)))) (if (<= y -6.5e+19) t_1 (if (<= y 1.1e+80) (* t (- b a)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -6.5e+19) {
tmp = t_1;
} else if (y <= 1.1e+80) {
tmp = t * (b - 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 = y * (b - z)
if (y <= (-6.5d+19)) then
tmp = t_1
else if (y <= 1.1d+80) then
tmp = t * (b - 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 = y * (b - z);
double tmp;
if (y <= -6.5e+19) {
tmp = t_1;
} else if (y <= 1.1e+80) {
tmp = t * (b - a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -6.5e+19: tmp = t_1 elif y <= 1.1e+80: tmp = t * (b - a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -6.5e+19) tmp = t_1; elseif (y <= 1.1e+80) tmp = Float64(t * Float64(b - a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -6.5e+19) tmp = t_1; elseif (y <= 1.1e+80) tmp = t * (b - a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+19], t$95$1, If[LessEqual[y, 1.1e+80], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+80}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.5e19 or 1.10000000000000001e80 < y Initial program 90.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6469.8
Applied rewrites69.8%
if -6.5e19 < y < 1.10000000000000001e80Initial program 99.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6442.2
Applied rewrites42.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* y (- z)))) (if (<= y -1.5e+20) t_1 (if (<= y 1.12e+80) (+ x (* t b)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * -z;
double tmp;
if (y <= -1.5e+20) {
tmp = t_1;
} else if (y <= 1.12e+80) {
tmp = x + (t * b);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * -z
if (y <= (-1.5d+20)) then
tmp = t_1
else if (y <= 1.12d+80) then
tmp = x + (t * b)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * -z;
double tmp;
if (y <= -1.5e+20) {
tmp = t_1;
} else if (y <= 1.12e+80) {
tmp = x + (t * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * -z tmp = 0 if y <= -1.5e+20: tmp = t_1 elif y <= 1.12e+80: tmp = x + (t * b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(-z)) tmp = 0.0 if (y <= -1.5e+20) tmp = t_1; elseif (y <= 1.12e+80) tmp = Float64(x + Float64(t * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * -z; tmp = 0.0; if (y <= -1.5e+20) tmp = t_1; elseif (y <= 1.12e+80) tmp = x + (t * b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -1.5e+20], t$95$1, If[LessEqual[y, 1.12e+80], N[(x + N[(t * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+80}:\\
\;\;\;\;x + t \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.5e20 or 1.12e80 < y Initial program 90.4%
Taylor expanded in z around inf
sub-negN/A
neg-mul-1N/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-*.f6445.3
Applied rewrites45.3%
Taylor expanded in y around inf
Applied rewrites45.3%
if -1.5e20 < y < 1.12e80Initial program 99.3%
Taylor expanded in a 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--.f6470.3
Applied rewrites70.3%
Taylor expanded in y around 0
Applied rewrites68.2%
Taylor expanded in t around inf
Applied rewrites40.3%
Final simplification42.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* y (- z)))) (if (<= y -280000000.0) t_1 (if (<= y 9e+79) (+ x z) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * -z;
double tmp;
if (y <= -280000000.0) {
tmp = t_1;
} else if (y <= 9e+79) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * -z
if (y <= (-280000000.0d0)) then
tmp = t_1
else if (y <= 9d+79) then
tmp = x + z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * -z;
double tmp;
if (y <= -280000000.0) {
tmp = t_1;
} else if (y <= 9e+79) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * -z tmp = 0 if y <= -280000000.0: tmp = t_1 elif y <= 9e+79: tmp = x + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(-z)) tmp = 0.0 if (y <= -280000000.0) tmp = t_1; elseif (y <= 9e+79) tmp = Float64(x + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * -z; tmp = 0.0; if (y <= -280000000.0) tmp = t_1; elseif (y <= 9e+79) tmp = x + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -280000000.0], t$95$1, If[LessEqual[y, 9e+79], N[(x + z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -280000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+79}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.8e8 or 8.99999999999999987e79 < y Initial program 90.5%
Taylor expanded in z around inf
sub-negN/A
neg-mul-1N/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-*.f6444.5
Applied rewrites44.5%
Taylor expanded in y around inf
Applied rewrites44.5%
if -2.8e8 < y < 8.99999999999999987e79Initial program 99.3%
Taylor expanded in a 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--.f6470.6
Applied rewrites70.6%
Taylor expanded in y around 0
Applied rewrites68.4%
Taylor expanded in b around 0
Applied rewrites37.7%
Final simplification40.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.5e+25) (* t b) (if (<= t 7.4e+175) (+ x z) (* t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.5e+25) {
tmp = t * b;
} else if (t <= 7.4e+175) {
tmp = x + z;
} 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 <= (-1.5d+25)) then
tmp = t * b
else if (t <= 7.4d+175) then
tmp = x + z
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 <= -1.5e+25) {
tmp = t * b;
} else if (t <= 7.4e+175) {
tmp = x + z;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.5e+25: tmp = t * b elif t <= 7.4e+175: tmp = x + z else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.5e+25) tmp = Float64(t * b); elseif (t <= 7.4e+175) tmp = Float64(x + z); else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.5e+25) tmp = t * b; elseif (t <= 7.4e+175) tmp = x + z; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.5e+25], N[(t * b), $MachinePrecision], If[LessEqual[t, 7.4e+175], N[(x + z), $MachinePrecision], N[(t * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+25}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{+175}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -1.50000000000000003e25 or 7.39999999999999932e175 < t Initial program 94.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6473.4
Applied rewrites73.4%
Taylor expanded in b around inf
Applied rewrites37.2%
if -1.50000000000000003e25 < t < 7.39999999999999932e175Initial program 95.9%
Taylor expanded in a 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--.f6478.0
Applied rewrites78.0%
Taylor expanded in y around 0
Applied rewrites43.3%
Taylor expanded in b around 0
Applied rewrites31.6%
Final simplification33.4%
(FPCore (x y z t a b) :precision binary64 (+ x z))
double code(double x, double y, double z, double t, double a, double b) {
return x + z;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + z
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + z;
}
def code(x, y, z, t, a, b): return x + z
function code(x, y, z, t, a, b) return Float64(x + z) end
function tmp = code(x, y, z, t, a, b) tmp = x + z; end
code[x_, y_, z_, t_, a_, b_] := N[(x + z), $MachinePrecision]
\begin{array}{l}
\\
x + z
\end{array}
Initial program 95.3%
Taylor expanded in a 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--.f6473.7
Applied rewrites73.7%
Taylor expanded in y around 0
Applied rewrites43.7%
Taylor expanded in b around 0
Applied rewrites24.3%
Final simplification24.3%
herbie shell --seed 2024233
(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)))