
(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 23 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
(+ (* b (- (+ t y) 2.0)) (- (- x (* z (- y 1.0))) (* a (- t 1.0))))))
(if (<= t_1 INFINITY) t_1 (fma (- 1.0 y) z (fma (- 1.0 t) a x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(t + y) - 2.0)) + Float64(Float64(x - Float64(z * Float64(y - 1.0))) - Float64(a * Float64(t - 1.0)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right) + \left(\left(x - z \cdot \left(y - 1\right)\right) - a \cdot \left(t - 1\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, 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 b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites83.3%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)) (t_2 (* (- t 2.0) b)))
(if (<= y -2e+174)
t_1
(if (<= y -5.3e-134)
(* (- 1.0 t) a)
(if (<= y -5.5e-198)
(+ z x)
(if (<= y 4.3e-165)
t_2
(if (<= y 1.3e-33) (+ z x) (if (<= y 9.6e+27) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double t_2 = (t - 2.0) * b;
double tmp;
if (y <= -2e+174) {
tmp = t_1;
} else if (y <= -5.3e-134) {
tmp = (1.0 - t) * a;
} else if (y <= -5.5e-198) {
tmp = z + x;
} else if (y <= 4.3e-165) {
tmp = t_2;
} else if (y <= 1.3e-33) {
tmp = z + x;
} else if (y <= 9.6e+27) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (b - z) * y
t_2 = (t - 2.0d0) * b
if (y <= (-2d+174)) then
tmp = t_1
else if (y <= (-5.3d-134)) then
tmp = (1.0d0 - t) * a
else if (y <= (-5.5d-198)) then
tmp = z + x
else if (y <= 4.3d-165) then
tmp = t_2
else if (y <= 1.3d-33) then
tmp = z + x
else if (y <= 9.6d+27) then
tmp = t_2
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 - z) * y;
double t_2 = (t - 2.0) * b;
double tmp;
if (y <= -2e+174) {
tmp = t_1;
} else if (y <= -5.3e-134) {
tmp = (1.0 - t) * a;
} else if (y <= -5.5e-198) {
tmp = z + x;
} else if (y <= 4.3e-165) {
tmp = t_2;
} else if (y <= 1.3e-33) {
tmp = z + x;
} else if (y <= 9.6e+27) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - z) * y t_2 = (t - 2.0) * b tmp = 0 if y <= -2e+174: tmp = t_1 elif y <= -5.3e-134: tmp = (1.0 - t) * a elif y <= -5.5e-198: tmp = z + x elif y <= 4.3e-165: tmp = t_2 elif y <= 1.3e-33: tmp = z + x elif y <= 9.6e+27: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) t_2 = Float64(Float64(t - 2.0) * b) tmp = 0.0 if (y <= -2e+174) tmp = t_1; elseif (y <= -5.3e-134) tmp = Float64(Float64(1.0 - t) * a); elseif (y <= -5.5e-198) tmp = Float64(z + x); elseif (y <= 4.3e-165) tmp = t_2; elseif (y <= 1.3e-33) tmp = Float64(z + x); elseif (y <= 9.6e+27) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - z) * y; t_2 = (t - 2.0) * b; tmp = 0.0; if (y <= -2e+174) tmp = t_1; elseif (y <= -5.3e-134) tmp = (1.0 - t) * a; elseif (y <= -5.5e-198) tmp = z + x; elseif (y <= 4.3e-165) tmp = t_2; elseif (y <= 1.3e-33) tmp = z + x; elseif (y <= 9.6e+27) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[y, -2e+174], t$95$1, If[LessEqual[y, -5.3e-134], N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y, -5.5e-198], N[(z + x), $MachinePrecision], If[LessEqual[y, 4.3e-165], t$95$2, If[LessEqual[y, 1.3e-33], N[(z + x), $MachinePrecision], If[LessEqual[y, 9.6e+27], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
t_2 := \left(t - 2\right) \cdot b\\
\mathbf{if}\;y \leq -2 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.3 \cdot 10^{-134}:\\
\;\;\;\;\left(1 - t\right) \cdot a\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-198}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-165}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-33}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.00000000000000014e174 or 9.59999999999999991e27 < y Initial program 91.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6476.0
Applied rewrites76.0%
if -2.00000000000000014e174 < y < -5.30000000000000003e-134Initial program 93.7%
Taylor expanded in a around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.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--.f6447.1
Applied rewrites47.1%
if -5.30000000000000003e-134 < y < -5.5000000000000001e-198 or 4.30000000000000007e-165 < y < 1.29999999999999997e-33Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites82.5%
Taylor expanded in y around 0
Applied rewrites82.5%
Taylor expanded in a around 0
Applied rewrites59.6%
if -5.5000000000000001e-198 < y < 4.30000000000000007e-165 or 1.29999999999999997e-33 < y < 9.59999999999999991e27Initial program 100.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6459.3
Applied rewrites59.3%
Taylor expanded in y around 0
Applied rewrites55.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 2.0) b)))
(if (<= y -2.4e+209)
(* (- y) z)
(if (<= y -2e+174)
(* b y)
(if (<= y -1.02e-48)
(+ a x)
(if (<= y 4.3e-165)
t_1
(if (<= y 1.3e-33) (+ z x) (if (<= y 9.6e+27) t_1 (* b y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 2.0) * b;
double tmp;
if (y <= -2.4e+209) {
tmp = -y * z;
} else if (y <= -2e+174) {
tmp = b * y;
} else if (y <= -1.02e-48) {
tmp = a + x;
} else if (y <= 4.3e-165) {
tmp = t_1;
} else if (y <= 1.3e-33) {
tmp = z + x;
} else if (y <= 9.6e+27) {
tmp = t_1;
} else {
tmp = b * y;
}
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 - 2.0d0) * b
if (y <= (-2.4d+209)) then
tmp = -y * z
else if (y <= (-2d+174)) then
tmp = b * y
else if (y <= (-1.02d-48)) then
tmp = a + x
else if (y <= 4.3d-165) then
tmp = t_1
else if (y <= 1.3d-33) then
tmp = z + x
else if (y <= 9.6d+27) then
tmp = t_1
else
tmp = b * y
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 - 2.0) * b;
double tmp;
if (y <= -2.4e+209) {
tmp = -y * z;
} else if (y <= -2e+174) {
tmp = b * y;
} else if (y <= -1.02e-48) {
tmp = a + x;
} else if (y <= 4.3e-165) {
tmp = t_1;
} else if (y <= 1.3e-33) {
tmp = z + x;
} else if (y <= 9.6e+27) {
tmp = t_1;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 2.0) * b tmp = 0 if y <= -2.4e+209: tmp = -y * z elif y <= -2e+174: tmp = b * y elif y <= -1.02e-48: tmp = a + x elif y <= 4.3e-165: tmp = t_1 elif y <= 1.3e-33: tmp = z + x elif y <= 9.6e+27: tmp = t_1 else: tmp = b * y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - 2.0) * b) tmp = 0.0 if (y <= -2.4e+209) tmp = Float64(Float64(-y) * z); elseif (y <= -2e+174) tmp = Float64(b * y); elseif (y <= -1.02e-48) tmp = Float64(a + x); elseif (y <= 4.3e-165) tmp = t_1; elseif (y <= 1.3e-33) tmp = Float64(z + x); elseif (y <= 9.6e+27) tmp = t_1; else tmp = Float64(b * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 2.0) * b; tmp = 0.0; if (y <= -2.4e+209) tmp = -y * z; elseif (y <= -2e+174) tmp = b * y; elseif (y <= -1.02e-48) tmp = a + x; elseif (y <= 4.3e-165) tmp = t_1; elseif (y <= 1.3e-33) tmp = z + x; elseif (y <= 9.6e+27) tmp = t_1; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[y, -2.4e+209], N[((-y) * z), $MachinePrecision], If[LessEqual[y, -2e+174], N[(b * y), $MachinePrecision], If[LessEqual[y, -1.02e-48], N[(a + x), $MachinePrecision], If[LessEqual[y, 4.3e-165], t$95$1, If[LessEqual[y, 1.3e-33], N[(z + x), $MachinePrecision], If[LessEqual[y, 9.6e+27], t$95$1, N[(b * y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 2\right) \cdot b\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+209}:\\
\;\;\;\;\left(-y\right) \cdot z\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+174}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-48}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-33}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if y < -2.39999999999999996e209Initial program 88.2%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6460.4
Applied rewrites60.4%
Taylor expanded in y around inf
Applied rewrites60.4%
if -2.39999999999999996e209 < y < -2.00000000000000014e174 or 9.59999999999999991e27 < y Initial program 92.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6452.0
Applied rewrites52.0%
Taylor expanded in y around inf
Applied rewrites47.6%
if -2.00000000000000014e174 < y < -1.02000000000000005e-48Initial program 93.3%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites57.9%
Taylor expanded in z around 0
Applied rewrites41.0%
Taylor expanded in b around 0
Applied rewrites33.3%
if -1.02000000000000005e-48 < y < 4.30000000000000007e-165 or 1.29999999999999997e-33 < y < 9.59999999999999991e27Initial program 98.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6450.6
Applied rewrites50.6%
Taylor expanded in y around 0
Applied rewrites48.3%
if 4.30000000000000007e-165 < y < 1.29999999999999997e-33Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites86.6%
Taylor expanded in y around 0
Applied rewrites86.6%
Taylor expanded in a around 0
Applied rewrites58.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z (fma (- 1.0 t) a x))))
(if (<= t -1.8e+30)
t_1
(if (<= t 2.95e+35)
(fma (- 1.0 y) z (+ (fma (- y 2.0) b x) a))
(if (<= t 5.1e+182) t_1 (* (- b a) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - y), z, fma((1.0 - t), a, x));
double tmp;
if (t <= -1.8e+30) {
tmp = t_1;
} else if (t <= 2.95e+35) {
tmp = fma((1.0 - y), z, (fma((y - 2.0), b, x) + a));
} else if (t <= 5.1e+182) {
tmp = t_1;
} else {
tmp = (b - a) * t;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)) tmp = 0.0 if (t <= -1.8e+30) tmp = t_1; elseif (t <= 2.95e+35) tmp = fma(Float64(1.0 - y), z, Float64(fma(Float64(y - 2.0), b, x) + a)); elseif (t <= 5.1e+182) tmp = t_1; else tmp = Float64(Float64(b - a) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.8e+30], t$95$1, If[LessEqual[t, 2.95e+35], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.1e+182], t$95$1, N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(y - 2, b, x\right) + a\right)\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\end{array}
\end{array}
if t < -1.8000000000000001e30 or 2.94999999999999993e35 < t < 5.10000000000000009e182Initial program 88.8%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites73.7%
if -1.8000000000000001e30 < t < 2.94999999999999993e35Initial 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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites97.3%
if 5.10000000000000009e182 < t Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6490.5
Applied rewrites90.5%
Final simplification88.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -1.15e+32)
t_1
(if (<= b -1.08e-16)
(fma (- 1.0 t) a z)
(if (<= b -9e-184)
(fma (- 1.0 y) z x)
(if (<= b 4.25e+133) (fma (- 1.0 t) a x) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -1.15e+32) {
tmp = t_1;
} else if (b <= -1.08e-16) {
tmp = fma((1.0 - t), a, z);
} else if (b <= -9e-184) {
tmp = fma((1.0 - y), z, x);
} else if (b <= 4.25e+133) {
tmp = fma((1.0 - t), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -1.15e+32) tmp = t_1; elseif (b <= -1.08e-16) tmp = fma(Float64(1.0 - t), a, z); elseif (b <= -9e-184) tmp = fma(Float64(1.0 - y), z, x); elseif (b <= 4.25e+133) tmp = fma(Float64(1.0 - t), a, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.15e+32], t$95$1, If[LessEqual[b, -1.08e-16], N[(N[(1.0 - t), $MachinePrecision] * a + z), $MachinePrecision], If[LessEqual[b, -9e-184], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[b, 4.25e+133], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -1.15 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.08 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z\right)\\
\mathbf{elif}\;b \leq -9 \cdot 10^{-184}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{elif}\;b \leq 4.25 \cdot 10^{+133}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.15e32 or 4.25000000000000022e133 < b Initial program 93.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6482.0
Applied rewrites82.0%
if -1.15e32 < b < -1.08e-16Initial program 90.9%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites90.9%
Taylor expanded in y around 0
Applied rewrites76.2%
Taylor expanded in x around 0
Applied rewrites76.1%
if -1.08e-16 < b < -9.0000000000000003e-184Initial program 100.0%
Taylor expanded in a around 0
Applied rewrites75.5%
Taylor expanded in b around 0
Applied rewrites63.6%
if -9.0000000000000003e-184 < b < 4.25000000000000022e133Initial program 96.2%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites83.5%
Taylor expanded in z around 0
Applied rewrites60.2%
Final simplification70.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z x)) (t_2 (* (- b a) t)))
(if (<= t -8.6e+61)
t_2
(if (<= t -2.4e-53)
t_1
(if (<= t 5.5e-20) (fma (- y 2.0) b a) (if (<= t 2.6e+176) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - y), z, x);
double t_2 = (b - a) * t;
double tmp;
if (t <= -8.6e+61) {
tmp = t_2;
} else if (t <= -2.4e-53) {
tmp = t_1;
} else if (t <= 5.5e-20) {
tmp = fma((y - 2.0), b, a);
} else if (t <= 2.6e+176) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - y), z, x) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -8.6e+61) tmp = t_2; elseif (t <= -2.4e-53) tmp = t_1; elseif (t <= 5.5e-20) tmp = fma(Float64(y - 2.0), b, a); elseif (t <= 2.6e+176) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -8.6e+61], t$95$2, If[LessEqual[t, -2.4e-53], t$95$1, If[LessEqual[t, 5.5e-20], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 2.6e+176], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, x\right)\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-20}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+176}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.6000000000000003e61 or 2.59999999999999991e176 < t Initial program 90.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6475.7
Applied rewrites75.7%
if -8.6000000000000003e61 < t < -2.40000000000000007e-53 or 5.4999999999999996e-20 < t < 2.59999999999999991e176Initial program 94.7%
Taylor expanded in a around 0
Applied rewrites84.7%
Taylor expanded in b around 0
Applied rewrites59.6%
if -2.40000000000000007e-53 < t < 5.4999999999999996e-20Initial program 98.4%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites99.2%
Taylor expanded in z around 0
Applied rewrites79.4%
Taylor expanded in x around 0
Applied rewrites66.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.12e+74)
t_1
(if (<= t -3.15e-53)
(fma (- 1.0 t) a x)
(if (<= t 6.2e-52)
(fma (- y 2.0) b a)
(if (<= t 4.9e+73) (fma (- y 2.0) b 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 <= -1.12e+74) {
tmp = t_1;
} else if (t <= -3.15e-53) {
tmp = fma((1.0 - t), a, x);
} else if (t <= 6.2e-52) {
tmp = fma((y - 2.0), b, a);
} else if (t <= 4.9e+73) {
tmp = fma((y - 2.0), b, 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 <= -1.12e+74) tmp = t_1; elseif (t <= -3.15e-53) tmp = fma(Float64(1.0 - t), a, x); elseif (t <= 6.2e-52) tmp = fma(Float64(y - 2.0), b, a); elseif (t <= 4.9e+73) tmp = fma(Float64(y - 2.0), b, 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, -1.12e+74], t$95$1, If[LessEqual[t, -3.15e-53], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[t, 6.2e-52], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 4.9e+73], N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.12 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.15 \cdot 10^{-53}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-52}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+73}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.12000000000000003e74 or 4.8999999999999999e73 < t Initial program 90.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.9
Applied rewrites68.9%
if -1.12000000000000003e74 < t < -3.14999999999999989e-53Initial program 94.7%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites86.1%
Taylor expanded in z around 0
Applied rewrites58.9%
if -3.14999999999999989e-53 < t < 6.1999999999999998e-52Initial program 98.2%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites99.1%
Taylor expanded in z around 0
Applied rewrites77.7%
Taylor expanded in x around 0
Applied rewrites65.7%
if 6.1999999999999998e-52 < t < 4.8999999999999999e73Initial program 100.0%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites85.3%
Taylor expanded in z around 0
Applied rewrites67.3%
Taylor expanded in a around 0
Applied rewrites67.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- y 2.0) b x)) (t_2 (* (- b a) t)))
(if (<= t -1.15e+30)
t_2
(if (<= t -3.4e-117)
t_1
(if (<= t 6.2e-52) (fma (- y 2.0) b a) (if (<= t 4.9e+73) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((y - 2.0), b, x);
double t_2 = (b - a) * t;
double tmp;
if (t <= -1.15e+30) {
tmp = t_2;
} else if (t <= -3.4e-117) {
tmp = t_1;
} else if (t <= 6.2e-52) {
tmp = fma((y - 2.0), b, a);
} else if (t <= 4.9e+73) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(y - 2.0), b, x) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -1.15e+30) tmp = t_2; elseif (t <= -3.4e-117) tmp = t_1; elseif (t <= 6.2e-52) tmp = fma(Float64(y - 2.0), b, a); elseif (t <= 4.9e+73) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.15e+30], t$95$2, If[LessEqual[t, -3.4e-117], t$95$1, If[LessEqual[t, 6.2e-52], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 4.9e+73], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - 2, b, x\right)\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-52}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.15e30 or 4.8999999999999999e73 < t Initial program 90.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.2
Applied rewrites67.2%
if -1.15e30 < t < -3.40000000000000035e-117 or 6.1999999999999998e-52 < t < 4.8999999999999999e73Initial program 98.0%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites92.0%
Taylor expanded in z around 0
Applied rewrites66.6%
Taylor expanded in a around 0
Applied rewrites64.7%
if -3.40000000000000035e-117 < t < 6.1999999999999998e-52Initial program 99.0%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites99.0%
Taylor expanded in z around 0
Applied rewrites78.6%
Taylor expanded in x around 0
Applied rewrites66.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- b z) y (fma (- t 2.0) b (+ z x)))))
(if (<= b -5.8e+31)
t_1
(if (<= b 3.4e-135) (fma (- 1.0 y) z (fma (- 1.0 t) a x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b - z), y, fma((t - 2.0), b, (z + x)));
double tmp;
if (b <= -5.8e+31) {
tmp = t_1;
} else if (b <= 3.4e-135) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b - z), y, fma(Float64(t - 2.0), b, Float64(z + x))) tmp = 0.0 if (b <= -5.8e+31) tmp = t_1; elseif (b <= 3.4e-135) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y + N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.8e+31], t$95$1, If[LessEqual[b, 3.4e-135], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b - z, y, \mathsf{fma}\left(t - 2, b, z + x\right)\right)\\
\mathbf{if}\;b \leq -5.8 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{-135}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.8000000000000001e31 or 3.39999999999999989e-135 < b Initial program 93.1%
Taylor expanded in a around 0
Applied rewrites89.9%
if -5.8000000000000001e31 < b < 3.39999999999999989e-135Initial program 98.2%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites93.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)) (t_2 (* (- b a) t)))
(if (<= t -1.22e+61)
t_2
(if (<= t -6.5e-62)
t_1
(if (<= t 1.18e-26) (fma (- y 2.0) b a) (if (<= t 2e+97) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double t_2 = (b - a) * t;
double tmp;
if (t <= -1.22e+61) {
tmp = t_2;
} else if (t <= -6.5e-62) {
tmp = t_1;
} else if (t <= 1.18e-26) {
tmp = fma((y - 2.0), b, a);
} else if (t <= 2e+97) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) t_2 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -1.22e+61) tmp = t_2; elseif (t <= -6.5e-62) tmp = t_1; elseif (t <= 1.18e-26) tmp = fma(Float64(y - 2.0), b, a); elseif (t <= 2e+97) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.22e+61], t$95$2, If[LessEqual[t, -6.5e-62], t$95$1, If[LessEqual[t, 1.18e-26], N[(N[(y - 2.0), $MachinePrecision] * b + a), $MachinePrecision], If[LessEqual[t, 2e+97], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
t_2 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.22 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.18 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a\right)\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.22e61 or 2.0000000000000001e97 < t Initial program 90.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.4
Applied rewrites70.4%
if -1.22e61 < t < -6.50000000000000026e-62 or 1.17999999999999996e-26 < t < 2.0000000000000001e97Initial program 95.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6455.1
Applied rewrites55.1%
if -6.50000000000000026e-62 < t < 1.17999999999999996e-26Initial program 99.1%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites99.1%
Taylor expanded in z around 0
Applied rewrites79.0%
Taylor expanded in x around 0
Applied rewrites66.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2e+174)
(* (- b z) y)
(if (<= y -2.8e-129)
(fma (- 1.0 t) a (+ z x))
(if (<= y 31000.0) (fma (- t 2.0) b (+ z x)) (fma (- b z) y (* b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2e+174) {
tmp = (b - z) * y;
} else if (y <= -2.8e-129) {
tmp = fma((1.0 - t), a, (z + x));
} else if (y <= 31000.0) {
tmp = fma((t - 2.0), b, (z + x));
} else {
tmp = fma((b - z), y, (b * t));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2e+174) tmp = Float64(Float64(b - z) * y); elseif (y <= -2.8e-129) tmp = fma(Float64(1.0 - t), a, Float64(z + x)); elseif (y <= 31000.0) tmp = fma(Float64(t - 2.0), b, Float64(z + x)); else tmp = fma(Float64(b - z), y, Float64(b * t)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2e+174], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, -2.8e-129], N[(N[(1.0 - t), $MachinePrecision] * a + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 31000.0], N[(N[(t - 2.0), $MachinePrecision] * b + N[(z + x), $MachinePrecision]), $MachinePrecision], N[(N[(b - z), $MachinePrecision] * y + N[(b * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+174}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-129}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z + x\right)\\
\mathbf{elif}\;y \leq 31000:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, z + x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b - z, y, b \cdot t\right)\\
\end{array}
\end{array}
if y < -2.00000000000000014e174Initial program 92.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6481.2
Applied rewrites81.2%
if -2.00000000000000014e174 < y < -2.7999999999999999e-129Initial program 93.5%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites74.1%
Taylor expanded in y around 0
Applied rewrites64.5%
if -2.7999999999999999e-129 < y < 31000Initial program 100.0%
Taylor expanded in a around 0
Applied rewrites80.5%
Taylor expanded in y around 0
Applied rewrites78.5%
if 31000 < y Initial program 91.9%
Taylor expanded in a around 0
Applied rewrites85.4%
Taylor expanded in t around inf
Applied rewrites75.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -8e+115)
t_1
(if (<= b 2.05e+134) (fma (- 1.0 y) z (fma (- 1.0 t) a x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -8e+115) {
tmp = t_1;
} else if (b <= 2.05e+134) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -8e+115) tmp = t_1; elseif (b <= 2.05e+134) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8e+115], t$95$1, If[LessEqual[b, 2.05e+134], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -8 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{+134}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.0000000000000001e115 or 2.0500000000000002e134 < b Initial program 94.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6489.3
Applied rewrites89.3%
if -8.0000000000000001e115 < b < 2.0500000000000002e134Initial program 95.9%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites82.3%
Final simplification84.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.4e+209)
(* (- y) z)
(if (<= y -2e+174)
(* b y)
(if (<= y -6e-128) (* (- a) t) (if (<= y 34000000.0) (+ z x) (* b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.4e+209) {
tmp = -y * z;
} else if (y <= -2e+174) {
tmp = b * y;
} else if (y <= -6e-128) {
tmp = -a * t;
} else if (y <= 34000000.0) {
tmp = z + x;
} else {
tmp = b * y;
}
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 (y <= (-2.4d+209)) then
tmp = -y * z
else if (y <= (-2d+174)) then
tmp = b * y
else if (y <= (-6d-128)) then
tmp = -a * t
else if (y <= 34000000.0d0) then
tmp = z + x
else
tmp = b * y
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 (y <= -2.4e+209) {
tmp = -y * z;
} else if (y <= -2e+174) {
tmp = b * y;
} else if (y <= -6e-128) {
tmp = -a * t;
} else if (y <= 34000000.0) {
tmp = z + x;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.4e+209: tmp = -y * z elif y <= -2e+174: tmp = b * y elif y <= -6e-128: tmp = -a * t elif y <= 34000000.0: tmp = z + x else: tmp = b * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.4e+209) tmp = Float64(Float64(-y) * z); elseif (y <= -2e+174) tmp = Float64(b * y); elseif (y <= -6e-128) tmp = Float64(Float64(-a) * t); elseif (y <= 34000000.0) tmp = Float64(z + x); else tmp = Float64(b * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.4e+209) tmp = -y * z; elseif (y <= -2e+174) tmp = b * y; elseif (y <= -6e-128) tmp = -a * t; elseif (y <= 34000000.0) tmp = z + x; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.4e+209], N[((-y) * z), $MachinePrecision], If[LessEqual[y, -2e+174], N[(b * y), $MachinePrecision], If[LessEqual[y, -6e-128], N[((-a) * t), $MachinePrecision], If[LessEqual[y, 34000000.0], N[(z + x), $MachinePrecision], N[(b * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+209}:\\
\;\;\;\;\left(-y\right) \cdot z\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+174}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-128}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\mathbf{elif}\;y \leq 34000000:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if y < -2.39999999999999996e209Initial program 88.2%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6460.4
Applied rewrites60.4%
Taylor expanded in y around inf
Applied rewrites60.4%
if -2.39999999999999996e209 < y < -2.00000000000000014e174 or 3.4e7 < y Initial program 92.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6452.5
Applied rewrites52.5%
Taylor expanded in y around inf
Applied rewrites46.6%
if -2.00000000000000014e174 < y < -5.99999999999999956e-128Initial program 93.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6446.6
Applied rewrites46.6%
Taylor expanded in b around 0
Applied rewrites33.6%
if -5.99999999999999956e-128 < y < 3.4e7Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites58.2%
Taylor expanded in y around 0
Applied rewrites57.5%
Taylor expanded in a around 0
Applied rewrites37.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.4e+209)
(* (- y) z)
(if (<= y -2e+174)
(* b y)
(if (<= y -4.5e-62) (+ a x) (if (<= y 34000000.0) (+ z x) (* b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.4e+209) {
tmp = -y * z;
} else if (y <= -2e+174) {
tmp = b * y;
} else if (y <= -4.5e-62) {
tmp = a + x;
} else if (y <= 34000000.0) {
tmp = z + x;
} else {
tmp = b * y;
}
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 (y <= (-2.4d+209)) then
tmp = -y * z
else if (y <= (-2d+174)) then
tmp = b * y
else if (y <= (-4.5d-62)) then
tmp = a + x
else if (y <= 34000000.0d0) then
tmp = z + x
else
tmp = b * y
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 (y <= -2.4e+209) {
tmp = -y * z;
} else if (y <= -2e+174) {
tmp = b * y;
} else if (y <= -4.5e-62) {
tmp = a + x;
} else if (y <= 34000000.0) {
tmp = z + x;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.4e+209: tmp = -y * z elif y <= -2e+174: tmp = b * y elif y <= -4.5e-62: tmp = a + x elif y <= 34000000.0: tmp = z + x else: tmp = b * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.4e+209) tmp = Float64(Float64(-y) * z); elseif (y <= -2e+174) tmp = Float64(b * y); elseif (y <= -4.5e-62) tmp = Float64(a + x); elseif (y <= 34000000.0) tmp = Float64(z + x); else tmp = Float64(b * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.4e+209) tmp = -y * z; elseif (y <= -2e+174) tmp = b * y; elseif (y <= -4.5e-62) tmp = a + x; elseif (y <= 34000000.0) tmp = z + x; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.4e+209], N[((-y) * z), $MachinePrecision], If[LessEqual[y, -2e+174], N[(b * y), $MachinePrecision], If[LessEqual[y, -4.5e-62], N[(a + x), $MachinePrecision], If[LessEqual[y, 34000000.0], N[(z + x), $MachinePrecision], N[(b * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+209}:\\
\;\;\;\;\left(-y\right) \cdot z\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+174}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-62}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;y \leq 34000000:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if y < -2.39999999999999996e209Initial program 88.2%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6460.4
Applied rewrites60.4%
Taylor expanded in y around inf
Applied rewrites60.4%
if -2.39999999999999996e209 < y < -2.00000000000000014e174 or 3.4e7 < y Initial program 92.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6452.5
Applied rewrites52.5%
Taylor expanded in y around inf
Applied rewrites46.6%
if -2.00000000000000014e174 < y < -4.50000000000000018e-62Initial program 93.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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites57.6%
Taylor expanded in z around 0
Applied rewrites41.5%
Taylor expanded in b around 0
Applied rewrites32.0%
if -4.50000000000000018e-62 < y < 3.4e7Initial program 99.1%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites60.0%
Taylor expanded in y around 0
Applied rewrites59.3%
Taylor expanded in a around 0
Applied rewrites35.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 t) a)))
(if (<= a -9.5e+129)
t_1
(if (<= a 1.4e-202)
(* (- y 2.0) b)
(if (<= a 1.4e+94) (* (- 1.0 y) z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (a <= -9.5e+129) {
tmp = t_1;
} else if (a <= 1.4e-202) {
tmp = (y - 2.0) * b;
} else if (a <= 1.4e+94) {
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 = (1.0d0 - t) * a
if (a <= (-9.5d+129)) then
tmp = t_1
else if (a <= 1.4d-202) then
tmp = (y - 2.0d0) * b
else if (a <= 1.4d+94) 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 = (1.0 - t) * a;
double tmp;
if (a <= -9.5e+129) {
tmp = t_1;
} else if (a <= 1.4e-202) {
tmp = (y - 2.0) * b;
} else if (a <= 1.4e+94) {
tmp = (1.0 - y) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - t) * a tmp = 0 if a <= -9.5e+129: tmp = t_1 elif a <= 1.4e-202: tmp = (y - 2.0) * b elif a <= 1.4e+94: tmp = (1.0 - y) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - t) * a) tmp = 0.0 if (a <= -9.5e+129) tmp = t_1; elseif (a <= 1.4e-202) tmp = Float64(Float64(y - 2.0) * b); elseif (a <= 1.4e+94) 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 = (1.0 - t) * a; tmp = 0.0; if (a <= -9.5e+129) tmp = t_1; elseif (a <= 1.4e-202) tmp = (y - 2.0) * b; elseif (a <= 1.4e+94) 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[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -9.5e+129], t$95$1, If[LessEqual[a, 1.4e-202], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 1.4e+94], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-202}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+94}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.5000000000000004e129 or 1.39999999999999999e94 < a Initial program 87.7%
Taylor expanded in a around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.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--.f6480.0
Applied rewrites80.0%
if -9.5000000000000004e129 < a < 1.4000000000000001e-202Initial program 99.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6455.5
Applied rewrites55.5%
Taylor expanded in t around 0
Applied rewrites43.1%
if 1.4000000000000001e-202 < a < 1.39999999999999999e94Initial program 95.5%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6441.8
Applied rewrites41.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 t) a)))
(if (<= a -9.5e+129)
t_1
(if (<= a 3.7e-179)
(* (- y 2.0) b)
(if (<= a 720000.0) (* (- t 2.0) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (a <= -9.5e+129) {
tmp = t_1;
} else if (a <= 3.7e-179) {
tmp = (y - 2.0) * b;
} else if (a <= 720000.0) {
tmp = (t - 2.0) * b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - t) * a
if (a <= (-9.5d+129)) then
tmp = t_1
else if (a <= 3.7d-179) then
tmp = (y - 2.0d0) * b
else if (a <= 720000.0d0) then
tmp = (t - 2.0d0) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - t) * a;
double tmp;
if (a <= -9.5e+129) {
tmp = t_1;
} else if (a <= 3.7e-179) {
tmp = (y - 2.0) * b;
} else if (a <= 720000.0) {
tmp = (t - 2.0) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - t) * a tmp = 0 if a <= -9.5e+129: tmp = t_1 elif a <= 3.7e-179: tmp = (y - 2.0) * b elif a <= 720000.0: tmp = (t - 2.0) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - t) * a) tmp = 0.0 if (a <= -9.5e+129) tmp = t_1; elseif (a <= 3.7e-179) tmp = Float64(Float64(y - 2.0) * b); elseif (a <= 720000.0) tmp = Float64(Float64(t - 2.0) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - t) * a; tmp = 0.0; if (a <= -9.5e+129) tmp = t_1; elseif (a <= 3.7e-179) tmp = (y - 2.0) * b; elseif (a <= 720000.0) tmp = (t - 2.0) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -9.5e+129], t$95$1, If[LessEqual[a, 3.7e-179], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 720000.0], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{-179}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{elif}\;a \leq 720000:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.5000000000000004e129 or 7.2e5 < a Initial program 90.2%
Taylor expanded in a around inf
*-commutativeN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.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--.f6468.8
Applied rewrites68.8%
if -9.5000000000000004e129 < a < 3.6999999999999999e-179Initial program 98.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6454.1
Applied rewrites54.1%
Taylor expanded in t around 0
Applied rewrites42.4%
if 3.6999999999999999e-179 < a < 7.2e5Initial program 95.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6447.9
Applied rewrites47.9%
Taylor expanded in y around 0
Applied rewrites39.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.02e+183) (* (- a) t) (if (<= t -2.45e-43) (+ z x) (if (<= t 2.5e+40) (* (- y 2.0) b) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.02e+183) {
tmp = -a * t;
} else if (t <= -2.45e-43) {
tmp = z + x;
} else if (t <= 2.5e+40) {
tmp = (y - 2.0) * b;
} 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.02d+183)) then
tmp = -a * t
else if (t <= (-2.45d-43)) then
tmp = z + x
else if (t <= 2.5d+40) then
tmp = (y - 2.0d0) * b
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.02e+183) {
tmp = -a * t;
} else if (t <= -2.45e-43) {
tmp = z + x;
} else if (t <= 2.5e+40) {
tmp = (y - 2.0) * b;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.02e+183: tmp = -a * t elif t <= -2.45e-43: tmp = z + x elif t <= 2.5e+40: tmp = (y - 2.0) * b else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.02e+183) tmp = Float64(Float64(-a) * t); elseif (t <= -2.45e-43) tmp = Float64(z + x); elseif (t <= 2.5e+40) tmp = Float64(Float64(y - 2.0) * b); 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.02e+183) tmp = -a * t; elseif (t <= -2.45e-43) tmp = z + x; elseif (t <= 2.5e+40) tmp = (y - 2.0) * b; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.02e+183], N[((-a) * t), $MachinePrecision], If[LessEqual[t, -2.45e-43], N[(z + x), $MachinePrecision], If[LessEqual[t, 2.5e+40], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+183}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\mathbf{elif}\;t \leq -2.45 \cdot 10^{-43}:\\
\;\;\;\;z + x\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+40}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -1.02000000000000002e183Initial program 79.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6492.1
Applied rewrites92.1%
Taylor expanded in b around 0
Applied rewrites80.0%
if -1.02000000000000002e183 < t < -2.44999999999999994e-43Initial program 93.2%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites67.6%
Taylor expanded in y around 0
Applied rewrites54.2%
Taylor expanded in a around 0
Applied rewrites35.4%
if -2.44999999999999994e-43 < t < 2.50000000000000002e40Initial program 98.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6447.2
Applied rewrites47.2%
Taylor expanded in t around 0
Applied rewrites46.5%
if 2.50000000000000002e40 < t Initial program 96.0%
Taylor expanded in a around 0
Applied rewrites69.4%
Taylor expanded in t around inf
Applied rewrites39.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -3.5e+33)
t_1
(if (<= b 4.25e+133) (fma (- 1.0 t) a (+ z x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -3.5e+33) {
tmp = t_1;
} else if (b <= 4.25e+133) {
tmp = fma((1.0 - t), a, (z + x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -3.5e+33) tmp = t_1; elseif (b <= 4.25e+133) tmp = fma(Float64(1.0 - t), a, Float64(z + x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e+33], t$95$1, If[LessEqual[b, 4.25e+133], N[(N[(1.0 - t), $MachinePrecision] * a + N[(z + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.25 \cdot 10^{+133}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.5000000000000001e33 or 4.25000000000000022e133 < b Initial program 93.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6482.0
Applied rewrites82.0%
if -3.5000000000000001e33 < b < 4.25000000000000022e133Initial program 96.8%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites85.2%
Taylor expanded in y around 0
Applied rewrites66.9%
Final simplification72.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.15e+30)
t_1
(if (<= t 4.9e+73) (fma (- y 2.0) b (+ a 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 <= -1.15e+30) {
tmp = t_1;
} else if (t <= 4.9e+73) {
tmp = fma((y - 2.0), b, (a + 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 <= -1.15e+30) tmp = t_1; elseif (t <= 4.9e+73) tmp = fma(Float64(y - 2.0), b, Float64(a + 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, -1.15e+30], t$95$1, If[LessEqual[t, 4.9e+73], N[(N[(y - 2.0), $MachinePrecision] * b + N[(a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+73}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.15e30 or 4.8999999999999999e73 < t Initial program 90.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6467.2
Applied rewrites67.2%
if -1.15e30 < t < 4.8999999999999999e73Initial program 98.7%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites96.7%
Taylor expanded in z around 0
Applied rewrites74.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2e+174) (* b y) (if (<= y -5.6e-64) (+ a x) (if (<= y 34000000.0) (+ z x) (* b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2e+174) {
tmp = b * y;
} else if (y <= -5.6e-64) {
tmp = a + x;
} else if (y <= 34000000.0) {
tmp = z + x;
} else {
tmp = b * y;
}
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 (y <= (-2d+174)) then
tmp = b * y
else if (y <= (-5.6d-64)) then
tmp = a + x
else if (y <= 34000000.0d0) then
tmp = z + x
else
tmp = b * y
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 (y <= -2e+174) {
tmp = b * y;
} else if (y <= -5.6e-64) {
tmp = a + x;
} else if (y <= 34000000.0) {
tmp = z + x;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2e+174: tmp = b * y elif y <= -5.6e-64: tmp = a + x elif y <= 34000000.0: tmp = z + x else: tmp = b * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2e+174) tmp = Float64(b * y); elseif (y <= -5.6e-64) tmp = Float64(a + x); elseif (y <= 34000000.0) tmp = Float64(z + x); else tmp = Float64(b * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2e+174) tmp = b * y; elseif (y <= -5.6e-64) tmp = a + x; elseif (y <= 34000000.0) tmp = z + x; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2e+174], N[(b * y), $MachinePrecision], If[LessEqual[y, -5.6e-64], N[(a + x), $MachinePrecision], If[LessEqual[y, 34000000.0], N[(z + x), $MachinePrecision], N[(b * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+174}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-64}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;y \leq 34000000:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if y < -2.00000000000000014e174 or 3.4e7 < y Initial program 92.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6449.8
Applied rewrites49.8%
Taylor expanded in y around inf
Applied rewrites43.9%
if -2.00000000000000014e174 < y < -5.60000000000000008e-64Initial program 93.8%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites56.6%
Taylor expanded in z around 0
Applied rewrites40.8%
Taylor expanded in b around 0
Applied rewrites31.5%
if -5.60000000000000008e-64 < y < 3.4e7Initial program 99.1%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites59.6%
Taylor expanded in y around 0
Applied rewrites59.0%
Taylor expanded in a around 0
Applied rewrites35.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b a) t))) (if (<= t -3.15e+28) t_1 (if (<= t 3.6e+37) (* (- y 2.0) b) 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 <= -3.15e+28) {
tmp = t_1;
} else if (t <= 3.6e+37) {
tmp = (y - 2.0) * b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (b - a) * t
if (t <= (-3.15d+28)) then
tmp = t_1
else if (t <= 3.6d+37) then
tmp = (y - 2.0d0) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -3.15e+28) {
tmp = t_1;
} else if (t <= 3.6e+37) {
tmp = (y - 2.0) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -3.15e+28: tmp = t_1 elif t <= 3.6e+37: tmp = (y - 2.0) * b 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 <= -3.15e+28) tmp = t_1; elseif (t <= 3.6e+37) tmp = Float64(Float64(y - 2.0) * b); 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 <= -3.15e+28) tmp = t_1; elseif (t <= 3.6e+37) tmp = (y - 2.0) * b; 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, -3.15e+28], t$95$1, If[LessEqual[t, 3.6e+37], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -3.15 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+37}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.1500000000000001e28 or 3.59999999999999998e37 < t Initial program 90.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6466.3
Applied rewrites66.3%
if -3.1500000000000001e28 < t < 3.59999999999999998e37Initial program 98.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6445.6
Applied rewrites45.6%
Taylor expanded in t around 0
Applied rewrites44.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.06e+135) (+ a x) (if (<= a 3.5e+102) (+ z x) (+ a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.06e+135) {
tmp = a + x;
} else if (a <= 3.5e+102) {
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 (a <= (-1.06d+135)) then
tmp = a + x
else if (a <= 3.5d+102) 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 (a <= -1.06e+135) {
tmp = a + x;
} else if (a <= 3.5e+102) {
tmp = z + x;
} else {
tmp = a + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.06e+135: tmp = a + x elif a <= 3.5e+102: tmp = z + x else: tmp = a + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.06e+135) tmp = Float64(a + x); elseif (a <= 3.5e+102) 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 (a <= -1.06e+135) tmp = a + x; elseif (a <= 3.5e+102) tmp = z + x; else tmp = a + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.06e+135], N[(a + x), $MachinePrecision], If[LessEqual[a, 3.5e+102], N[(z + x), $MachinePrecision], N[(a + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.06 \cdot 10^{+135}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+102}:\\
\;\;\;\;z + x\\
\mathbf{else}:\\
\;\;\;\;a + x\\
\end{array}
\end{array}
if a < -1.06e135 or 3.50000000000000011e102 < a Initial program 87.5%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites56.2%
Taylor expanded in z around 0
Applied rewrites48.8%
Taylor expanded in b around 0
Applied rewrites37.5%
if -1.06e135 < a < 3.50000000000000011e102Initial program 97.9%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites52.5%
Taylor expanded in y around 0
Applied rewrites34.6%
Taylor expanded in a around 0
Applied rewrites27.0%
(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 95.3%
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
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites72.1%
Taylor expanded in z around 0
Applied rewrites51.8%
Taylor expanded in b around 0
Applied rewrites22.8%
herbie shell --seed 2024254
(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)))