
(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 16 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
(if (<=
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))
INFINITY)
(- x (fma (+ y -1.0) z (- (* (+ t -1.0) a) (* b (+ y (+ t -2.0))))))
(* t (- b a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b)) <= ((double) INFINITY)) {
tmp = x - fma((y + -1.0), z, (((t + -1.0) * a) - (b * (y + (t + -2.0)))));
} else {
tmp = t * (b - a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(Float64(Float64(y + t) - 2.0) * b)) <= Inf) tmp = Float64(x - fma(Float64(y + -1.0), z, Float64(Float64(Float64(t + -1.0) * a) - Float64(b * Float64(y + Float64(t + -2.0)))))); else tmp = Float64(t * Float64(b - a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], Infinity], N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(N[(N[(t + -1.0), $MachinePrecision] * a), $MachinePrecision] - N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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 \leq \infty:\\
\;\;\;\;x - \mathsf{fma}\left(y + -1, z, \left(t + -1\right) \cdot a - b \cdot \left(y + \left(t + -2\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6477.8
Simplified77.8%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (+ y -2.0))) (t_2 (* t (- b a))))
(if (<= t -1.1e-11)
t_2
(if (<= t -2.9e-157)
t_1
(if (<= t -1.52e-261)
(+ x a)
(if (<= t 1.7e-183) t_1 (if (<= t 7.2e+56) (fma b y x) 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.1e-11) {
tmp = t_2;
} else if (t <= -2.9e-157) {
tmp = t_1;
} else if (t <= -1.52e-261) {
tmp = x + a;
} else if (t <= 1.7e-183) {
tmp = t_1;
} else if (t <= 7.2e+56) {
tmp = fma(b, y, x);
} 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.1e-11) tmp = t_2; elseif (t <= -2.9e-157) tmp = t_1; elseif (t <= -1.52e-261) tmp = Float64(x + a); elseif (t <= 1.7e-183) tmp = t_1; elseif (t <= 7.2e+56) tmp = fma(b, y, x); else tmp = t_2; end return 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.1e-11], t$95$2, If[LessEqual[t, -2.9e-157], t$95$1, If[LessEqual[t, -1.52e-261], N[(x + a), $MachinePrecision], If[LessEqual[t, 1.7e-183], t$95$1, If[LessEqual[t, 7.2e+56], N[(b * y + x), $MachinePrecision], 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.1 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.52 \cdot 10^{-261}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-183}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(b, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.1000000000000001e-11 or 7.19999999999999996e56 < t Initial program 92.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6472.8
Simplified72.8%
if -1.1000000000000001e-11 < t < -2.89999999999999988e-157 or -1.5200000000000001e-261 < t < 1.70000000000000007e-183Initial program 99.9%
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-eval58.5
Simplified58.5%
Taylor expanded in t around 0
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval58.5
Simplified58.5%
if -2.89999999999999988e-157 < t < -1.5200000000000001e-261Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6467.5
Simplified67.5%
Taylor expanded in b around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6448.2
Simplified48.2%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f6448.2
Simplified48.2%
if 1.70000000000000007e-183 < t < 7.19999999999999996e56Initial program 100.0%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr100.0%
Taylor expanded in y around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6464.4
Simplified64.4%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
lower-fma.f6457.6
Simplified57.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.6e-11)
(* b (+ y (+ t -2.0)))
(if (<= b 8.5e-49)
(fma a (- 1.0 t) (fma z (- 1.0 y) x))
(if (<= b 7.2e+141)
(- x (fma (+ y -1.0) z (* t (- a b))))
(fma (+ t -2.0) b (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.6e-11) {
tmp = b * (y + (t + -2.0));
} else if (b <= 8.5e-49) {
tmp = fma(a, (1.0 - t), fma(z, (1.0 - y), x));
} else if (b <= 7.2e+141) {
tmp = x - fma((y + -1.0), z, (t * (a - b)));
} else {
tmp = fma((t + -2.0), b, (y * b));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.6e-11) tmp = Float64(b * Float64(y + Float64(t + -2.0))); elseif (b <= 8.5e-49) tmp = fma(a, Float64(1.0 - t), fma(z, Float64(1.0 - y), x)); elseif (b <= 7.2e+141) tmp = Float64(x - fma(Float64(y + -1.0), z, Float64(t * Float64(a - b)))); else tmp = fma(Float64(t + -2.0), b, Float64(y * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.6e-11], N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e-49], N[(a * N[(1.0 - t), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e+141], N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(t * N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + -2.0), $MachinePrecision] * b + N[(y * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{-11}:\\
\;\;\;\;b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-49}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{+141}:\\
\;\;\;\;x - \mathsf{fma}\left(y + -1, z, t \cdot \left(a - b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t + -2, b, y \cdot b\right)\\
\end{array}
\end{array}
if b < -1.59999999999999997e-11Initial program 95.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-eval79.0
Simplified79.0%
if -1.59999999999999997e-11 < b < 8.50000000000000069e-49Initial program 98.1%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/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
Simplified94.1%
if 8.50000000000000069e-49 < b < 7.2000000000000003e141Initial program 97.4%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr97.4%
Taylor expanded in t around inf
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
lower--.f6478.4
Simplified78.4%
if 7.2000000000000003e141 < b Initial program 92.3%
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-eval87.5
Simplified87.5%
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6487.5
Applied egg-rr87.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (+ y -2.0))))
(if (<= t -3.5e+43)
(* t b)
(if (<= t -2.9e-157)
t_1
(if (<= t -1.52e-261)
(+ x a)
(if (<= t 1.7e-183)
t_1
(if (<= t 7.8e+139) (fma b y x) (- (* t a)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y + -2.0);
double tmp;
if (t <= -3.5e+43) {
tmp = t * b;
} else if (t <= -2.9e-157) {
tmp = t_1;
} else if (t <= -1.52e-261) {
tmp = x + a;
} else if (t <= 1.7e-183) {
tmp = t_1;
} else if (t <= 7.8e+139) {
tmp = fma(b, y, x);
} else {
tmp = -(t * a);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y + -2.0)) tmp = 0.0 if (t <= -3.5e+43) tmp = Float64(t * b); elseif (t <= -2.9e-157) tmp = t_1; elseif (t <= -1.52e-261) tmp = Float64(x + a); elseif (t <= 1.7e-183) tmp = t_1; elseif (t <= 7.8e+139) tmp = fma(b, y, x); else tmp = Float64(-Float64(t * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e+43], N[(t * b), $MachinePrecision], If[LessEqual[t, -2.9e-157], t$95$1, If[LessEqual[t, -1.52e-261], N[(x + a), $MachinePrecision], If[LessEqual[t, 1.7e-183], t$95$1, If[LessEqual[t, 7.8e+139], N[(b * y + x), $MachinePrecision], (-N[(t * a), $MachinePrecision])]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y + -2\right)\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{+43}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.52 \cdot 10^{-261}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-183}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(b, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;-t \cdot a\\
\end{array}
\end{array}
if t < -3.5000000000000001e43Initial program 95.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6482.8
Simplified82.8%
Taylor expanded in b around inf
lower-*.f6451.3
Simplified51.3%
if -3.5000000000000001e43 < t < -2.89999999999999988e-157 or -1.5200000000000001e-261 < t < 1.70000000000000007e-183Initial program 99.9%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval54.0
Simplified54.0%
Taylor expanded in t around 0
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval52.9
Simplified52.9%
if -2.89999999999999988e-157 < t < -1.5200000000000001e-261Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6467.5
Simplified67.5%
Taylor expanded in b around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6448.2
Simplified48.2%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f6448.2
Simplified48.2%
if 1.70000000000000007e-183 < t < 7.80000000000000012e139Initial program 98.2%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr98.2%
Taylor expanded in y around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6460.0
Simplified60.0%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
lower-fma.f6453.5
Simplified53.5%
if 7.80000000000000012e139 < t Initial program 87.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6471.7
Simplified71.7%
Taylor expanded in b around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6445.0
Simplified45.0%
Final simplification50.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.38e-11)
(fma y (- b z) (fma b (+ t -2.0) (+ x z)))
(if (<= b 1.12e-38)
(fma a (- 1.0 t) (fma z (- 1.0 y) x))
(fma b (+ y (+ t -2.0)) (fma a (- 1.0 t) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.38e-11) {
tmp = fma(y, (b - z), fma(b, (t + -2.0), (x + z)));
} else if (b <= 1.12e-38) {
tmp = fma(a, (1.0 - t), fma(z, (1.0 - y), x));
} else {
tmp = fma(b, (y + (t + -2.0)), fma(a, (1.0 - t), x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.38e-11) tmp = fma(y, Float64(b - z), fma(b, Float64(t + -2.0), Float64(x + z))); elseif (b <= 1.12e-38) tmp = fma(a, Float64(1.0 - t), fma(z, Float64(1.0 - y), x)); else tmp = fma(b, Float64(y + Float64(t + -2.0)), fma(a, Float64(1.0 - t), x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.38e-11], N[(y * N[(b - z), $MachinePrecision] + N[(b * N[(t + -2.0), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.12e-38], N[(a * N[(1.0 - t), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.38 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(y, b - z, \mathsf{fma}\left(b, t + -2, x + z\right)\right)\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{-38}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, 1 - t, x\right)\right)\\
\end{array}
\end{array}
if b < -1.38e-11Initial program 95.5%
Taylor expanded in a around 0
Simplified94.2%
if -1.38e-11 < b < 1.1200000000000001e-38Initial program 98.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/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
Simplified93.1%
if 1.1200000000000001e-38 < b Initial program 94.5%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6488.2
Simplified88.2%
Final simplification92.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (fma (+ y -1.0) z (* t (- a b))))))
(if (<= z -9.2e+75)
t_1
(if (<= z 1.35e+80) (fma b (+ y (+ t -2.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 = x - fma((y + -1.0), z, (t * (a - b)));
double tmp;
if (z <= -9.2e+75) {
tmp = t_1;
} else if (z <= 1.35e+80) {
tmp = fma(b, (y + (t + -2.0)), fma(a, (1.0 - t), x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x - fma(Float64(y + -1.0), z, Float64(t * Float64(a - b)))) tmp = 0.0 if (z <= -9.2e+75) tmp = t_1; elseif (z <= 1.35e+80) tmp = fma(b, Float64(y + Float64(t + -2.0)), 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[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(t * N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+75], t$95$1, If[LessEqual[z, 1.35e+80], N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \mathsf{fma}\left(y + -1, z, t \cdot \left(a - b\right)\right)\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(b, y + \left(t + -2\right), \mathsf{fma}\left(a, 1 - t, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.1999999999999994e75 or 1.34999999999999991e80 < z Initial program 93.4%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr96.0%
Taylor expanded in t around inf
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
lower--.f6490.0
Simplified90.0%
if -9.1999999999999994e75 < z < 1.34999999999999991e80Initial program 97.7%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6490.9
Simplified90.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.6e-11)
(* b (+ y (+ t -2.0)))
(if (<= b 4.2e+138)
(fma a (- 1.0 t) (fma z (- 1.0 y) x))
(fma (+ t -2.0) b (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.6e-11) {
tmp = b * (y + (t + -2.0));
} else if (b <= 4.2e+138) {
tmp = fma(a, (1.0 - t), fma(z, (1.0 - y), x));
} else {
tmp = fma((t + -2.0), b, (y * b));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.6e-11) tmp = Float64(b * Float64(y + Float64(t + -2.0))); elseif (b <= 4.2e+138) tmp = fma(a, Float64(1.0 - t), fma(z, Float64(1.0 - y), x)); else tmp = fma(Float64(t + -2.0), b, Float64(y * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.6e-11], N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e+138], N[(a * N[(1.0 - t), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[(t + -2.0), $MachinePrecision] * b + N[(y * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{-11}:\\
\;\;\;\;b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+138}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t + -2, b, y \cdot b\right)\\
\end{array}
\end{array}
if b < -1.59999999999999997e-11Initial program 95.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-eval79.0
Simplified79.0%
if -1.59999999999999997e-11 < b < 4.20000000000000014e138Initial program 97.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
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/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
Simplified86.8%
if 4.20000000000000014e138 < b Initial program 92.6%
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-eval85.8
Simplified85.8%
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6485.9
Applied egg-rr85.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7e+51)
(* t b)
(if (<= t -6.8e-302)
(+ x a)
(if (<= t 2.7e-86) (* y b) (if (<= t 5e+141) (+ x z) (* t b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7e+51) {
tmp = t * b;
} else if (t <= -6.8e-302) {
tmp = x + a;
} else if (t <= 2.7e-86) {
tmp = y * b;
} else if (t <= 5e+141) {
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 <= (-7d+51)) then
tmp = t * b
else if (t <= (-6.8d-302)) then
tmp = x + a
else if (t <= 2.7d-86) then
tmp = y * b
else if (t <= 5d+141) 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 <= -7e+51) {
tmp = t * b;
} else if (t <= -6.8e-302) {
tmp = x + a;
} else if (t <= 2.7e-86) {
tmp = y * b;
} else if (t <= 5e+141) {
tmp = x + z;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7e+51: tmp = t * b elif t <= -6.8e-302: tmp = x + a elif t <= 2.7e-86: tmp = y * b elif t <= 5e+141: tmp = x + z else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7e+51) tmp = Float64(t * b); elseif (t <= -6.8e-302) tmp = Float64(x + a); elseif (t <= 2.7e-86) tmp = Float64(y * b); elseif (t <= 5e+141) 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 <= -7e+51) tmp = t * b; elseif (t <= -6.8e-302) tmp = x + a; elseif (t <= 2.7e-86) tmp = y * b; elseif (t <= 5e+141) tmp = x + z; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7e+51], N[(t * b), $MachinePrecision], If[LessEqual[t, -6.8e-302], N[(x + a), $MachinePrecision], If[LessEqual[t, 2.7e-86], N[(y * b), $MachinePrecision], If[LessEqual[t, 5e+141], N[(x + z), $MachinePrecision], N[(t * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+51}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-302}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-86}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+141}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -7e51 or 5.00000000000000025e141 < t Initial program 91.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6480.6
Simplified80.6%
Taylor expanded in b around inf
lower-*.f6446.8
Simplified46.8%
if -7e51 < t < -6.8e-302Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6475.2
Simplified75.2%
Taylor expanded in b around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6438.1
Simplified38.1%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f6434.2
Simplified34.2%
if -6.8e-302 < t < 2.69999999999999992e-86Initial program 100.0%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval54.7
Simplified54.7%
Taylor expanded in y around inf
lower-*.f6441.6
Simplified41.6%
if 2.69999999999999992e-86 < t < 5.00000000000000025e141Initial program 97.5%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr97.5%
Taylor expanded in y around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6469.3
Simplified69.3%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-+.f6447.9
Simplified47.9%
Final simplification42.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -980000000.0)
t_1
(if (<= t 1.15e-85) (* y (- b z)) (if (<= t 3e+56) (+ x z) 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 <= -980000000.0) {
tmp = t_1;
} else if (t <= 1.15e-85) {
tmp = y * (b - z);
} else if (t <= 3e+56) {
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 = t * (b - a)
if (t <= (-980000000.0d0)) then
tmp = t_1
else if (t <= 1.15d-85) then
tmp = y * (b - z)
else if (t <= 3d+56) 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 = t * (b - a);
double tmp;
if (t <= -980000000.0) {
tmp = t_1;
} else if (t <= 1.15e-85) {
tmp = y * (b - z);
} else if (t <= 3e+56) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -980000000.0: tmp = t_1 elif t <= 1.15e-85: tmp = y * (b - z) elif t <= 3e+56: tmp = x + z 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 <= -980000000.0) tmp = t_1; elseif (t <= 1.15e-85) tmp = Float64(y * Float64(b - z)); elseif (t <= 3e+56) tmp = Float64(x + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -980000000.0) tmp = t_1; elseif (t <= 1.15e-85) tmp = y * (b - z); elseif (t <= 3e+56) tmp = x + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -980000000.0], t$95$1, If[LessEqual[t, 1.15e-85], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+56], N[(x + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -980000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-85}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+56}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.8e8 or 3.00000000000000006e56 < t Initial program 92.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6474.4
Simplified74.4%
if -9.8e8 < t < 1.15e-85Initial program 100.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6447.6
Simplified47.6%
if 1.15e-85 < t < 3.00000000000000006e56Initial program 99.9%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr99.9%
Taylor expanded in y around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6481.2
Simplified81.2%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-+.f6462.6
Simplified62.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -1.05e+21)
t_1
(if (<= t 7.2e+56) (+ a (fma b (+ y -2.0) 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 <= -1.05e+21) {
tmp = t_1;
} else if (t <= 7.2e+56) {
tmp = a + fma(b, (y + -2.0), 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 <= -1.05e+21) tmp = t_1; elseif (t <= 7.2e+56) tmp = Float64(a + fma(b, Float64(y + -2.0), 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, -1.05e+21], t$95$1, If[LessEqual[t, 7.2e+56], N[(a + N[(b * N[(y + -2.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+56}:\\
\;\;\;\;a + \mathsf{fma}\left(b, y + -2, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.05e21 or 7.19999999999999996e56 < t Initial program 92.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6474.4
Simplified74.4%
if -1.05e21 < t < 7.19999999999999996e56Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6474.6
Simplified74.6%
Taylor expanded in t around 0
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval72.9
Simplified72.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -7e+51) (* t b) (if (<= t 2.25e-91) (+ x a) (if (<= t 5e+141) (+ x z) (* t b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7e+51) {
tmp = t * b;
} else if (t <= 2.25e-91) {
tmp = x + a;
} else if (t <= 5e+141) {
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 <= (-7d+51)) then
tmp = t * b
else if (t <= 2.25d-91) then
tmp = x + a
else if (t <= 5d+141) 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 <= -7e+51) {
tmp = t * b;
} else if (t <= 2.25e-91) {
tmp = x + a;
} else if (t <= 5e+141) {
tmp = x + z;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7e+51: tmp = t * b elif t <= 2.25e-91: tmp = x + a elif t <= 5e+141: tmp = x + z else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7e+51) tmp = Float64(t * b); elseif (t <= 2.25e-91) tmp = Float64(x + a); elseif (t <= 5e+141) 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 <= -7e+51) tmp = t * b; elseif (t <= 2.25e-91) tmp = x + a; elseif (t <= 5e+141) tmp = x + z; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7e+51], N[(t * b), $MachinePrecision], If[LessEqual[t, 2.25e-91], N[(x + a), $MachinePrecision], If[LessEqual[t, 5e+141], N[(x + z), $MachinePrecision], N[(t * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+51}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-91}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+141}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -7e51 or 5.00000000000000025e141 < t Initial program 91.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6480.6
Simplified80.6%
Taylor expanded in b around inf
lower-*.f6446.8
Simplified46.8%
if -7e51 < t < 2.24999999999999988e-91Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6475.4
Simplified75.4%
Taylor expanded in b around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6433.3
Simplified33.3%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f6430.7
Simplified30.7%
if 2.24999999999999988e-91 < t < 5.00000000000000025e141Initial program 97.7%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr97.7%
Taylor expanded in y around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6471.4
Simplified71.4%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-+.f6446.9
Simplified46.9%
Final simplification39.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (+ y (+ t -2.0))))) (if (<= b -1.38e-11) t_1 (if (<= b 700000000.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 = b * (y + (t + -2.0));
double tmp;
if (b <= -1.38e-11) {
tmp = t_1;
} else if (b <= 700000000.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(b * Float64(y + Float64(t + -2.0))) tmp = 0.0 if (b <= -1.38e-11) tmp = t_1; elseif (b <= 700000000.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[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.38e-11], t$95$1, If[LessEqual[b, 700000000.0], N[(a * N[(1.0 - t), $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 -1.38 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 700000000:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.38e-11 or 7e8 < b Initial program 94.6%
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-eval76.8
Simplified76.8%
if -1.38e-11 < b < 7e8Initial program 98.3%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6469.4
Simplified69.4%
Taylor expanded in b around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6462.3
Simplified62.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -8.6e+78) (* t b) (if (<= t 7.8e+139) (fma b y x) (- (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -8.6e+78) {
tmp = t * b;
} else if (t <= 7.8e+139) {
tmp = fma(b, y, x);
} else {
tmp = -(t * a);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -8.6e+78) tmp = Float64(t * b); elseif (t <= 7.8e+139) tmp = fma(b, y, x); else tmp = Float64(-Float64(t * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -8.6e+78], N[(t * b), $MachinePrecision], If[LessEqual[t, 7.8e+139], N[(b * y + x), $MachinePrecision], (-N[(t * a), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+78}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(b, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;-t \cdot a\\
\end{array}
\end{array}
if t < -8.59999999999999962e78Initial program 94.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6489.2
Simplified89.2%
Taylor expanded in b around inf
lower-*.f6454.1
Simplified54.1%
if -8.59999999999999962e78 < t < 7.80000000000000012e139Initial program 99.3%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr99.3%
Taylor expanded in y around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6457.3
Simplified57.3%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
lower-fma.f6442.5
Simplified42.5%
if 7.80000000000000012e139 < t Initial program 87.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6471.7
Simplified71.7%
Taylor expanded in b around 0
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6445.0
Simplified45.0%
Final simplification45.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -8.6e+78) (* t b) (if (<= t 4.1e+138) (fma b y x) (* t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -8.6e+78) {
tmp = t * b;
} else if (t <= 4.1e+138) {
tmp = fma(b, y, x);
} else {
tmp = t * b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -8.6e+78) tmp = Float64(t * b); elseif (t <= 4.1e+138) tmp = fma(b, y, x); else tmp = Float64(t * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -8.6e+78], N[(t * b), $MachinePrecision], If[LessEqual[t, 4.1e+138], N[(b * y + x), $MachinePrecision], N[(t * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+78}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+138}:\\
\;\;\;\;\mathsf{fma}\left(b, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -8.59999999999999962e78 or 4.0999999999999998e138 < t Initial program 91.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6481.1
Simplified81.1%
Taylor expanded in b around inf
lower-*.f6446.2
Simplified46.2%
if -8.59999999999999962e78 < t < 4.0999999999999998e138Initial program 99.3%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr99.3%
Taylor expanded in y around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6457.6
Simplified57.6%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
lower-fma.f6442.7
Simplified42.7%
Final simplification44.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -7e+122) (+ x a) (if (<= a 1.4e-70) (+ x z) (+ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7e+122) {
tmp = x + a;
} else if (a <= 1.4e-70) {
tmp = x + z;
} else {
tmp = x + 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 <= (-7d+122)) then
tmp = x + a
else if (a <= 1.4d-70) then
tmp = x + z
else
tmp = x + 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 <= -7e+122) {
tmp = x + a;
} else if (a <= 1.4e-70) {
tmp = x + z;
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -7e+122: tmp = x + a elif a <= 1.4e-70: tmp = x + z else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -7e+122) tmp = Float64(x + a); elseif (a <= 1.4e-70) tmp = Float64(x + z); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -7e+122) tmp = x + a; elseif (a <= 1.4e-70) tmp = x + z; else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7e+122], N[(x + a), $MachinePrecision], If[LessEqual[a, 1.4e-70], N[(x + z), $MachinePrecision], N[(x + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+122}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-70}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if a < -7.00000000000000028e122 or 1.4e-70 < a Initial program 93.7%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6485.3
Simplified85.3%
Taylor expanded in b around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6458.4
Simplified58.4%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f6421.6
Simplified21.6%
if -7.00000000000000028e122 < a < 1.4e-70Initial program 98.6%
lift--.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-+l-N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
Applied egg-rr99.3%
Taylor expanded in y around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6465.1
Simplified65.1%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-+.f6434.5
Simplified34.5%
(FPCore (x y z t a b) :precision binary64 (+ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x + 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 = x + a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + a;
}
def code(x, y, z, t, a, b): return x + a
function code(x, y, z, t, a, b) return Float64(x + a) end
function tmp = code(x, y, z, t, a, b) tmp = x + a; end
code[x_, y_, z_, t_, a_, b_] := N[(x + a), $MachinePrecision]
\begin{array}{l}
\\
x + a
\end{array}
Initial program 96.4%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6478.8
Simplified78.8%
Taylor expanded in b around 0
+-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower--.f6441.8
Simplified41.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f6422.3
Simplified22.3%
herbie shell --seed 2024207
(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)))