
(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 15 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 (- y) z (* (- 1.0 t) a)))))
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(-y, z, ((1.0 - t) * a));
}
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(-y), z, Float64(Float64(1.0 - t) * a)); 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[((-y) * z + N[(N[(1.0 - t), $MachinePrecision] * a), $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(-y, z, \left(1 - t\right) \cdot a\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
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
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
Applied rewrites78.6%
Taylor expanded in a around inf
Applied rewrites78.6%
Taylor expanded in y around inf
Applied rewrites78.6%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -2.55e+110)
t_1
(if (<= y 9e+45) (fma (- t 2.0) b (+ (fma (- 1.0 t) a x) z)) 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 <= -2.55e+110) {
tmp = t_1;
} else if (y <= 9e+45) {
tmp = fma((t - 2.0), b, (fma((1.0 - t), a, x) + z));
} 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 <= -2.55e+110) tmp = t_1; elseif (y <= 9e+45) tmp = fma(Float64(t - 2.0), b, Float64(fma(Float64(1.0 - t), a, x) + z)); 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, -2.55e+110], t$95$1, If[LessEqual[y, 9e+45], N[(N[(t - 2.0), $MachinePrecision] * b + N[(N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -2.55 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(t - 2, b, \mathsf{fma}\left(1 - t, a, x\right) + z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.5500000000000001e110 or 8.9999999999999997e45 < y Initial program 90.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6481.7
Applied rewrites81.7%
if -2.5500000000000001e110 < y < 8.9999999999999997e45Initial program 97.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites96.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= b -3.5e+120)
t_1
(if (<= b 1.1e+60)
(fma (- 1.0 y) z (fma (- 1.0 t) a x))
(fma (- 1.0 y) z t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(((t + y) - 2.0), b, x);
double tmp;
if (b <= -3.5e+120) {
tmp = t_1;
} else if (b <= 1.1e+60) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = fma((1.0 - y), z, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(Float64(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -3.5e+120) tmp = t_1; elseif (b <= 1.1e+60) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = fma(Float64(1.0 - y), z, t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -3.5e+120], t$95$1, If[LessEqual[b, 1.1e+60], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - y), $MachinePrecision] * z + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{+60}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, \mathsf{fma}\left(1 - t, a, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, t\_1\right)\\
\end{array}
\end{array}
if b < -3.50000000000000007e120Initial program 90.9%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6487.9
Applied rewrites87.9%
Taylor expanded in z around 0
Applied rewrites87.9%
if -3.50000000000000007e120 < b < 1.09999999999999998e60Initial program 97.6%
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
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
Applied rewrites89.9%
if 1.09999999999999998e60 < b Initial program 87.0%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6485.4
Applied rewrites85.4%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -3e+99)
t_1
(if (<= y -2.6e-93)
(fma (- 1.0 t) a x)
(if (<= y 4.3e+45) (+ (fma -2.0 b (+ z x)) a) 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 <= -3e+99) {
tmp = t_1;
} else if (y <= -2.6e-93) {
tmp = fma((1.0 - t), a, x);
} else if (y <= 4.3e+45) {
tmp = fma(-2.0, b, (z + x)) + a;
} 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 <= -3e+99) tmp = t_1; elseif (y <= -2.6e-93) tmp = fma(Float64(1.0 - t), a, x); elseif (y <= 4.3e+45) tmp = Float64(fma(-2.0, b, Float64(z + x)) + a); 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, -3e+99], t$95$1, If[LessEqual[y, -2.6e-93], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[y, 4.3e+45], N[(N[(-2.0 * b + N[(z + x), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -3 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-93}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(-2, b, z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.00000000000000014e99 or 4.3000000000000003e45 < y Initial program 90.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6481.0
Applied rewrites81.0%
if -3.00000000000000014e99 < y < -2.5999999999999998e-93Initial program 97.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
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
Applied rewrites80.1%
Taylor expanded in z around 0
Applied rewrites73.7%
if -2.5999999999999998e-93 < y < 4.3000000000000003e45Initial program 97.2%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites99.1%
Taylor expanded in t around 0
Applied rewrites61.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- (+ t y) 2.0) b x)))
(if (<= b -3.5e+120)
t_1
(if (<= b 1.5e+62) (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(((t + y) - 2.0), b, x);
double tmp;
if (b <= -3.5e+120) {
tmp = t_1;
} else if (b <= 1.5e+62) {
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(t + y) - 2.0), b, x) tmp = 0.0 if (b <= -3.5e+120) tmp = t_1; elseif (b <= 1.5e+62) 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[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[b, -3.5e+120], t$95$1, If[LessEqual[b, 1.5e+62], 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(t + y\right) - 2, b, x\right)\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+62}:\\
\;\;\;\;\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 < -3.50000000000000007e120 or 1.5e62 < b Initial program 88.5%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6486.3
Applied rewrites86.3%
Taylor expanded in z around 0
Applied rewrites81.0%
if -3.50000000000000007e120 < b < 1.5e62Initial program 97.6%
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
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
Applied rewrites89.9%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -3.5e+107)
t_1
(if (<= y -300000000000.0)
(* (- b a) t)
(if (<= y 4.3e+45) (+ (+ z x) a) 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 <= -3.5e+107) {
tmp = t_1;
} else if (y <= -300000000000.0) {
tmp = (b - a) * t;
} else if (y <= 4.3e+45) {
tmp = (z + x) + a;
} 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 <= (-3.5d+107)) then
tmp = t_1
else if (y <= (-300000000000.0d0)) then
tmp = (b - a) * t
else if (y <= 4.3d+45) then
tmp = (z + x) + a
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 <= -3.5e+107) {
tmp = t_1;
} else if (y <= -300000000000.0) {
tmp = (b - a) * t;
} else if (y <= 4.3e+45) {
tmp = (z + x) + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - z) * y tmp = 0 if y <= -3.5e+107: tmp = t_1 elif y <= -300000000000.0: tmp = (b - a) * t elif y <= 4.3e+45: tmp = (z + x) + a 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 <= -3.5e+107) tmp = t_1; elseif (y <= -300000000000.0) tmp = Float64(Float64(b - a) * t); elseif (y <= 4.3e+45) tmp = Float64(Float64(z + x) + a); 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 <= -3.5e+107) tmp = t_1; elseif (y <= -300000000000.0) tmp = (b - a) * t; elseif (y <= 4.3e+45) tmp = (z + x) + a; 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, -3.5e+107], t$95$1, If[LessEqual[y, -300000000000.0], N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 4.3e+45], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -300000000000:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+45}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.4999999999999997e107 or 4.3000000000000003e45 < y Initial program 90.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6481.7
Applied rewrites81.7%
if -3.4999999999999997e107 < y < -3e11Initial program 100.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6465.0
Applied rewrites65.0%
if -3e11 < y < 4.3000000000000003e45Initial program 96.8%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites98.4%
Taylor expanded in t around 0
Applied rewrites61.5%
Taylor expanded in b around 0
Applied rewrites54.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a) t)))
(if (<= t -1.45e+22)
t_1
(if (<= t 122.0) (+ (+ z x) a) (if (<= t 2e+181) (* (- 1.0 y) z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a * t;
double tmp;
if (t <= -1.45e+22) {
tmp = t_1;
} else if (t <= 122.0) {
tmp = (z + x) + a;
} else if (t <= 2e+181) {
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 = -a * t
if (t <= (-1.45d+22)) then
tmp = t_1
else if (t <= 122.0d0) then
tmp = (z + x) + a
else if (t <= 2d+181) 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 = -a * t;
double tmp;
if (t <= -1.45e+22) {
tmp = t_1;
} else if (t <= 122.0) {
tmp = (z + x) + a;
} else if (t <= 2e+181) {
tmp = (1.0 - y) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a * t tmp = 0 if t <= -1.45e+22: tmp = t_1 elif t <= 122.0: tmp = (z + x) + a elif t <= 2e+181: tmp = (1.0 - y) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) * t) tmp = 0.0 if (t <= -1.45e+22) tmp = t_1; elseif (t <= 122.0) tmp = Float64(Float64(z + x) + a); elseif (t <= 2e+181) 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 = -a * t; tmp = 0.0; if (t <= -1.45e+22) tmp = t_1; elseif (t <= 122.0) tmp = (z + x) + a; elseif (t <= 2e+181) 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[((-a) * t), $MachinePrecision]}, If[LessEqual[t, -1.45e+22], t$95$1, If[LessEqual[t, 122.0], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 2e+181], N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-a\right) \cdot t\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 122:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+181}:\\
\;\;\;\;\left(1 - y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.45e22 or 1.9999999999999998e181 < t Initial program 89.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6477.2
Applied rewrites77.2%
Taylor expanded in b around 0
Applied rewrites51.1%
if -1.45e22 < t < 122Initial program 97.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites67.3%
Taylor expanded in t around 0
Applied rewrites64.7%
Taylor expanded in b around 0
Applied rewrites56.8%
if 122 < t < 1.9999999999999998e181Initial program 95.7%
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
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f6441.2
Applied rewrites41.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a) t)))
(if (<= t -1.45e+22)
t_1
(if (<= t 210.0) (+ (+ z x) a) (if (<= t 2e+181) (* (- z) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a * t;
double tmp;
if (t <= -1.45e+22) {
tmp = t_1;
} else if (t <= 210.0) {
tmp = (z + x) + a;
} else if (t <= 2e+181) {
tmp = -z * y;
} 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 = -a * t
if (t <= (-1.45d+22)) then
tmp = t_1
else if (t <= 210.0d0) then
tmp = (z + x) + a
else if (t <= 2d+181) then
tmp = -z * y
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 = -a * t;
double tmp;
if (t <= -1.45e+22) {
tmp = t_1;
} else if (t <= 210.0) {
tmp = (z + x) + a;
} else if (t <= 2e+181) {
tmp = -z * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a * t tmp = 0 if t <= -1.45e+22: tmp = t_1 elif t <= 210.0: tmp = (z + x) + a elif t <= 2e+181: tmp = -z * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) * t) tmp = 0.0 if (t <= -1.45e+22) tmp = t_1; elseif (t <= 210.0) tmp = Float64(Float64(z + x) + a); elseif (t <= 2e+181) tmp = Float64(Float64(-z) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a * t; tmp = 0.0; if (t <= -1.45e+22) tmp = t_1; elseif (t <= 210.0) tmp = (z + x) + a; elseif (t <= 2e+181) tmp = -z * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) * t), $MachinePrecision]}, If[LessEqual[t, -1.45e+22], t$95$1, If[LessEqual[t, 210.0], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 2e+181], N[((-z) * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-a\right) \cdot t\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 210:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+181}:\\
\;\;\;\;\left(-z\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.45e22 or 1.9999999999999998e181 < t Initial program 89.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6477.2
Applied rewrites77.2%
Taylor expanded in b around 0
Applied rewrites51.1%
if -1.45e22 < t < 210Initial program 97.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites67.3%
Taylor expanded in t around 0
Applied rewrites64.7%
Taylor expanded in b around 0
Applied rewrites56.8%
if 210 < t < 1.9999999999999998e181Initial program 95.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6459.9
Applied rewrites59.9%
Taylor expanded in b around 0
Applied rewrites40.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a) t)))
(if (<= t -1.45e+22)
t_1
(if (<= t 8.2e+24) (+ (+ z x) a) (if (<= t 7.6e+174) (* b t) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -a * t;
double tmp;
if (t <= -1.45e+22) {
tmp = t_1;
} else if (t <= 8.2e+24) {
tmp = (z + x) + a;
} else if (t <= 7.6e+174) {
tmp = b * 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 = -a * t
if (t <= (-1.45d+22)) then
tmp = t_1
else if (t <= 8.2d+24) then
tmp = (z + x) + a
else if (t <= 7.6d+174) then
tmp = b * 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 = -a * t;
double tmp;
if (t <= -1.45e+22) {
tmp = t_1;
} else if (t <= 8.2e+24) {
tmp = (z + x) + a;
} else if (t <= 7.6e+174) {
tmp = b * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = -a * t tmp = 0 if t <= -1.45e+22: tmp = t_1 elif t <= 8.2e+24: tmp = (z + x) + a elif t <= 7.6e+174: tmp = b * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(-a) * t) tmp = 0.0 if (t <= -1.45e+22) tmp = t_1; elseif (t <= 8.2e+24) tmp = Float64(Float64(z + x) + a); elseif (t <= 7.6e+174) tmp = Float64(b * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = -a * t; tmp = 0.0; if (t <= -1.45e+22) tmp = t_1; elseif (t <= 8.2e+24) tmp = (z + x) + a; elseif (t <= 7.6e+174) tmp = b * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[((-a) * t), $MachinePrecision]}, If[LessEqual[t, -1.45e+22], t$95$1, If[LessEqual[t, 8.2e+24], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 7.6e+174], N[(b * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-a\right) \cdot t\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{+24}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+174}:\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.45e22 or 7.6000000000000004e174 < t Initial program 90.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6476.6
Applied rewrites76.6%
Taylor expanded in b around 0
Applied rewrites51.1%
if -1.45e22 < t < 8.2000000000000002e24Initial program 97.5%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites67.0%
Taylor expanded in t around 0
Applied rewrites64.5%
Taylor expanded in b around 0
Applied rewrites56.7%
if 8.2000000000000002e24 < t < 7.6000000000000004e174Initial program 95.2%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6478.8
Applied rewrites78.8%
Taylor expanded in t around inf
Applied rewrites36.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b z) y))) (if (<= y -3e+99) t_1 (if (<= y 7.5e+45) (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 - z) * y;
double tmp;
if (y <= -3e+99) {
tmp = t_1;
} else if (y <= 7.5e+45) {
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(Float64(b - z) * y) tmp = 0.0 if (y <= -3e+99) tmp = t_1; elseif (y <= 7.5e+45) 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[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -3e+99], t$95$1, If[LessEqual[y, 7.5e+45], N[(N[(1.0 - t), $MachinePrecision] * a + N[(z + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -3 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, z + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.00000000000000014e99 or 7.50000000000000058e45 < y Initial program 90.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6481.0
Applied rewrites81.0%
if -3.00000000000000014e99 < y < 7.50000000000000058e45Initial program 97.3%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites96.3%
Taylor expanded in b around 0
Applied rewrites75.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b z) y))) (if (<= y -3e+99) t_1 (if (<= y 7.5e+45) (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 - z) * y;
double tmp;
if (y <= -3e+99) {
tmp = t_1;
} else if (y <= 7.5e+45) {
tmp = fma((1.0 - t), a, x);
} 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 <= -3e+99) tmp = t_1; elseif (y <= 7.5e+45) 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[(N[(b - z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -3e+99], t$95$1, If[LessEqual[y, 7.5e+45], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - z\right) \cdot y\\
\mathbf{if}\;y \leq -3 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.00000000000000014e99 or 7.50000000000000058e45 < y Initial program 90.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6481.0
Applied rewrites81.0%
if -3.00000000000000014e99 < y < 7.50000000000000058e45Initial program 97.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
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
Applied rewrites76.3%
Taylor expanded in z around 0
Applied rewrites61.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b a) t))) (if (<= t -1.35e+22) t_1 (if (<= t 4.4e+28) (+ (+ z x) a) 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.35e+22) {
tmp = t_1;
} else if (t <= 4.4e+28) {
tmp = (z + x) + a;
} 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.35d+22)) then
tmp = t_1
else if (t <= 4.4d+28) then
tmp = (z + x) + a
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.35e+22) {
tmp = t_1;
} else if (t <= 4.4e+28) {
tmp = (z + x) + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b - a) * t tmp = 0 if t <= -1.35e+22: tmp = t_1 elif t <= 4.4e+28: tmp = (z + x) + a 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.35e+22) tmp = t_1; elseif (t <= 4.4e+28) tmp = Float64(Float64(z + x) + a); 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.35e+22) tmp = t_1; elseif (t <= 4.4e+28) tmp = (z + x) + a; 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.35e+22], t$95$1, If[LessEqual[t, 4.4e+28], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -1.35 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+28}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.3500000000000001e22 or 4.39999999999999973e28 < t Initial program 91.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6471.1
Applied rewrites71.1%
if -1.3500000000000001e22 < t < 4.39999999999999973e28Initial program 97.6%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites65.9%
Taylor expanded in t around 0
Applied rewrites63.5%
Taylor expanded in b around 0
Applied rewrites55.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -5.2e+76) (* b y) (if (<= y 6.5e+45) (+ (+ z x) a) (* b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.2e+76) {
tmp = b * y;
} else if (y <= 6.5e+45) {
tmp = (z + x) + a;
} 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 <= (-5.2d+76)) then
tmp = b * y
else if (y <= 6.5d+45) then
tmp = (z + x) + a
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 <= -5.2e+76) {
tmp = b * y;
} else if (y <= 6.5e+45) {
tmp = (z + x) + a;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.2e+76: tmp = b * y elif y <= 6.5e+45: tmp = (z + x) + a else: tmp = b * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.2e+76) tmp = Float64(b * y); elseif (y <= 6.5e+45) tmp = Float64(Float64(z + x) + a); else tmp = Float64(b * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.2e+76) tmp = b * y; elseif (y <= 6.5e+45) tmp = (z + x) + a; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.2e+76], N[(b * y), $MachinePrecision], If[LessEqual[y, 6.5e+45], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], N[(b * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+76}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+45}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if y < -5.1999999999999999e76 or 6.50000000000000034e45 < y Initial program 91.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6442.8
Applied rewrites42.8%
Taylor expanded in y around inf
Applied rewrites41.0%
if -5.1999999999999999e76 < y < 6.50000000000000034e45Initial program 97.2%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
associate--r+N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
lower-+.f64N/A
Applied rewrites97.3%
Taylor expanded in t around 0
Applied rewrites57.4%
Taylor expanded in b around 0
Applied rewrites50.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.9e+39) (* b y) (if (<= y 6.2e+31) (* b t) (* b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.9e+39) {
tmp = b * y;
} else if (y <= 6.2e+31) {
tmp = b * t;
} 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.9d+39)) then
tmp = b * y
else if (y <= 6.2d+31) then
tmp = b * t
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.9e+39) {
tmp = b * y;
} else if (y <= 6.2e+31) {
tmp = b * t;
} else {
tmp = b * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.9e+39: tmp = b * y elif y <= 6.2e+31: tmp = b * t else: tmp = b * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.9e+39) tmp = Float64(b * y); elseif (y <= 6.2e+31) tmp = Float64(b * t); 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.9e+39) tmp = b * y; elseif (y <= 6.2e+31) tmp = b * t; else tmp = b * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.9e+39], N[(b * y), $MachinePrecision], If[LessEqual[y, 6.2e+31], N[(b * t), $MachinePrecision], N[(b * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+39}:\\
\;\;\;\;b \cdot y\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+31}:\\
\;\;\;\;b \cdot t\\
\mathbf{else}:\\
\;\;\;\;b \cdot y\\
\end{array}
\end{array}
if y < -2.90000000000000029e39 or 6.2000000000000004e31 < y Initial program 91.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6439.9
Applied rewrites39.9%
Taylor expanded in y around inf
Applied rewrites37.5%
if -2.90000000000000029e39 < y < 6.2000000000000004e31Initial program 97.7%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
associate--r+N/A
metadata-evalN/A
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6465.6
Applied rewrites65.6%
Taylor expanded in t around inf
Applied rewrites19.5%
(FPCore (x y z t a b) :precision binary64 (* b y))
double code(double x, double y, double z, double t, double a, double b) {
return b * y;
}
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 = b * y
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return b * y;
}
def code(x, y, z, t, a, b): return b * y
function code(x, y, z, t, a, b) return Float64(b * y) end
function tmp = code(x, y, z, t, a, b) tmp = b * y; end
code[x_, y_, z_, t_, a_, b_] := N[(b * y), $MachinePrecision]
\begin{array}{l}
\\
b \cdot y
\end{array}
Initial program 94.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6433.4
Applied rewrites33.4%
Taylor expanded in y around inf
Applied rewrites19.6%
herbie shell --seed 2024236
(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)))