
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(if (<= t_1 INFINITY) t_1 (* y (- b 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 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = y * (b - z);
}
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 = y * (b - z);
}
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 = y * (b - 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 <= Inf) tmp = t_1; else tmp = Float64(y * Float64(b - z)); 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 = y * (b - z); 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[(y * N[(b - z), $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}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6466.8
Simplified66.8%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma b (+ t -2.0) x)) (t_2 (* y (- b z))))
(if (<= y -2e+88)
t_2
(if (<= y -4.6e+31)
t_1
(if (<= y 1.5e-184)
(+ a (+ z (fma b -2.0 x)))
(if (<= y 6.7e+53) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(b, (t + -2.0), x);
double t_2 = y * (b - z);
double tmp;
if (y <= -2e+88) {
tmp = t_2;
} else if (y <= -4.6e+31) {
tmp = t_1;
} else if (y <= 1.5e-184) {
tmp = a + (z + fma(b, -2.0, x));
} else if (y <= 6.7e+53) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(b, Float64(t + -2.0), x) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -2e+88) tmp = t_2; elseif (y <= -4.6e+31) tmp = t_1; elseif (y <= 1.5e-184) tmp = Float64(a + Float64(z + fma(b, -2.0, x))); elseif (y <= 6.7e+53) 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 + -2.0), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+88], t$95$2, If[LessEqual[y, -4.6e+31], t$95$1, If[LessEqual[y, 1.5e-184], N[(a + N[(z + N[(b * -2.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.7e+53], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, t + -2, x\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+88}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-184}:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(b, -2, x\right)\right)\\
\mathbf{elif}\;y \leq 6.7 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.99999999999999992e88 or 6.6999999999999997e53 < y Initial program 95.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6475.4
Simplified75.4%
if -1.99999999999999992e88 < y < -4.5999999999999999e31 or 1.49999999999999996e-184 < y < 6.6999999999999997e53Initial program 100.0%
Taylor expanded in x around inf
Simplified71.8%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval67.8
Simplified67.8%
if -4.5999999999999999e31 < y < 1.49999999999999996e-184Initial program 99.0%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.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
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified67.3%
Taylor expanded in y around 0
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6463.7
Simplified63.7%
(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)) t_1))) (if (<= b -5.2e-63) t_2 (if (<= b 0.0014) (fma a (- 1.0 t) 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)), t_1);
double tmp;
if (b <= -5.2e-63) {
tmp = t_2;
} else if (b <= 0.0014) {
tmp = fma(a, (1.0 - t), 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)), t_1) tmp = 0.0 if (b <= -5.2e-63) tmp = t_2; elseif (b <= 0.0014) tmp = fma(a, Float64(1.0 - t), 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] + t$95$1), $MachinePrecision]}, If[LessEqual[b, -5.2e-63], t$95$2, If[LessEqual[b, 0.0014], N[(a * N[(1.0 - t), $MachinePrecision] + t$95$1), $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), t\_1\right)\\
\mathbf{if}\;b \leq -5.2 \cdot 10^{-63}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 0.0014:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -5.2000000000000003e-63 or 0.00139999999999999999 < b Initial program 95.4%
Taylor expanded in a around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-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
--lowering--.f6490.9
Simplified90.9%
if -5.2000000000000003e-63 < b < 0.00139999999999999999Initial 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
accelerator-lowering-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
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* (- (+ y t) 2.0) b))))
(if (<= b -1.55e+25)
t_1
(if (<= b 3.4e+24) (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 = x + (((y + t) - 2.0) * b);
double tmp;
if (b <= -1.55e+25) {
tmp = t_1;
} else if (b <= 3.4e+24) {
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(x + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (b <= -1.55e+25) tmp = t_1; elseif (b <= 3.4e+24) 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[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.55e+25], t$95$1, If[LessEqual[b, 3.4e+24], 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 := x + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -1.55 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{+24}:\\
\;\;\;\;\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 < -1.5499999999999999e25 or 3.4000000000000001e24 < b Initial program 94.6%
Taylor expanded in x around inf
Simplified83.2%
if -1.5499999999999999e25 < b < 3.4000000000000001e24Initial 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
accelerator-lowering-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
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (+ y (+ t -2.0)))))
(if (<= b -5.2e-63)
t_1
(if (<= b 5.6e-192)
(fma a (- 1.0 t) x)
(if (<= b 1.35e+24) (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 <= -5.2e-63) {
tmp = t_1;
} else if (b <= 5.6e-192) {
tmp = fma(a, (1.0 - t), x);
} else if (b <= 1.35e+24) {
tmp = 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 <= -5.2e-63) tmp = t_1; elseif (b <= 5.6e-192) tmp = fma(a, Float64(1.0 - t), x); elseif (b <= 1.35e+24) 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[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.2e-63], t$95$1, If[LessEqual[b, 5.6e-192], N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[b, 1.35e+24], N[(z * N[(1.0 - y), $MachinePrecision] + x), $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 -5.2 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{-192}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.2000000000000003e-63 or 1.35e24 < b Initial program 95.2%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval73.0
Simplified73.0%
if -5.2000000000000003e-63 < b < 5.60000000000000007e-192Initial program 99.9%
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
accelerator-lowering-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
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified98.2%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6462.8
Simplified62.8%
if 5.60000000000000007e-192 < b < 1.35e24Initial program 100.0%
Taylor expanded in a around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-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
--lowering--.f6472.1
Simplified72.1%
Taylor expanded in b around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6462.3
Simplified62.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* (- (+ y t) 2.0) b))))
(if (<= b -9.2e-72)
t_1
(if (<= b 4.2e+23) (fma a (- 1.0 t) (fma y (- z) z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((y + t) - 2.0) * b);
double tmp;
if (b <= -9.2e-72) {
tmp = t_1;
} else if (b <= 4.2e+23) {
tmp = fma(a, (1.0 - t), fma(y, -z, z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (b <= -9.2e-72) tmp = t_1; elseif (b <= 4.2e+23) tmp = fma(a, Float64(1.0 - t), fma(y, Float64(-z), z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -9.2e-72], t$95$1, If[LessEqual[b, 4.2e+23], N[(a * N[(1.0 - t), $MachinePrecision] + N[(y * (-z) + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -9.2 \cdot 10^{-72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+23}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(y, -z, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -9.19999999999999978e-72 or 4.2000000000000003e23 < b Initial program 95.3%
Taylor expanded in x around inf
Simplified79.9%
if -9.19999999999999978e-72 < b < 4.2000000000000003e23Initial 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
accelerator-lowering-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
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified95.2%
Taylor expanded in z around inf
sub-negN/A
+-commutativeN/A
distribute-lft-inN/A
distribute-rgt-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-rgt-identityN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-lowering-neg.f6474.2
Simplified74.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -2e+49)
t_1
(if (<= y 1.9e-167)
(fma a (- 1.0 t) x)
(if (<= y 8.2e+46) (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 = y * (b - z);
double tmp;
if (y <= -2e+49) {
tmp = t_1;
} else if (y <= 1.9e-167) {
tmp = fma(a, (1.0 - t), x);
} else if (y <= 8.2e+46) {
tmp = fma(b, (t + -2.0), 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 <= -2e+49) tmp = t_1; elseif (y <= 1.9e-167) tmp = fma(a, Float64(1.0 - t), x); elseif (y <= 8.2e+46) 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[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+49], t$95$1, If[LessEqual[y, 1.9e-167], N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[y, 8.2e+46], N[(b * N[(t + -2.0), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-167}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(b, t + -2, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.99999999999999989e49 or 8.19999999999999999e46 < y Initial program 95.7%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6472.9
Simplified72.9%
if -1.99999999999999989e49 < y < 1.89999999999999984e-167Initial program 99.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
accelerator-lowering-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
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified75.2%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6453.6
Simplified53.6%
if 1.89999999999999984e-167 < y < 8.19999999999999999e46Initial program 100.0%
Taylor expanded in x around inf
Simplified71.0%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval68.0
Simplified68.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ x (* (- (+ y t) 2.0) b)))) (if (<= b -5.2e-63) t_1 (if (<= b 3.2e+23) (fma a (- 1.0 t) (+ x z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((y + t) - 2.0) * b);
double tmp;
if (b <= -5.2e-63) {
tmp = t_1;
} else if (b <= 3.2e+23) {
tmp = fma(a, (1.0 - t), (x + z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (b <= -5.2e-63) tmp = t_1; elseif (b <= 3.2e+23) tmp = fma(a, Float64(1.0 - t), Float64(x + z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.2e-63], t$95$1, If[LessEqual[b, 3.2e+23], N[(a * N[(1.0 - t), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -5.2 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.2 \cdot 10^{+23}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.2000000000000003e-63 or 3.2e23 < b Initial program 95.2%
Taylor expanded in x around inf
Simplified79.8%
if -5.2000000000000003e-63 < b < 3.2e23Initial 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
accelerator-lowering-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
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified95.2%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
+-lowering-+.f6473.2
Simplified73.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4.8e+194)
(- (* y z))
(if (<= y -9.5e+107)
(* (+ y t) b)
(if (<= y 1.72e+62) (fma b t x) (fma b y a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.8e+194) {
tmp = -(y * z);
} else if (y <= -9.5e+107) {
tmp = (y + t) * b;
} else if (y <= 1.72e+62) {
tmp = fma(b, t, x);
} else {
tmp = fma(b, y, a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.8e+194) tmp = Float64(-Float64(y * z)); elseif (y <= -9.5e+107) tmp = Float64(Float64(y + t) * b); elseif (y <= 1.72e+62) tmp = fma(b, t, x); else tmp = fma(b, y, a); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.8e+194], (-N[(y * z), $MachinePrecision]), If[LessEqual[y, -9.5e+107], N[(N[(y + t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 1.72e+62], N[(b * t + x), $MachinePrecision], N[(b * y + a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+194}:\\
\;\;\;\;-y \cdot z\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{+107}:\\
\;\;\;\;\left(y + t\right) \cdot b\\
\mathbf{elif}\;y \leq 1.72 \cdot 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(b, t, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, y, a\right)\\
\end{array}
\end{array}
if y < -4.8e194Initial program 90.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6485.2
Simplified85.2%
Taylor expanded in b around 0
mul-1-negN/A
neg-lowering-neg.f6460.5
Simplified60.5%
if -4.8e194 < y < -9.50000000000000019e107Initial program 91.7%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval60.2
Simplified60.2%
Taylor expanded in t around inf
Simplified60.2%
if -9.50000000000000019e107 < y < 1.7200000000000001e62Initial program 99.3%
Taylor expanded in x around inf
Simplified52.8%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval50.8
Simplified50.8%
Taylor expanded in t around inf
Simplified41.2%
if 1.7200000000000001e62 < y Initial program 98.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.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
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified88.1%
Taylor expanded in a around inf
Simplified50.6%
Taylor expanded in y around inf
Simplified50.6%
Final simplification46.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (+ y (+ t -2.0))))) (if (<= b -5.2e-63) t_1 (if (<= b 3.6e+24) (fma a (- 1.0 t) (+ x z)) 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 <= -5.2e-63) {
tmp = t_1;
} else if (b <= 3.6e+24) {
tmp = fma(a, (1.0 - t), (x + z));
} 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 <= -5.2e-63) tmp = t_1; elseif (b <= 3.6e+24) tmp = fma(a, Float64(1.0 - t), Float64(x + z)); 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, -5.2e-63], t$95$1, If[LessEqual[b, 3.6e+24], N[(a * N[(1.0 - t), $MachinePrecision] + N[(x + z), $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 -5.2 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.2000000000000003e-63 or 3.59999999999999983e24 < b Initial program 95.2%
Taylor expanded in b around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval73.0
Simplified73.0%
if -5.2000000000000003e-63 < b < 3.59999999999999983e24Initial 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
accelerator-lowering-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
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified95.2%
Taylor expanded in y around 0
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f64N/A
+-lowering-+.f6473.2
Simplified73.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* y (- b z)))) (if (<= y -1.9e+84) t_1 (if (<= y 6e+58) (+ z (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 = y * (b - z);
double tmp;
if (y <= -1.9e+84) {
tmp = t_1;
} else if (y <= 6e+58) {
tmp = z + fma(b, (t + -2.0), 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.9e+84) tmp = t_1; elseif (y <= 6e+58) tmp = Float64(z + 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[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+84], t$95$1, If[LessEqual[y, 6e+58], N[(z + N[(b * N[(t + -2.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+58}:\\
\;\;\;\;z + \mathsf{fma}\left(b, t + -2, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.9e84 or 6.0000000000000005e58 < y Initial program 95.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6475.4
Simplified75.4%
if -1.9e84 < y < 6.0000000000000005e58Initial program 99.3%
Taylor expanded in a around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-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
--lowering--.f6471.4
Simplified71.4%
Taylor expanded in y around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval67.0
Simplified67.0%
(FPCore (x y z t a b) :precision binary64 (if (<= t -4.7e+126) (* t b) (if (<= t -3.3e-291) x (if (<= t 1.8e-5) a (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.7e+126) {
tmp = t * b;
} else if (t <= -3.3e-291) {
tmp = x;
} else if (t <= 1.8e-5) {
tmp = 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 <= (-4.7d+126)) then
tmp = t * b
else if (t <= (-3.3d-291)) then
tmp = x
else if (t <= 1.8d-5) then
tmp = 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 <= -4.7e+126) {
tmp = t * b;
} else if (t <= -3.3e-291) {
tmp = x;
} else if (t <= 1.8e-5) {
tmp = a;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.7e+126: tmp = t * b elif t <= -3.3e-291: tmp = x elif t <= 1.8e-5: tmp = a else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.7e+126) tmp = Float64(t * b); elseif (t <= -3.3e-291) tmp = x; elseif (t <= 1.8e-5) tmp = 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 <= -4.7e+126) tmp = t * b; elseif (t <= -3.3e-291) tmp = x; elseif (t <= 1.8e-5) tmp = a; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.7e+126], N[(t * b), $MachinePrecision], If[LessEqual[t, -3.3e-291], x, If[LessEqual[t, 1.8e-5], a, N[(t * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{+126}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{-291}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-5}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -4.6999999999999999e126 or 1.80000000000000005e-5 < t Initial program 95.4%
Taylor expanded in a around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-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
--lowering--.f6472.6
Simplified72.6%
Taylor expanded in t around inf
*-lowering-*.f6436.5
Simplified36.5%
if -4.6999999999999999e126 < t < -3.2999999999999999e-291Initial program 100.0%
Taylor expanded in x around inf
Simplified21.2%
if -3.2999999999999999e-291 < t < 1.80000000000000005e-5Initial program 98.5%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.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
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified98.4%
Taylor expanded in a around inf
Simplified25.1%
Final simplification28.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* y (- b z)))) (if (<= y -4.8e+49) t_1 (if (<= y 38000000.0) (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 <= -4.8e+49) {
tmp = t_1;
} else if (y <= 38000000.0) {
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 <= -4.8e+49) tmp = t_1; elseif (y <= 38000000.0) 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, -4.8e+49], t$95$1, If[LessEqual[y, 38000000.0], 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 -4.8 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 38000000:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.8e49 or 3.8e7 < y Initial program 95.8%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6472.0
Simplified72.0%
if -4.8e49 < y < 3.8e7Initial program 99.2%
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
accelerator-lowering-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
--lowering--.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified71.4%
Taylor expanded in z around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
--lowering--.f6452.2
Simplified52.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* y (- b z)))) (if (<= y -1.25e+82) t_1 (if (<= y 2.4e+46) (fma b 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.25e+82) {
tmp = t_1;
} else if (y <= 2.4e+46) {
tmp = fma(b, 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.25e+82) tmp = t_1; elseif (y <= 2.4e+46) tmp = fma(b, 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.25e+82], t$95$1, If[LessEqual[y, 2.4e+46], N[(b * t + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(b, t, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.25000000000000004e82 or 2.40000000000000008e46 < y Initial program 95.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6475.4
Simplified75.4%
if -1.25000000000000004e82 < y < 2.40000000000000008e46Initial program 99.3%
Taylor expanded in x around inf
Simplified52.9%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval51.5
Simplified51.5%
Taylor expanded in t around inf
Simplified41.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* t (- b a)))) (if (<= t -9.2e+79) t_1 (if (<= t 1.8e-5) (fma b y 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 <= -9.2e+79) {
tmp = t_1;
} else if (t <= 1.8e-5) {
tmp = fma(b, y, 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 <= -9.2e+79) tmp = t_1; elseif (t <= 1.8e-5) tmp = fma(b, y, a); 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, -9.2e+79], t$95$1, If[LessEqual[t, 1.8e-5], N[(b * y + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(b, y, a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.2000000000000002e79 or 1.80000000000000005e-5 < t Initial program 95.7%
Taylor expanded in t around inf
*-lowering-*.f64N/A
--lowering--.f6462.3
Simplified62.3%
if -9.2000000000000002e79 < t < 1.80000000000000005e-5Initial program 99.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.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
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified96.5%
Taylor expanded in a around inf
Simplified52.2%
Taylor expanded in y around inf
Simplified42.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.8e+108) (fma b y a) (if (<= y 1.25e+50) (fma b t x) (fma b y a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.8e+108) {
tmp = fma(b, y, a);
} else if (y <= 1.25e+50) {
tmp = fma(b, t, x);
} else {
tmp = fma(b, y, a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.8e+108) tmp = fma(b, y, a); elseif (y <= 1.25e+50) tmp = fma(b, t, x); else tmp = fma(b, y, a); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.8e+108], N[(b * y + a), $MachinePrecision], If[LessEqual[y, 1.25e+50], N[(b * t + x), $MachinePrecision], N[(b * y + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+108}:\\
\;\;\;\;\mathsf{fma}\left(b, y, a\right)\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+50}:\\
\;\;\;\;\mathsf{fma}\left(b, t, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, y, a\right)\\
\end{array}
\end{array}
if y < -1.8e108 or 1.25e50 < y Initial program 95.2%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.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
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified86.8%
Taylor expanded in a around inf
Simplified49.3%
Taylor expanded in y around inf
Simplified49.3%
if -1.8e108 < y < 1.25e50Initial program 99.3%
Taylor expanded in x around inf
Simplified52.8%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval50.8
Simplified50.8%
Taylor expanded in t around inf
Simplified41.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.15e+110) (* y b) (if (<= y 8e+64) (fma b t x) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.15e+110) {
tmp = y * b;
} else if (y <= 8e+64) {
tmp = fma(b, t, x);
} else {
tmp = y * b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.15e+110) tmp = Float64(y * b); elseif (y <= 8e+64) tmp = fma(b, t, x); else tmp = Float64(y * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.15e+110], N[(y * b), $MachinePrecision], If[LessEqual[y, 8e+64], N[(b * t + x), $MachinePrecision], N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+110}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(b, t, x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -2.15000000000000003e110 or 8.00000000000000017e64 < y Initial program 95.2%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6476.3
Simplified76.3%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6445.1
Simplified45.1%
if -2.15000000000000003e110 < y < 8.00000000000000017e64Initial program 99.3%
Taylor expanded in x around inf
Simplified52.8%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval50.8
Simplified50.8%
Taylor expanded in t around inf
Simplified41.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -9.5e+107) (* y b) (if (<= y 850000000000.0) (fma b -2.0 x) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9.5e+107) {
tmp = y * b;
} else if (y <= 850000000000.0) {
tmp = fma(b, -2.0, x);
} else {
tmp = y * b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9.5e+107) tmp = Float64(y * b); elseif (y <= 850000000000.0) tmp = fma(b, -2.0, x); else tmp = Float64(y * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9.5e+107], N[(y * b), $MachinePrecision], If[LessEqual[y, 850000000000.0], N[(b * -2.0 + x), $MachinePrecision], N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+107}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 850000000000:\\
\;\;\;\;\mathsf{fma}\left(b, -2, x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -9.50000000000000019e107 or 8.5e11 < y Initial program 95.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6475.2
Simplified75.2%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6444.7
Simplified44.7%
if -9.50000000000000019e107 < y < 8.5e11Initial program 99.3%
Taylor expanded in x around inf
Simplified52.5%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval51.1
Simplified51.1%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6431.0
Simplified31.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.7e-34) (* t b) (if (<= b 1.85e-44) x (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.7e-34) {
tmp = t * b;
} else if (b <= 1.85e-44) {
tmp = x;
} else {
tmp = y * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-3.7d-34)) then
tmp = t * b
else if (b <= 1.85d-44) then
tmp = x
else
tmp = y * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.7e-34) {
tmp = t * b;
} else if (b <= 1.85e-44) {
tmp = x;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.7e-34: tmp = t * b elif b <= 1.85e-44: tmp = x else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.7e-34) tmp = Float64(t * b); elseif (b <= 1.85e-44) tmp = x; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.7e-34) tmp = t * b; elseif (b <= 1.85e-44) tmp = x; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.7e-34], N[(t * b), $MachinePrecision], If[LessEqual[b, 1.85e-44], x, N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.7 \cdot 10^{-34}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 1.85 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -3.69999999999999988e-34Initial program 93.8%
Taylor expanded in a around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-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
--lowering--.f6486.4
Simplified86.4%
Taylor expanded in t around inf
*-lowering-*.f6439.8
Simplified39.8%
if -3.69999999999999988e-34 < b < 1.85e-44Initial program 100.0%
Taylor expanded in x around inf
Simplified23.4%
if 1.85e-44 < b Initial program 97.1%
Taylor expanded in y around inf
*-lowering-*.f64N/A
--lowering--.f6456.3
Simplified56.3%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6443.5
Simplified43.5%
Final simplification33.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -4.7e+179) a (if (<= a 2e+178) x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.7e+179) {
tmp = a;
} else if (a <= 2e+178) {
tmp = x;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-4.7d+179)) then
tmp = a
else if (a <= 2d+178) then
tmp = x
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.7e+179) {
tmp = a;
} else if (a <= 2e+178) {
tmp = x;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4.7e+179: tmp = a elif a <= 2e+178: tmp = x else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.7e+179) tmp = a; elseif (a <= 2e+178) tmp = x; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -4.7e+179) tmp = a; elseif (a <= 2e+178) tmp = x; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.7e+179], a, If[LessEqual[a, 2e+178], x, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.7 \cdot 10^{+179}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+178}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -4.70000000000000007e179 or 2.0000000000000001e178 < a Initial program 94.7%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.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
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified68.9%
Taylor expanded in a around inf
Simplified34.2%
if -4.70000000000000007e179 < a < 2.0000000000000001e178Initial program 98.5%
Taylor expanded in x around inf
Simplified17.5%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return 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 = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 97.6%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
accelerator-lowering-fma.f64N/A
sub-negN/A
+-lowering-+.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
+-lowering-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
Simplified73.4%
Taylor expanded in a around inf
Simplified11.0%
herbie shell --seed 2024205
(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)))