
(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 24 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 (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b))))
(if (<= t_1 INFINITY) t_1 (fma (- 1.0 y) z (fma (- (+ t y) 2.0) b x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma((1.0 - y), z, fma(((t + y) - 2.0), b, x));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(Float64(1.0 - y), z, fma(Float64(Float64(t + y) - 2.0), b, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in x around 0
Applied rewrites55.6%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6477.8
Applied rewrites77.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -5.2e+135) (not (<= x 3.15e+119))) (fma (- 1.0 y) z (fma (- (+ t y) 2.0) b x)) (fma (- b a) t (fma (- y 2.0) b (fma (- 1.0 y) z a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -5.2e+135) || !(x <= 3.15e+119)) {
tmp = fma((1.0 - y), z, fma(((t + y) - 2.0), b, x));
} else {
tmp = fma((b - a), t, fma((y - 2.0), b, fma((1.0 - y), z, a)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -5.2e+135) || !(x <= 3.15e+119)) tmp = fma(Float64(1.0 - y), z, fma(Float64(Float64(t + y) - 2.0), b, x)); else tmp = fma(Float64(b - a), t, fma(Float64(y - 2.0), b, fma(Float64(1.0 - y), z, a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -5.2e+135], N[Not[LessEqual[x, 3.15e+119]], $MachinePrecision]], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + N[(N[(1.0 - y), $MachinePrecision] * z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+135} \lor \neg \left(x \leq 3.15 \cdot 10^{+119}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, \mathsf{fma}\left(1 - y, z, a\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.2e135 or 3.1499999999999999e119 < x Initial program 95.2%
Taylor expanded in x around 0
Applied rewrites58.4%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6490.2
Applied rewrites90.2%
if -5.2e135 < x < 3.1499999999999999e119Initial program 97.0%
Taylor expanded in x around 0
Applied rewrites95.4%
Final simplification93.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -0.0009) (not (<= t 4.6e+85))) (fma (- 1.0 t) a (fma (- (+ t y) 2.0) b x)) (fma (- 1.0 y) z (+ a (fma (- y 2.0) b x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -0.0009) || !(t <= 4.6e+85)) {
tmp = fma((1.0 - t), a, fma(((t + y) - 2.0), b, x));
} else {
tmp = fma((1.0 - y), z, (a + fma((y - 2.0), b, x)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -0.0009) || !(t <= 4.6e+85)) tmp = fma(Float64(1.0 - t), a, fma(Float64(Float64(t + y) - 2.0), b, x)); else tmp = fma(Float64(1.0 - y), z, Float64(a + fma(Float64(y - 2.0), b, x))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -0.0009], N[Not[LessEqual[t, 4.6e+85]], $MachinePrecision]], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0009 \lor \neg \left(t \leq 4.6 \cdot 10^{+85}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + \mathsf{fma}\left(y - 2, b, x\right)\right)\\
\end{array}
\end{array}
if t < -8.9999999999999998e-4 or 4.5999999999999998e85 < t Initial program 93.5%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6487.4
Applied rewrites87.4%
if -8.9999999999999998e-4 < t < 4.5999999999999998e85Initial program 98.6%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites96.6%
Final simplification92.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -40000.0) (not (<= b 4.4e+64))) (fma (- 1.0 t) a (fma (- (+ t y) 2.0) b x)) (- x (fma z (- y 1.0) (* a (- t 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -40000.0) || !(b <= 4.4e+64)) {
tmp = fma((1.0 - t), a, fma(((t + y) - 2.0), b, x));
} else {
tmp = x - fma(z, (y - 1.0), (a * (t - 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -40000.0) || !(b <= 4.4e+64)) tmp = fma(Float64(1.0 - t), a, fma(Float64(Float64(t + y) - 2.0), b, x)); else tmp = Float64(x - fma(z, Float64(y - 1.0), Float64(a * Float64(t - 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -40000.0], N[Not[LessEqual[b, 4.4e+64]], $MachinePrecision]], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y - 1.0), $MachinePrecision] + N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -40000 \lor \neg \left(b \leq 4.4 \cdot 10^{+64}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - \mathsf{fma}\left(z, y - 1, a \cdot \left(t - 1\right)\right)\\
\end{array}
\end{array}
if b < -4e4 or 4.40000000000000004e64 < b Initial program 92.1%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6489.8
Applied rewrites89.8%
if -4e4 < b < 4.40000000000000004e64Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites76.2%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6489.1
Applied rewrites89.1%
Final simplification89.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.00047) (not (<= y 0.0001))) (fma (- 1.0 y) z (fma (- y 2.0) b x)) (fma (- 1.0 t) a (+ z (fma (- t 2.0) b x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.00047) || !(y <= 0.0001)) {
tmp = fma((1.0 - y), z, fma((y - 2.0), b, x));
} else {
tmp = fma((1.0 - t), a, (z + fma((t - 2.0), b, x)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.00047) || !(y <= 0.0001)) tmp = fma(Float64(1.0 - y), z, fma(Float64(y - 2.0), b, x)); else tmp = fma(Float64(1.0 - t), a, Float64(z + fma(Float64(t - 2.0), b, x))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.00047], N[Not[LessEqual[y, 0.0001]], $MachinePrecision]], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - t), $MachinePrecision] * a + N[(z + N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00047 \lor \neg \left(y \leq 0.0001\right):\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(y - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z + \mathsf{fma}\left(t - 2, b, x\right)\right)\\
\end{array}
\end{array}
if y < -4.69999999999999986e-4 or 1.00000000000000005e-4 < y Initial program 95.1%
Taylor expanded in x around 0
Applied rewrites83.9%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6485.9
Applied rewrites85.9%
Taylor expanded in t around 0
Applied rewrites78.1%
if -4.69999999999999986e-4 < y < 1.00000000000000005e-4Initial program 97.7%
Taylor expanded in y around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites99.1%
Final simplification88.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -5.4e-17)
t_1
(if (<= t 3.55e-239)
(* (- y 2.0) b)
(if (<= t 3.3e-65) (+ a x) (if (<= t 9e+86) (* (- 1.0 y) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -5.4e-17) {
tmp = t_1;
} else if (t <= 3.55e-239) {
tmp = (y - 2.0) * b;
} else if (t <= 3.3e-65) {
tmp = a + x;
} else if (t <= 9e+86) {
tmp = (1.0 - y) * 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 = (b - a) * t
if (t <= (-5.4d-17)) then
tmp = t_1
else if (t <= 3.55d-239) then
tmp = (y - 2.0d0) * b
else if (t <= 3.3d-65) then
tmp = a + x
else if (t <= 9d+86) then
tmp = (1.0d0 - y) * 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 = (b - a) * t;
double tmp;
if (t <= -5.4e-17) {
tmp = t_1;
} else if (t <= 3.55e-239) {
tmp = (y - 2.0) * b;
} else if (t <= 3.3e-65) {
tmp = a + x;
} else if (t <= 9e+86) {
tmp = (1.0 - y) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -5.4e-17: tmp = t_1 elif t <= 3.55e-239: tmp = (y - 2.0) * b elif t <= 3.3e-65: tmp = a + x elif t <= 9e+86: tmp = (1.0 - y) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -5.4e-17) tmp = t_1; elseif (t <= 3.55e-239) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 3.3e-65) tmp = Float64(a + x); elseif (t <= 9e+86) tmp = Float64(Float64(1.0 - y) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - a) * t; tmp = 0.0; if (t <= -5.4e-17) tmp = t_1; elseif (t <= 3.55e-239) tmp = (y - 2.0) * b; elseif (t <= 3.3e-65) tmp = a + x; elseif (t <= 9e+86) tmp = (1.0 - y) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.4e-17], t$95$1, If[LessEqual[t, 3.55e-239], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 3.3e-65], N[(a + x), $MachinePrecision], If[LessEqual[t, 9e+86], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.55 \cdot 10^{-239}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-65}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+86}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.4000000000000002e-17 or 8.99999999999999986e86 < t Initial program 93.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6471.7
Applied rewrites71.7%
if -5.4000000000000002e-17 < t < 3.5499999999999999e-239Initial program 98.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6448.9
Applied rewrites48.9%
Taylor expanded in t around 0
Applied rewrites48.9%
if 3.5499999999999999e-239 < t < 3.3000000000000001e-65Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6474.6
Applied rewrites74.6%
Taylor expanded in b around 0
Applied rewrites48.7%
Taylor expanded in t around 0
Applied rewrites48.7%
if 3.3000000000000001e-65 < t < 8.99999999999999986e86Initial program 97.4%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
neg-mul-1N/A
+-commutativeN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f6454.1
Applied rewrites54.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.1e+70) (not (<= b 1e+65))) (fma (- b a) t (fma (- y 2.0) b a)) (- x (fma z (- y 1.0) (* a (- t 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.1e+70) || !(b <= 1e+65)) {
tmp = fma((b - a), t, fma((y - 2.0), b, a));
} else {
tmp = x - fma(z, (y - 1.0), (a * (t - 1.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.1e+70) || !(b <= 1e+65)) tmp = fma(Float64(b - a), t, fma(Float64(y - 2.0), b, a)); else tmp = Float64(x - fma(z, Float64(y - 1.0), Float64(a * Float64(t - 1.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.1e+70], N[Not[LessEqual[b, 1e+65]], $MachinePrecision]], N[(N[(b - a), $MachinePrecision] * t + N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y - 1.0), $MachinePrecision] + N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{+70} \lor \neg \left(b \leq 10^{+65}\right):\\
\;\;\;\;\mathsf{fma}\left(b - a, t, \mathsf{fma}\left(y - 2, b, a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x - \mathsf{fma}\left(z, y - 1, a \cdot \left(t - 1\right)\right)\\
\end{array}
\end{array}
if b < -3.1000000000000003e70 or 9.9999999999999999e64 < b Initial program 92.2%
Taylor expanded in x around 0
Applied rewrites92.6%
Taylor expanded in z around 0
Applied rewrites88.0%
if -3.1000000000000003e70 < b < 9.9999999999999999e64Initial program 99.3%
Taylor expanded in x around 0
Applied rewrites76.9%
Taylor expanded in b around 0
lower--.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6487.3
Applied rewrites87.3%
Final simplification87.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -6.7e+274)
(* b t)
(if (<= t -48.0)
(* (- a) t)
(if (<= t 1.75e-67) (+ a x) (if (<= t 1.15e+87) (* (- z) y) (* b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.7e+274) {
tmp = b * t;
} else if (t <= -48.0) {
tmp = -a * t;
} else if (t <= 1.75e-67) {
tmp = a + x;
} else if (t <= 1.15e+87) {
tmp = -z * y;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-6.7d+274)) then
tmp = b * t
else if (t <= (-48.0d0)) then
tmp = -a * t
else if (t <= 1.75d-67) then
tmp = a + x
else if (t <= 1.15d+87) then
tmp = -z * y
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.7e+274) {
tmp = b * t;
} else if (t <= -48.0) {
tmp = -a * t;
} else if (t <= 1.75e-67) {
tmp = a + x;
} else if (t <= 1.15e+87) {
tmp = -z * y;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.7e+274: tmp = b * t elif t <= -48.0: tmp = -a * t elif t <= 1.75e-67: tmp = a + x elif t <= 1.15e+87: tmp = -z * y else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.7e+274) tmp = Float64(b * t); elseif (t <= -48.0) tmp = Float64(Float64(-a) * t); elseif (t <= 1.75e-67) tmp = Float64(a + x); elseif (t <= 1.15e+87) tmp = Float64(Float64(-z) * y); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -6.7e+274) tmp = b * t; elseif (t <= -48.0) tmp = -a * t; elseif (t <= 1.75e-67) tmp = a + x; elseif (t <= 1.15e+87) tmp = -z * y; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.7e+274], N[(b * t), $MachinePrecision], If[LessEqual[t, -48.0], N[((-a) * t), $MachinePrecision], If[LessEqual[t, 1.75e-67], N[(a + x), $MachinePrecision], If[LessEqual[t, 1.15e+87], N[((-z) * y), $MachinePrecision], N[(b * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.7 \cdot 10^{+274}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq -48:\\
\;\;\;\;\left(-a\right) \cdot t\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-67}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+87}:\\
\;\;\;\;\left(-z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -6.69999999999999984e274 or 1.1500000000000001e87 < t Initial program 95.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6461.6
Applied rewrites61.6%
Taylor expanded in t around inf
Applied rewrites60.9%
if -6.69999999999999984e274 < t < -48Initial program 92.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.3
Applied rewrites69.3%
Taylor expanded in a around inf
Applied rewrites45.4%
if -48 < t < 1.75e-67Initial program 99.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6476.0
Applied rewrites76.0%
Taylor expanded in b around 0
Applied rewrites37.7%
Taylor expanded in t around 0
Applied rewrites37.7%
if 1.75e-67 < t < 1.1500000000000001e87Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites82.7%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6491.6
Applied rewrites91.6%
Taylor expanded in b around 0
Applied rewrites64.5%
Taylor expanded in y around inf
Applied rewrites36.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.4e-17) (not (<= t 4.6e+85))) (fma (- 1.0 t) a (fma (- t 2.0) b x)) (fma (- 1.0 y) z (fma (- y 2.0) b x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.4e-17) || !(t <= 4.6e+85)) {
tmp = fma((1.0 - t), a, fma((t - 2.0), b, x));
} else {
tmp = fma((1.0 - y), z, fma((y - 2.0), b, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.4e-17) || !(t <= 4.6e+85)) tmp = fma(Float64(1.0 - t), a, fma(Float64(t - 2.0), b, x)); else tmp = fma(Float64(1.0 - y), z, fma(Float64(y - 2.0), b, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.4e-17], N[Not[LessEqual[t, 4.6e+85]], $MachinePrecision]], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-17} \lor \neg \left(t \leq 4.6 \cdot 10^{+85}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(t - 2, b, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(y - 2, b, x\right)\right)\\
\end{array}
\end{array}
if t < -5.4000000000000002e-17 or 4.5999999999999998e85 < t Initial program 93.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6487.4
Applied rewrites87.4%
Taylor expanded in y around 0
Applied rewrites83.5%
if -5.4000000000000002e-17 < t < 4.5999999999999998e85Initial program 98.6%
Taylor expanded in x around 0
Applied rewrites82.5%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6483.7
Applied rewrites83.7%
Taylor expanded in t around 0
Applied rewrites82.0%
Final simplification82.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.2e+37) (not (<= y 2.5e+64))) (* (- b z) y) (fma (- 1.0 t) a (fma (- t 2.0) b x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.2e+37) || !(y <= 2.5e+64)) {
tmp = (b - z) * y;
} else {
tmp = fma((1.0 - t), a, fma((t - 2.0), b, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.2e+37) || !(y <= 2.5e+64)) tmp = Float64(Float64(b - z) * y); else tmp = fma(Float64(1.0 - t), a, fma(Float64(t - 2.0), b, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.2e+37], N[Not[LessEqual[y, 2.5e+64]], $MachinePrecision]], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], N[(N[(1.0 - t), $MachinePrecision] * a + N[(N[(t - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+37} \lor \neg \left(y \leq 2.5 \cdot 10^{+64}\right):\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, \mathsf{fma}\left(t - 2, b, x\right)\right)\\
\end{array}
\end{array}
if y < -7.19999999999999995e37 or 2.5e64 < y Initial program 94.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6472.1
Applied rewrites72.1%
if -7.19999999999999995e37 < y < 2.5e64Initial program 98.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6481.4
Applied rewrites81.4%
Taylor expanded in y around 0
Applied rewrites79.7%
Final simplification76.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- (+ t y) 2.0) b)))
(if (<= b -2.5e-33)
t_1
(if (<= b 1.92e-193)
(fma (- 1.0 t) a x)
(if (<= b 1e+65) (fma (- 1.0 y) z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t + y) - 2.0) * b;
double tmp;
if (b <= -2.5e-33) {
tmp = t_1;
} else if (b <= 1.92e-193) {
tmp = fma((1.0 - t), a, x);
} else if (b <= 1e+65) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t + y) - 2.0) * b) tmp = 0.0 if (b <= -2.5e-33) tmp = t_1; elseif (b <= 1.92e-193) tmp = fma(Float64(1.0 - t), a, x); elseif (b <= 1e+65) tmp = fma(Float64(1.0 - y), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.5e-33], t$95$1, If[LessEqual[b, 1.92e-193], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[b, 1e+65], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(t + y\right) - 2\right) \cdot b\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.92 \cdot 10^{-193}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;b \leq 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.50000000000000014e-33 or 9.9999999999999999e64 < b Initial program 92.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6475.4
Applied rewrites75.4%
if -2.50000000000000014e-33 < b < 1.92e-193Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6471.2
Applied rewrites71.2%
Taylor expanded in b around 0
Applied rewrites66.5%
if 1.92e-193 < b < 9.9999999999999999e64Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites75.7%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6477.7
Applied rewrites77.7%
Taylor expanded in b around 0
Applied rewrites59.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -125000.0)
(fma (- b a) t (* -2.0 b))
(if (<= t 2.3e-65)
(fma (- y 2.0) b (+ a x))
(if (<= t 1.35e+87) (fma (- 1.0 y) z x) (* (- b a) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -125000.0) {
tmp = fma((b - a), t, (-2.0 * b));
} else if (t <= 2.3e-65) {
tmp = fma((y - 2.0), b, (a + x));
} else if (t <= 1.35e+87) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = (b - a) * t;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -125000.0) tmp = fma(Float64(b - a), t, Float64(-2.0 * b)); elseif (t <= 2.3e-65) tmp = fma(Float64(y - 2.0), b, Float64(a + x)); elseif (t <= 1.35e+87) tmp = fma(Float64(1.0 - y), z, x); else tmp = Float64(Float64(b - a) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -125000.0], N[(N[(b - a), $MachinePrecision] * t + N[(-2.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-65], N[(N[(y - 2.0), $MachinePrecision] * b + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+87], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -125000:\\
\;\;\;\;\mathsf{fma}\left(b - a, t, -2 \cdot b\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-65}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a + x\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\end{array}
\end{array}
if t < -125000Initial program 90.4%
Taylor expanded in x around 0
Applied rewrites84.2%
Taylor expanded in y around 0
Applied rewrites72.1%
Taylor expanded in b around inf
Applied rewrites69.9%
if -125000 < t < 2.3e-65Initial program 99.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6476.2
Applied rewrites76.2%
Taylor expanded in t around 0
Applied rewrites76.3%
if 2.3e-65 < t < 1.35000000000000003e87Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites82.3%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6491.4
Applied rewrites91.4%
Taylor expanded in b around 0
Applied rewrites66.1%
if 1.35000000000000003e87 < t Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6479.5
Applied rewrites79.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -125000.0)
t_1
(if (<= t 2.3e-65)
(fma (- y 2.0) b (+ a x))
(if (<= t 1.35e+87) (fma (- 1.0 y) z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -125000.0) {
tmp = t_1;
} else if (t <= 2.3e-65) {
tmp = fma((y - 2.0), b, (a + x));
} else if (t <= 1.35e+87) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -125000.0) tmp = t_1; elseif (t <= 2.3e-65) tmp = fma(Float64(y - 2.0), b, Float64(a + x)); elseif (t <= 1.35e+87) tmp = fma(Float64(1.0 - y), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -125000.0], t$95$1, If[LessEqual[t, 2.3e-65], N[(N[(y - 2.0), $MachinePrecision] * b + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+87], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -125000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-65}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a + x\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -125000 or 1.35000000000000003e87 < t Initial program 93.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6473.0
Applied rewrites73.0%
if -125000 < t < 2.3e-65Initial program 99.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6476.2
Applied rewrites76.2%
Taylor expanded in t around 0
Applied rewrites76.3%
if 2.3e-65 < t < 1.35000000000000003e87Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites82.3%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6491.4
Applied rewrites91.4%
Taylor expanded in b around 0
Applied rewrites66.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -5.4e-17)
t_1
(if (<= t 4.2e-268)
(* (- y 2.0) b)
(if (<= t 1.35e+87) (fma (- 1.0 y) z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -5.4e-17) {
tmp = t_1;
} else if (t <= 4.2e-268) {
tmp = (y - 2.0) * b;
} else if (t <= 1.35e+87) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -5.4e-17) tmp = t_1; elseif (t <= 4.2e-268) tmp = Float64(Float64(y - 2.0) * b); elseif (t <= 1.35e+87) tmp = fma(Float64(1.0 - y), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.4e-17], t$95$1, If[LessEqual[t, 4.2e-268], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[t, 1.35e+87], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-268}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.4000000000000002e-17 or 1.35000000000000003e87 < t Initial program 93.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6471.7
Applied rewrites71.7%
if -5.4000000000000002e-17 < t < 4.19999999999999996e-268Initial program 98.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6450.1
Applied rewrites50.1%
Taylor expanded in t around 0
Applied rewrites50.1%
if 4.19999999999999996e-268 < t < 1.35000000000000003e87Initial program 98.6%
Taylor expanded in x around 0
Applied rewrites79.5%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6483.0
Applied rewrites83.0%
Taylor expanded in b around 0
Applied rewrites60.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -9.5e-37)
(* (- y 2.0) b)
(if (<= b -5.5e-284)
(fma (- t) a x)
(if (<= b 1.85e+68) (fma (- y) z x) (* (- t 2.0) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -9.5e-37) {
tmp = (y - 2.0) * b;
} else if (b <= -5.5e-284) {
tmp = fma(-t, a, x);
} else if (b <= 1.85e+68) {
tmp = fma(-y, z, x);
} else {
tmp = (t - 2.0) * b;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -9.5e-37) tmp = Float64(Float64(y - 2.0) * b); elseif (b <= -5.5e-284) tmp = fma(Float64(-t), a, x); elseif (b <= 1.85e+68) tmp = fma(Float64(-y), z, x); else tmp = Float64(Float64(t - 2.0) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -9.5e-37], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, -5.5e-284], N[((-t) * a + x), $MachinePrecision], If[LessEqual[b, 1.85e+68], N[((-y) * z + x), $MachinePrecision], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.5 \cdot 10^{-37}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;b \leq -5.5 \cdot 10^{-284}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
\mathbf{elif}\;b \leq 1.85 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(-y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -9.49999999999999927e-37Initial program 93.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6471.5
Applied rewrites71.5%
Taylor expanded in t around 0
Applied rewrites48.0%
if -9.49999999999999927e-37 < b < -5.4999999999999995e-284Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6471.3
Applied rewrites71.3%
Taylor expanded in b around 0
Applied rewrites66.0%
Taylor expanded in t around inf
Applied rewrites56.0%
if -5.4999999999999995e-284 < b < 1.84999999999999999e68Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites75.2%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6473.0
Applied rewrites73.0%
Taylor expanded in b around 0
Applied rewrites59.1%
Taylor expanded in y around inf
Applied rewrites50.5%
if 1.84999999999999999e68 < b Initial program 90.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6480.1
Applied rewrites80.1%
Taylor expanded in y around 0
Applied rewrites56.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 2.0) b)))
(if (<= b -4.8e-39)
t_1
(if (<= b -5.5e-284)
(fma (- t) a x)
(if (<= b 1.85e+68) (fma (- y) z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 2.0) * b;
double tmp;
if (b <= -4.8e-39) {
tmp = t_1;
} else if (b <= -5.5e-284) {
tmp = fma(-t, a, x);
} else if (b <= 1.85e+68) {
tmp = fma(-y, z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 2.0) * b) tmp = 0.0 if (b <= -4.8e-39) tmp = t_1; elseif (b <= -5.5e-284) tmp = fma(Float64(-t), a, x); elseif (b <= 1.85e+68) tmp = fma(Float64(-y), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -4.8e-39], t$95$1, If[LessEqual[b, -5.5e-284], N[((-t) * a + x), $MachinePrecision], If[LessEqual[b, 1.85e+68], N[((-y) * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 2\right) \cdot b\\
\mathbf{if}\;b \leq -4.8 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -5.5 \cdot 10^{-284}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
\mathbf{elif}\;b \leq 1.85 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(-y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.80000000000000031e-39 or 1.84999999999999999e68 < b Initial program 92.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6474.5
Applied rewrites74.5%
Taylor expanded in y around 0
Applied rewrites49.7%
if -4.80000000000000031e-39 < b < -5.4999999999999995e-284Initial program 100.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6471.3
Applied rewrites71.3%
Taylor expanded in b around 0
Applied rewrites66.0%
Taylor expanded in t around inf
Applied rewrites56.0%
if -5.4999999999999995e-284 < b < 1.84999999999999999e68Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites75.2%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6473.0
Applied rewrites73.0%
Taylor expanded in b around 0
Applied rewrites59.1%
Taylor expanded in y around inf
Applied rewrites50.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.0) (fma (- t) a x) (if (<= t 1.75e-67) (+ a x) (if (<= t 1.15e+87) (* (- z) y) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.0) {
tmp = fma(-t, a, x);
} else if (t <= 1.75e-67) {
tmp = a + x;
} else if (t <= 1.15e+87) {
tmp = -z * y;
} else {
tmp = b * t;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.0) tmp = fma(Float64(-t), a, x); elseif (t <= 1.75e-67) tmp = Float64(a + x); elseif (t <= 1.15e+87) tmp = Float64(Float64(-z) * y); else tmp = Float64(b * t); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.0], N[((-t) * a + x), $MachinePrecision], If[LessEqual[t, 1.75e-67], N[(a + x), $MachinePrecision], If[LessEqual[t, 1.15e+87], N[((-z) * y), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1:\\
\;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-67}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+87}:\\
\;\;\;\;\left(-z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -1Initial program 90.4%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6486.5
Applied rewrites86.5%
Taylor expanded in b around 0
Applied rewrites55.3%
Taylor expanded in t around inf
Applied rewrites54.6%
if -1 < t < 1.75e-67Initial program 99.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6476.0
Applied rewrites76.0%
Taylor expanded in b around 0
Applied rewrites37.7%
Taylor expanded in t around 0
Applied rewrites37.7%
if 1.75e-67 < t < 1.1500000000000001e87Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites82.7%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6491.6
Applied rewrites91.6%
Taylor expanded in b around 0
Applied rewrites64.5%
Taylor expanded in y around inf
Applied rewrites36.0%
if 1.1500000000000001e87 < t Initial program 100.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6458.4
Applied rewrites58.4%
Taylor expanded in t around inf
Applied rewrites57.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.1e+16) (* b t) (if (<= t 1.75e-67) (+ a x) (if (<= t 1.15e+87) (* (- z) y) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.1e+16) {
tmp = b * t;
} else if (t <= 1.75e-67) {
tmp = a + x;
} else if (t <= 1.15e+87) {
tmp = -z * y;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.1d+16)) then
tmp = b * t
else if (t <= 1.75d-67) then
tmp = a + x
else if (t <= 1.15d+87) then
tmp = -z * y
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.1e+16) {
tmp = b * t;
} else if (t <= 1.75e-67) {
tmp = a + x;
} else if (t <= 1.15e+87) {
tmp = -z * y;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.1e+16: tmp = b * t elif t <= 1.75e-67: tmp = a + x elif t <= 1.15e+87: tmp = -z * y else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.1e+16) tmp = Float64(b * t); elseif (t <= 1.75e-67) tmp = Float64(a + x); elseif (t <= 1.15e+87) tmp = Float64(Float64(-z) * y); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.1e+16) tmp = b * t; elseif (t <= 1.75e-67) tmp = a + x; elseif (t <= 1.15e+87) tmp = -z * y; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.1e+16], N[(b * t), $MachinePrecision], If[LessEqual[t, 1.75e-67], N[(a + x), $MachinePrecision], If[LessEqual[t, 1.15e+87], N[((-z) * y), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+16}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-67}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+87}:\\
\;\;\;\;\left(-z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -1.1e16 or 1.1500000000000001e87 < t Initial program 93.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6446.0
Applied rewrites46.0%
Taylor expanded in t around inf
Applied rewrites42.0%
if -1.1e16 < t < 1.75e-67Initial program 99.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6476.2
Applied rewrites76.2%
Taylor expanded in b around 0
Applied rewrites38.3%
Taylor expanded in t around 0
Applied rewrites37.5%
if 1.75e-67 < t < 1.1500000000000001e87Initial program 97.4%
Taylor expanded in x around 0
Applied rewrites82.7%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6491.6
Applied rewrites91.6%
Taylor expanded in b around 0
Applied rewrites64.5%
Taylor expanded in y around inf
Applied rewrites36.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.95e-23) (not (<= y 1.65e+46))) (* (- b z) y) (fma (- 1.0 t) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.95e-23) || !(y <= 1.65e+46)) {
tmp = (b - z) * y;
} else {
tmp = fma((1.0 - t), a, x);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.95e-23) || !(y <= 1.65e+46)) tmp = Float64(Float64(b - z) * y); else tmp = fma(Float64(1.0 - t), a, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.95e-23], N[Not[LessEqual[y, 1.65e+46]], $MachinePrecision]], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.95 \cdot 10^{-23} \lor \neg \left(y \leq 1.65 \cdot 10^{+46}\right):\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\end{array}
\end{array}
if y < -2.9499999999999998e-23 or 1.6499999999999999e46 < y Initial program 94.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6466.5
Applied rewrites66.5%
if -2.9499999999999998e-23 < y < 1.6499999999999999e46Initial program 97.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6483.3
Applied rewrites83.3%
Taylor expanded in b around 0
Applied rewrites51.6%
Final simplification58.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -6.6e+31) (fma (- t) a x) (if (<= t 6.2e+87) (fma (- y) z x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.6e+31) {
tmp = fma(-t, a, x);
} else if (t <= 6.2e+87) {
tmp = fma(-y, z, x);
} else {
tmp = b * t;
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.6e+31) tmp = fma(Float64(-t), a, x); elseif (t <= 6.2e+87) tmp = fma(Float64(-y), z, x); else tmp = Float64(b * t); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.6e+31], N[((-t) * a + x), $MachinePrecision], If[LessEqual[t, 6.2e+87], N[((-y) * z + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, x\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(-y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -6.59999999999999985e31Initial program 90.0%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6487.3
Applied rewrites87.3%
Taylor expanded in b around 0
Applied rewrites56.1%
Taylor expanded in t around inf
Applied rewrites56.1%
if -6.59999999999999985e31 < t < 6.1999999999999999e87Initial program 98.6%
Taylor expanded in x around 0
Applied rewrites81.9%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6483.0
Applied rewrites83.0%
Taylor expanded in b around 0
Applied rewrites50.9%
Taylor expanded in y around inf
Applied rewrites37.8%
if 6.1999999999999999e87 < t Initial program 100.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6458.4
Applied rewrites58.4%
Taylor expanded in t around inf
Applied rewrites57.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.3e+71) (not (<= b 85000000000000.0))) (* b t) (+ a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.3e+71) || !(b <= 85000000000000.0)) {
tmp = b * t;
} else {
tmp = a + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.3d+71)) .or. (.not. (b <= 85000000000000.0d0))) then
tmp = b * t
else
tmp = a + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.3e+71) || !(b <= 85000000000000.0)) {
tmp = b * t;
} else {
tmp = a + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.3e+71) or not (b <= 85000000000000.0): tmp = b * t else: tmp = a + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.3e+71) || !(b <= 85000000000000.0)) tmp = Float64(b * t); else tmp = Float64(a + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.3e+71) || ~((b <= 85000000000000.0))) tmp = b * t; else tmp = a + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.3e+71], N[Not[LessEqual[b, 85000000000000.0]], $MachinePrecision]], N[(b * t), $MachinePrecision], N[(a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+71} \lor \neg \left(b \leq 85000000000000\right):\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;a + x\\
\end{array}
\end{array}
if b < -1.29999999999999996e71 or 8.5e13 < b Initial program 93.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6474.4
Applied rewrites74.4%
Taylor expanded in t around inf
Applied rewrites36.5%
if -1.29999999999999996e71 < b < 8.5e13Initial program 99.3%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6467.7
Applied rewrites67.7%
Taylor expanded in b around 0
Applied rewrites56.6%
Taylor expanded in t around 0
Applied rewrites37.1%
Final simplification36.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.4e+83) (* b y) (if (<= b 85000000000000.0) (+ a x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.4e+83) {
tmp = b * y;
} else if (b <= 85000000000000.0) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-3.4d+83)) then
tmp = b * y
else if (b <= 85000000000000.0d0) then
tmp = a + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.4e+83) {
tmp = b * y;
} else if (b <= 85000000000000.0) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.4e+83: tmp = b * y elif b <= 85000000000000.0: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.4e+83) tmp = Float64(b * y); elseif (b <= 85000000000000.0) tmp = Float64(a + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -3.4e+83) tmp = b * y; elseif (b <= 85000000000000.0) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.4e+83], N[(b * y), $MachinePrecision], If[LessEqual[b, 85000000000000.0], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+83}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;b \leq 85000000000000:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if b < -3.3999999999999998e83Initial program 93.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6482.9
Applied rewrites82.9%
Taylor expanded in y around inf
Applied rewrites39.5%
if -3.3999999999999998e83 < b < 8.5e13Initial program 99.3%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6467.5
Applied rewrites67.5%
Taylor expanded in b around 0
Applied rewrites55.8%
Taylor expanded in t around 0
Applied rewrites36.6%
if 8.5e13 < b Initial program 92.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6466.3
Applied rewrites66.3%
Taylor expanded in t around inf
Applied rewrites37.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.56e+65) (not (<= z 6.2e+57))) (+ z x) (+ a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.56e+65) || !(z <= 6.2e+57)) {
tmp = z + x;
} else {
tmp = a + x;
}
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 ((z <= (-1.56d+65)) .or. (.not. (z <= 6.2d+57))) then
tmp = z + x
else
tmp = a + x
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 ((z <= -1.56e+65) || !(z <= 6.2e+57)) {
tmp = z + x;
} else {
tmp = a + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.56e+65) or not (z <= 6.2e+57): tmp = z + x else: tmp = a + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.56e+65) || !(z <= 6.2e+57)) tmp = Float64(z + x); else tmp = Float64(a + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.56e+65) || ~((z <= 6.2e+57))) tmp = z + x; else tmp = a + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.56e+65], N[Not[LessEqual[z, 6.2e+57]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.56 \cdot 10^{+65} \lor \neg \left(z \leq 6.2 \cdot 10^{+57}\right):\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;a + x\\
\end{array}
\end{array}
if z < -1.5599999999999999e65 or 6.20000000000000026e57 < z Initial program 92.7%
Taylor expanded in x around 0
Applied rewrites87.1%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6484.8
Applied rewrites84.8%
Taylor expanded in b around 0
Applied rewrites65.5%
Taylor expanded in y around 0
Applied rewrites28.1%
if -1.5599999999999999e65 < z < 6.20000000000000026e57Initial program 98.7%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6492.1
Applied rewrites92.1%
Taylor expanded in b around 0
Applied rewrites46.7%
Taylor expanded in t around 0
Applied rewrites31.5%
Final simplification30.2%
(FPCore (x y z t a b) :precision binary64 (+ a x))
double code(double x, double y, double z, double t, double a, double b) {
return a + x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a + x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a + x;
}
def code(x, y, z, t, a, b): return a + x
function code(x, y, z, t, a, b) return Float64(a + x) end
function tmp = code(x, y, z, t, a, b) tmp = a + x; end
code[x_, y_, z_, t_, a_, b_] := N[(a + x), $MachinePrecision]
\begin{array}{l}
\\
a + x
\end{array}
Initial program 96.4%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-+.f6476.9
Applied rewrites76.9%
Taylor expanded in b around 0
Applied rewrites39.5%
Taylor expanded in t around 0
Applied rewrites24.5%
herbie shell --seed 2024313
(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)))