
(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 20 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 (fma (- (+ y t) 2.0) b (- x (fma a (- t 1.0) (* (- y 1.0) z)))))
double code(double x, double y, double z, double t, double a, double b) {
return fma(((y + t) - 2.0), b, (x - fma(a, (t - 1.0), ((y - 1.0) * z))));
}
function code(x, y, z, t, a, b) return fma(Float64(Float64(y + t) - 2.0), b, Float64(x - fma(a, Float64(t - 1.0), Float64(Float64(y - 1.0) * z)))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(x - N[(a * N[(t - 1.0), $MachinePrecision] + N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\left(y + t\right) - 2, b, x - \mathsf{fma}\left(a, t - 1, \left(y - 1\right) \cdot z\right)\right)
\end{array}
Initial program 94.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6497.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6497.7
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6498.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.0
Applied rewrites98.0%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (* b (- (+ y t) 2.0)) (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)))))
(if (<= t_1 -2e+293) (* (- a) t) (if (<= t_1 2e+306) (+ a x) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((y + t) - 2.0)) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a));
double tmp;
if (t_1 <= -2e+293) {
tmp = -a * t;
} else if (t_1 <= 2e+306) {
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) :: t_1
real(8) :: tmp
t_1 = (b * ((y + t) - 2.0d0)) + ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a))
if (t_1 <= (-2d+293)) then
tmp = -a * t
else if (t_1 <= 2d+306) 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 t_1 = (b * ((y + t) - 2.0)) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a));
double tmp;
if (t_1 <= -2e+293) {
tmp = -a * t;
} else if (t_1 <= 2e+306) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b * ((y + t) - 2.0)) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) tmp = 0 if t_1 <= -2e+293: tmp = -a * t elif t_1 <= 2e+306: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) + Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a))) tmp = 0.0 if (t_1 <= -2e+293) tmp = Float64(Float64(-a) * t); elseif (t_1 <= 2e+306) tmp = Float64(a + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b * ((y + t) - 2.0)) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)); tmp = 0.0; if (t_1 <= -2e+293) tmp = -a * t; elseif (t_1 <= 2e+306) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+293], N[((-a) * t), $MachinePrecision], If[LessEqual[t$95$1, 2e+306], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right) + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+293}:\\
\;\;\;\;\left(-a\right) \cdot t\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\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)) < -1.9999999999999998e293Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6451.0
Applied rewrites51.0%
Taylor expanded in b around 0
Applied rewrites31.7%
if -1.9999999999999998e293 < (+.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)) < 2.00000000000000003e306Initial 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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites84.1%
Taylor expanded in z around 0
Applied rewrites59.0%
Taylor expanded in b around 0
Applied rewrites44.3%
if 2.00000000000000003e306 < (+.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 74.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6451.6
Applied rewrites51.6%
Taylor expanded in t around inf
Applied rewrites33.9%
Final simplification39.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (* b (- (+ y t) 2.0)) (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)))))
(if (<= t_1 (- INFINITY)) (* b t) (if (<= t_1 2e+306) (+ a x) (* b t)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((y + t) - 2.0)) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = b * t;
} else if (t_1 <= 2e+306) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b * ((y + t) - 2.0)) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = b * t;
} else if (t_1 <= 2e+306) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b * ((y + t) - 2.0)) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) tmp = 0 if t_1 <= -math.inf: tmp = b * t elif t_1 <= 2e+306: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) + Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(b * t); elseif (t_1 <= 2e+306) tmp = Float64(a + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b * ((y + t) - 2.0)) + ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)); tmp = 0.0; if (t_1 <= -Inf) tmp = b * t; elseif (t_1 <= 2e+306) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(b * t), $MachinePrecision], If[LessEqual[t$95$1, 2e+306], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right) + \left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\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.0 or 2.00000000000000003e306 < (+.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 85.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6447.5
Applied rewrites47.5%
Taylor expanded in t around inf
Applied rewrites30.2%
if -inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < 2.00000000000000003e306Initial 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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites83.9%
Taylor expanded in z around 0
Applied rewrites58.6%
Taylor expanded in b around 0
Applied rewrites42.8%
Final simplification38.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ y t) 2.0) b (* (- 1.0 y) z))))
(if (<= b -4.4e+47)
t_1
(if (<= b 5.8e+25) (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(((y + t) - 2.0), b, ((1.0 - y) * z));
double tmp;
if (b <= -4.4e+47) {
tmp = t_1;
} else if (b <= 5.8e+25) {
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(Float64(y + t) - 2.0), b, Float64(Float64(1.0 - y) * z)) tmp = 0.0 if (b <= -4.4e+47) tmp = t_1; elseif (b <= 5.8e+25) 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[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b + N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.4e+47], t$95$1, If[LessEqual[b, 5.8e+25], 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(\left(y + t\right) - 2, b, \left(1 - y\right) \cdot z\right)\\
\mathbf{if}\;b \leq -4.4 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.8 \cdot 10^{+25}:\\
\;\;\;\;\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 < -4.3999999999999999e47 or 5.7999999999999998e25 < b Initial program 86.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6494.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6494.9
lift--.f64N/A
lift--.f64N/A
associate--l-N/A
lower--.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6494.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6494.9
Applied rewrites94.9%
Taylor expanded in z around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
metadata-evalN/A
distribute-neg-inN/A
metadata-evalN/A
+-commutativeN/A
sub-negN/A
lower--.f6479.2
Applied rewrites79.2%
if -4.3999999999999999e47 < b < 5.7999999999999998e25Initial program 99.3%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites92.6%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -2.2e+48)
t_1
(if (<= b 8.2e-58)
(fma (- 1.0 y) z (+ a x))
(if (<= b 5e+79) (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 * ((y + t) - 2.0);
double tmp;
if (b <= -2.2e+48) {
tmp = t_1;
} else if (b <= 8.2e-58) {
tmp = fma((1.0 - y), z, (a + x));
} else if (b <= 5e+79) {
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(y + t) - 2.0)) tmp = 0.0 if (b <= -2.2e+48) tmp = t_1; elseif (b <= 8.2e-58) tmp = fma(Float64(1.0 - y), z, Float64(a + x)); elseif (b <= 5e+79) 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[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.2e+48], t$95$1, If[LessEqual[b, 8.2e-58], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e+79], 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(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{-58}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{elif}\;b \leq 5 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.1999999999999999e48 or 5e79 < b Initial program 84.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6476.9
Applied rewrites76.9%
if -2.1999999999999999e48 < b < 8.20000000000000056e-58Initial program 99.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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites79.0%
Taylor expanded in b around 0
Applied rewrites76.2%
if 8.20000000000000056e-58 < b < 5e79Initial 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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites74.6%
Taylor expanded in y around 0
Applied rewrites71.5%
Final simplification75.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -1.55e+48)
t_1
(if (<= b -7.8e-230)
(fma (- 1.0 y) z x)
(if (<= b 5e+79) (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 * ((y + t) - 2.0);
double tmp;
if (b <= -1.55e+48) {
tmp = t_1;
} else if (b <= -7.8e-230) {
tmp = fma((1.0 - y), z, x);
} else if (b <= 5e+79) {
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(y + t) - 2.0)) tmp = 0.0 if (b <= -1.55e+48) tmp = t_1; elseif (b <= -7.8e-230) tmp = fma(Float64(1.0 - y), z, x); elseif (b <= 5e+79) 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[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.55e+48], t$95$1, If[LessEqual[b, -7.8e-230], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[b, 5e+79], 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(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.55 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -7.8 \cdot 10^{-230}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{elif}\;b \leq 5 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.55000000000000003e48 or 5e79 < b Initial program 84.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6476.9
Applied rewrites76.9%
if -1.55000000000000003e48 < b < -7.8000000000000004e-230Initial program 98.3%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites90.2%
Taylor expanded in a around 0
Applied rewrites69.4%
if -7.8000000000000004e-230 < b < 5e79Initial 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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites89.7%
Taylor expanded in y around 0
Applied rewrites74.8%
Final simplification74.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -2e+134)
t_1
(if (<= b 2.3e+80) (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 * ((y + t) - 2.0);
double tmp;
if (b <= -2e+134) {
tmp = t_1;
} else if (b <= 2.3e+80) {
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(y + t) - 2.0)) tmp = 0.0 if (b <= -2e+134) tmp = t_1; elseif (b <= 2.3e+80) 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[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2e+134], t$95$1, If[LessEqual[b, 2.3e+80], 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(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -2 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{+80}:\\
\;\;\;\;\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 < -1.99999999999999984e134 or 2.30000000000000004e80 < b Initial program 83.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6481.8
Applied rewrites81.8%
if -1.99999999999999984e134 < b < 2.30000000000000004e80Initial program 98.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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites87.4%
Final simplification85.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -3.4e+68)
t_1
(if (<= t 5e-87)
(fma (- 1.0 y) z x)
(if (<= t 2.35e+83) (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 <= -3.4e+68) {
tmp = t_1;
} else if (t <= 5e-87) {
tmp = fma((1.0 - y), z, x);
} else if (t <= 2.35e+83) {
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 <= -3.4e+68) tmp = t_1; elseif (t <= 5e-87) tmp = fma(Float64(1.0 - y), z, x); elseif (t <= 2.35e+83) 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, -3.4e+68], t$95$1, If[LessEqual[t, 5e-87], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 2.35e+83], 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 -3.4 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-87}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+83}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.40000000000000015e68 or 2.3499999999999999e83 < t Initial program 88.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.2
Applied rewrites70.2%
if -3.40000000000000015e68 < t < 5.00000000000000042e-87Initial program 98.4%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites77.0%
Taylor expanded in a around 0
Applied rewrites61.4%
if 5.00000000000000042e-87 < t < 2.3499999999999999e83Initial 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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites80.3%
Taylor expanded in z around 0
Applied rewrites66.0%
Taylor expanded in a around 0
Applied rewrites59.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.55e+55)
t_1
(if (<= t -1.1e-23)
(* (- 1.0 y) z)
(if (<= t 2.35e+83) (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.55e+55) {
tmp = t_1;
} else if (t <= -1.1e-23) {
tmp = (1.0 - y) * z;
} else if (t <= 2.35e+83) {
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.55e+55) tmp = t_1; elseif (t <= -1.1e-23) tmp = Float64(Float64(1.0 - y) * z); elseif (t <= 2.35e+83) 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.55e+55], t$95$1, If[LessEqual[t, -1.1e-23], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 2.35e+83], 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.55 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-23}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+83}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.54999999999999997e55 or 2.3499999999999999e83 < t Initial program 88.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6469.5
Applied rewrites69.5%
if -1.54999999999999997e55 < t < -1.1e-23Initial program 100.0%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6461.2
Applied rewrites61.2%
if -1.1e-23 < t < 2.3499999999999999e83Initial program 98.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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites94.6%
Taylor expanded in z around 0
Applied rewrites65.5%
Taylor expanded in a around 0
Applied rewrites49.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -15500000.0)
t_1
(if (<= y 5.4e+24)
(fma (- 1.0 t) a x)
(if (<= y 1.92e+80) (* (- b a) t) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -15500000.0) {
tmp = t_1;
} else if (y <= 5.4e+24) {
tmp = fma((1.0 - t), a, x);
} else if (y <= 1.92e+80) {
tmp = (b - a) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -15500000.0) tmp = t_1; elseif (y <= 5.4e+24) tmp = fma(Float64(1.0 - t), a, x); elseif (y <= 1.92e+80) tmp = Float64(Float64(b - a) * t); 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), $MachinePrecision]}, If[LessEqual[y, -15500000.0], t$95$1, If[LessEqual[y, 5.4e+24], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[y, 1.92e+80], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -15500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;y \leq 1.92 \cdot 10^{+80}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.55e7 or 1.91999999999999988e80 < y Initial program 93.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.6
Applied rewrites70.6%
if -1.55e7 < y < 5.4e24Initial 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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites75.5%
Taylor expanded in z around 0
Applied rewrites54.5%
if 5.4e24 < y < 1.91999999999999988e80Initial program 84.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6484.7
Applied rewrites84.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -210.0)
t_1
(if (<= y -1.3e-88) (+ a x) (if (<= y 1.92e+80) (* (- b a) t) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - z) * y;
double tmp;
if (y <= -210.0) {
tmp = t_1;
} else if (y <= -1.3e-88) {
tmp = a + x;
} else if (y <= 1.92e+80) {
tmp = (b - a) * t;
} 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 - z) * y
if (y <= (-210.0d0)) then
tmp = t_1
else if (y <= (-1.3d-88)) then
tmp = a + x
else if (y <= 1.92d+80) then
tmp = (b - a) * t
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 tmp;
if (y <= -210.0) {
tmp = t_1;
} else if (y <= -1.3e-88) {
tmp = a + x;
} else if (y <= 1.92e+80) {
tmp = (b - a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - z) * y tmp = 0 if y <= -210.0: tmp = t_1 elif y <= -1.3e-88: tmp = a + x elif y <= 1.92e+80: tmp = (b - a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - z) * y) tmp = 0.0 if (y <= -210.0) tmp = t_1; elseif (y <= -1.3e-88) tmp = Float64(a + x); elseif (y <= 1.92e+80) tmp = Float64(Float64(b - a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b - z) * y; tmp = 0.0; if (y <= -210.0) tmp = t_1; elseif (y <= -1.3e-88) tmp = a + x; elseif (y <= 1.92e+80) tmp = (b - a) * t; 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]}, If[LessEqual[y, -210.0], t$95$1, If[LessEqual[y, -1.3e-88], N[(a + x), $MachinePrecision], If[LessEqual[y, 1.92e+80], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -210:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-88}:\\
\;\;\;\;a + x\\
\mathbf{elif}\;y \leq 1.92 \cdot 10^{+80}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -210 or 1.91999999999999988e80 < y Initial program 93.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.0
Applied rewrites70.0%
if -210 < y < -1.30000000000000007e-88Initial program 94.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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites79.1%
Taylor expanded in z around 0
Applied rewrites58.6%
Taylor expanded in b around 0
Applied rewrites53.0%
if -1.30000000000000007e-88 < y < 1.91999999999999988e80Initial program 95.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6443.7
Applied rewrites43.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.55e+55)
t_1
(if (<= t -9.5e-206) (* (- 1.0 y) z) (if (<= t 1.28e+28) (+ 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.55e+55) {
tmp = t_1;
} else if (t <= -9.5e-206) {
tmp = (1.0 - y) * z;
} else if (t <= 1.28e+28) {
tmp = a + x;
} 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 <= (-1.55d+55)) then
tmp = t_1
else if (t <= (-9.5d-206)) then
tmp = (1.0d0 - y) * z
else if (t <= 1.28d+28) then
tmp = a + x
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 <= -1.55e+55) {
tmp = t_1;
} else if (t <= -9.5e-206) {
tmp = (1.0 - y) * z;
} else if (t <= 1.28e+28) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -1.55e+55: tmp = t_1 elif t <= -9.5e-206: tmp = (1.0 - y) * z elif t <= 1.28e+28: tmp = 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.55e+55) tmp = t_1; elseif (t <= -9.5e-206) tmp = Float64(Float64(1.0 - y) * z); elseif (t <= 1.28e+28) tmp = Float64(a + x); 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 <= -1.55e+55) tmp = t_1; elseif (t <= -9.5e-206) tmp = (1.0 - y) * z; elseif (t <= 1.28e+28) tmp = a + x; 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, -1.55e+55], t$95$1, If[LessEqual[t, -9.5e-206], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 1.28e+28], N[(a + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-206}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{elif}\;t \leq 1.28 \cdot 10^{+28}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.54999999999999997e55 or 1.28000000000000006e28 < t Initial program 89.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6465.8
Applied rewrites65.8%
if -1.54999999999999997e55 < t < -9.49999999999999979e-206Initial program 100.0%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6447.7
Applied rewrites47.7%
if -9.49999999999999979e-206 < t < 1.28000000000000006e28Initial program 97.9%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites97.3%
Taylor expanded in z around 0
Applied rewrites67.4%
Taylor expanded in b around 0
Applied rewrites41.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 t) a)))
(if (<= a -7.5)
t_1
(if (<= a 1.05e-76) (* (- t 2.0) b) (if (<= a 4.3e+119) (+ a x) 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 <= -7.5) {
tmp = t_1;
} else if (a <= 1.05e-76) {
tmp = (t - 2.0) * b;
} else if (a <= 4.3e+119) {
tmp = a + x;
} 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 <= (-7.5d0)) then
tmp = t_1
else if (a <= 1.05d-76) then
tmp = (t - 2.0d0) * b
else if (a <= 4.3d+119) then
tmp = a + x
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 <= -7.5) {
tmp = t_1;
} else if (a <= 1.05e-76) {
tmp = (t - 2.0) * b;
} else if (a <= 4.3e+119) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - t) * a tmp = 0 if a <= -7.5: tmp = t_1 elif a <= 1.05e-76: tmp = (t - 2.0) * b elif a <= 4.3e+119: tmp = a + x 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 <= -7.5) tmp = t_1; elseif (a <= 1.05e-76) tmp = Float64(Float64(t - 2.0) * b); elseif (a <= 4.3e+119) tmp = Float64(a + x); 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 <= -7.5) tmp = t_1; elseif (a <= 1.05e-76) tmp = (t - 2.0) * b; elseif (a <= 4.3e+119) tmp = a + x; 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, -7.5], t$95$1, If[LessEqual[a, 1.05e-76], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[a, 4.3e+119], N[(a + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - t\right) \cdot a\\
\mathbf{if}\;a \leq -7.5:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{-76}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{+119}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.5 or 4.30000000000000032e119 < a Initial program 88.9%
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
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
neg-mul-1N/A
sub-negN/A
lower--.f6459.9
Applied rewrites59.9%
if -7.5 < a < 1.04999999999999996e-76Initial program 97.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6446.5
Applied rewrites46.5%
Taylor expanded in y around 0
Applied rewrites33.1%
if 1.04999999999999996e-76 < a < 4.30000000000000032e119Initial program 97.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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites91.2%
Taylor expanded in z around 0
Applied rewrites59.1%
Taylor expanded in b around 0
Applied rewrites45.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.4e+42)
(* (- t 2.0) b)
(if (<= b -3.8e-230)
(* (- y) z)
(if (<= b 1.55e+14) (+ a x) (* (- y 2.0) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.4e+42) {
tmp = (t - 2.0) * b;
} else if (b <= -3.8e-230) {
tmp = -y * z;
} else if (b <= 1.55e+14) {
tmp = a + x;
} else {
tmp = (y - 2.0) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.4d+42)) then
tmp = (t - 2.0d0) * b
else if (b <= (-3.8d-230)) then
tmp = -y * z
else if (b <= 1.55d+14) then
tmp = a + x
else
tmp = (y - 2.0d0) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.4e+42) {
tmp = (t - 2.0) * b;
} else if (b <= -3.8e-230) {
tmp = -y * z;
} else if (b <= 1.55e+14) {
tmp = a + x;
} else {
tmp = (y - 2.0) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.4e+42: tmp = (t - 2.0) * b elif b <= -3.8e-230: tmp = -y * z elif b <= 1.55e+14: tmp = a + x else: tmp = (y - 2.0) * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.4e+42) tmp = Float64(Float64(t - 2.0) * b); elseif (b <= -3.8e-230) tmp = Float64(Float64(-y) * z); elseif (b <= 1.55e+14) tmp = Float64(a + x); else tmp = Float64(Float64(y - 2.0) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.4e+42) tmp = (t - 2.0) * b; elseif (b <= -3.8e-230) tmp = -y * z; elseif (b <= 1.55e+14) tmp = a + x; else tmp = (y - 2.0) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.4e+42], N[(N[(t - 2.0), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, -3.8e-230], N[((-y) * z), $MachinePrecision], If[LessEqual[b, 1.55e+14], N[(a + x), $MachinePrecision], N[(N[(y - 2.0), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{+42}:\\
\;\;\;\;\left(t - 2\right) \cdot b\\
\mathbf{elif}\;b \leq -3.8 \cdot 10^{-230}:\\
\;\;\;\;\left(-y\right) \cdot z\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{+14}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;\left(y - 2\right) \cdot b\\
\end{array}
\end{array}
if b < -2.3999999999999999e42Initial program 89.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6470.5
Applied rewrites70.5%
Taylor expanded in y around 0
Applied rewrites46.7%
if -2.3999999999999999e42 < b < -3.7999999999999998e-230Initial program 98.3%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6449.4
Applied rewrites49.4%
Taylor expanded in y around inf
Applied rewrites37.4%
if -3.7999999999999998e-230 < b < 1.55e14Initial 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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites76.4%
Taylor expanded in z around 0
Applied rewrites44.8%
Taylor expanded in b around 0
Applied rewrites42.7%
if 1.55e14 < b Initial program 85.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6472.8
Applied rewrites72.8%
Taylor expanded in t around 0
Applied rewrites52.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- t 2.0) b)))
(if (<= b -2.4e+42)
t_1
(if (<= b -3.8e-230) (* (- y) z) (if (<= b 5.5e-35) (+ a 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 <= -2.4e+42) {
tmp = t_1;
} else if (b <= -3.8e-230) {
tmp = -y * z;
} else if (b <= 5.5e-35) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - 2.0d0) * b
if (b <= (-2.4d+42)) then
tmp = t_1
else if (b <= (-3.8d-230)) then
tmp = -y * z
else if (b <= 5.5d-35) then
tmp = a + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - 2.0) * b;
double tmp;
if (b <= -2.4e+42) {
tmp = t_1;
} else if (b <= -3.8e-230) {
tmp = -y * z;
} else if (b <= 5.5e-35) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 2.0) * b tmp = 0 if b <= -2.4e+42: tmp = t_1 elif b <= -3.8e-230: tmp = -y * z elif b <= 5.5e-35: tmp = a + 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 <= -2.4e+42) tmp = t_1; elseif (b <= -3.8e-230) tmp = Float64(Float64(-y) * z); elseif (b <= 5.5e-35) tmp = Float64(a + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - 2.0) * b; tmp = 0.0; if (b <= -2.4e+42) tmp = t_1; elseif (b <= -3.8e-230) tmp = -y * z; elseif (b <= 5.5e-35) tmp = a + x; else tmp = t_1; 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[b, -2.4e+42], t$95$1, If[LessEqual[b, -3.8e-230], N[((-y) * z), $MachinePrecision], If[LessEqual[b, 5.5e-35], N[(a + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 2\right) \cdot b\\
\mathbf{if}\;b \leq -2.4 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.8 \cdot 10^{-230}:\\
\;\;\;\;\left(-y\right) \cdot z\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{-35}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.3999999999999999e42 or 5.4999999999999997e-35 < b Initial program 88.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6468.0
Applied rewrites68.0%
Taylor expanded in y around 0
Applied rewrites44.2%
if -2.3999999999999999e42 < b < -3.7999999999999998e-230Initial program 98.3%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6449.4
Applied rewrites49.4%
Taylor expanded in y around inf
Applied rewrites37.4%
if -3.7999999999999998e-230 < b < 5.4999999999999997e-35Initial 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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites77.0%
Taylor expanded in z around 0
Applied rewrites47.0%
Taylor expanded in b around 0
Applied rewrites44.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- (+ y t) 2.0)))) (if (<= b -1.55e+48) t_1 (if (<= b 3.4e+24) (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 * ((y + t) - 2.0);
double tmp;
if (b <= -1.55e+48) {
tmp = t_1;
} else if (b <= 3.4e+24) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -1.55e+48) tmp = t_1; elseif (b <= 3.4e+24) 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[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.55e+48], t$95$1, If[LessEqual[b, 3.4e+24], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -1.55 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.4 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.55000000000000003e48 or 3.4000000000000001e24 < b Initial program 86.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6472.6
Applied rewrites72.6%
if -1.55000000000000003e48 < b < 3.4000000000000001e24Initial program 99.3%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites92.6%
Taylor expanded in a around 0
Applied rewrites63.1%
Final simplification66.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- 1.0 y) z))) (if (<= z -3.4e+150) t_1 (if (<= z 3.3e+83) (+ a x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - y) * z;
double tmp;
if (z <= -3.4e+150) {
tmp = t_1;
} else if (z <= 3.3e+83) {
tmp = a + x;
} 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 - y) * z
if (z <= (-3.4d+150)) then
tmp = t_1
else if (z <= 3.3d+83) then
tmp = a + x
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 - y) * z;
double tmp;
if (z <= -3.4e+150) {
tmp = t_1;
} else if (z <= 3.3e+83) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - y) * z tmp = 0 if z <= -3.4e+150: tmp = t_1 elif z <= 3.3e+83: tmp = a + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - y) * z) tmp = 0.0 if (z <= -3.4e+150) tmp = t_1; elseif (z <= 3.3e+83) tmp = Float64(a + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - y) * z; tmp = 0.0; if (z <= -3.4e+150) tmp = t_1; elseif (z <= 3.3e+83) tmp = a + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -3.4e+150], t$95$1, If[LessEqual[z, 3.3e+83], N[(a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+83}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.39999999999999983e150 or 3.29999999999999985e83 < z Initial program 91.0%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6470.9
Applied rewrites70.9%
if -3.39999999999999983e150 < z < 3.29999999999999985e83Initial program 96.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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites68.5%
Taylor expanded in z around 0
Applied rewrites59.7%
Taylor expanded in b around 0
Applied rewrites35.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- y) z))) (if (<= z -3.4e+150) t_1 (if (<= z 1.62e+84) (+ a x) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (z <= -3.4e+150) {
tmp = t_1;
} else if (z <= 1.62e+84) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = -y * z
if (z <= (-3.4d+150)) then
tmp = t_1
else if (z <= 1.62d+84) then
tmp = a + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -y * z;
double tmp;
if (z <= -3.4e+150) {
tmp = t_1;
} else if (z <= 1.62e+84) {
tmp = a + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -y * z tmp = 0 if z <= -3.4e+150: tmp = t_1 elif z <= 1.62e+84: tmp = a + x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-y) * z) tmp = 0.0 if (z <= -3.4e+150) tmp = t_1; elseif (z <= 1.62e+84) tmp = Float64(a + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -y * z; tmp = 0.0; if (z <= -3.4e+150) tmp = t_1; elseif (z <= 1.62e+84) tmp = a + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-y) * z), $MachinePrecision]}, If[LessEqual[z, -3.4e+150], t$95$1, If[LessEqual[z, 1.62e+84], N[(a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot z\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.62 \cdot 10^{+84}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.39999999999999983e150 or 1.6199999999999999e84 < z Initial program 91.0%
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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f6470.9
Applied rewrites70.9%
Taylor expanded in y around inf
Applied rewrites47.4%
if -3.39999999999999983e150 < z < 1.6199999999999999e84Initial program 96.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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites68.5%
Taylor expanded in z around 0
Applied rewrites59.7%
Taylor expanded in b around 0
Applied rewrites35.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.15e+48) (* b t) (if (<= b 1.16e+101) (+ a x) (* b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.15e+48) {
tmp = b * t;
} else if (b <= 1.16e+101) {
tmp = a + 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 (b <= (-2.15d+48)) then
tmp = b * t
else if (b <= 1.16d+101) then
tmp = a + 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 (b <= -2.15e+48) {
tmp = b * t;
} else if (b <= 1.16e+101) {
tmp = a + x;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.15e+48: tmp = b * t elif b <= 1.16e+101: tmp = a + x else: tmp = b * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.15e+48) tmp = Float64(b * t); elseif (b <= 1.16e+101) tmp = Float64(a + x); else tmp = Float64(b * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.15e+48) tmp = b * t; elseif (b <= 1.16e+101) tmp = a + x; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.15e+48], N[(b * t), $MachinePrecision], If[LessEqual[b, 1.16e+101], N[(a + x), $MachinePrecision], N[(b * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.15 \cdot 10^{+48}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;b \leq 1.16 \cdot 10^{+101}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if b < -2.14999999999999989e48Initial program 89.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6470.5
Applied rewrites70.5%
Taylor expanded in t around inf
Applied rewrites34.9%
if -2.14999999999999989e48 < b < 1.16e101Initial program 99.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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites77.1%
Taylor expanded in z around 0
Applied rewrites41.7%
Taylor expanded in b around 0
Applied rewrites35.5%
if 1.16e101 < b Initial program 79.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
lower-+.f6483.0
Applied rewrites83.0%
Taylor expanded in y around inf
Applied rewrites54.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 94.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
mul-1-negN/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
+-commutativeN/A
Applied rewrites72.6%
Taylor expanded in z around 0
Applied rewrites47.4%
Taylor expanded in b around 0
Applied rewrites27.7%
herbie shell --seed 2024276
(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)))