
(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 17 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 (* (- b z) y))))
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 = (b - z) * y;
}
return tmp;
}
public static 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.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = (b - z) * y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = (b - z) * y 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 = Float64(Float64(b - z) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b * ((t + y) - 2.0)) + ((x - (z * (y - 1.0))) - (a * (t - 1.0))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = (b - z) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(b - z), $MachinePrecision] * y), $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}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\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 y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6463.2
Applied rewrites63.2%
Final simplification97.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 y) z x))
(t_2 (* (- b a) t))
(t_3 (fma (- y 2.0) b x)))
(if (<= t -7.2e+35)
t_2
(if (<= t -1.35e-176)
t_1
(if (<= t -1.02e-297)
t_3
(if (<= t 6.5e-106)
(+ (+ z x) a)
(if (<= t 3.35e-9) t_3 (if (<= t 9200000000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((1.0 - y), z, x);
double t_2 = (b - a) * t;
double t_3 = fma((y - 2.0), b, x);
double tmp;
if (t <= -7.2e+35) {
tmp = t_2;
} else if (t <= -1.35e-176) {
tmp = t_1;
} else if (t <= -1.02e-297) {
tmp = t_3;
} else if (t <= 6.5e-106) {
tmp = (z + x) + a;
} else if (t <= 3.35e-9) {
tmp = t_3;
} else if (t <= 9200000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(1.0 - y), z, x) t_2 = Float64(Float64(b - a) * t) t_3 = fma(Float64(y - 2.0), b, x) tmp = 0.0 if (t <= -7.2e+35) tmp = t_2; elseif (t <= -1.35e-176) tmp = t_1; elseif (t <= -1.02e-297) tmp = t_3; elseif (t <= 6.5e-106) tmp = Float64(Float64(z + x) + a); elseif (t <= 3.35e-9) tmp = t_3; elseif (t <= 9200000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[t, -7.2e+35], t$95$2, If[LessEqual[t, -1.35e-176], t$95$1, If[LessEqual[t, -1.02e-297], t$95$3, If[LessEqual[t, 6.5e-106], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 3.35e-9], t$95$3, If[LessEqual[t, 9200000000000.0], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1 - y, z, x\right)\\
t_2 := \left(b - a\right) \cdot t\\
t_3 := \mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.02 \cdot 10^{-297}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-106}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{elif}\;t \leq 3.35 \cdot 10^{-9}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 9200000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -7.2000000000000001e35 or 9.2e12 < t Initial program 91.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.3
Applied rewrites68.3%
if -7.2000000000000001e35 < t < -1.3499999999999999e-176 or 3.34999999999999981e-9 < t < 9.2e12Initial program 95.9%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites85.9%
Taylor expanded in a around 0
Applied rewrites66.5%
if -1.3499999999999999e-176 < t < -1.0200000000000001e-297 or 6.4999999999999997e-106 < t < 3.34999999999999981e-9Initial program 96.1%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites97.7%
Taylor expanded in z around 0
Applied rewrites86.2%
Taylor expanded in a around 0
Applied rewrites76.2%
if -1.0200000000000001e-297 < t < 6.4999999999999997e-106Initial program 97.1%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites100.0%
Taylor expanded in y around 0
Applied rewrites78.2%
Taylor expanded in b around 0
Applied rewrites70.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ z x) a)) (t_2 (* (- b a) t)) (t_3 (fma (- y 2.0) b x)))
(if (<= t -1.8e+105)
t_2
(if (<= t -1.85)
(* (- b z) y)
(if (<= t -1.42e-176)
t_1
(if (<= t -1.02e-297)
t_3
(if (<= t 6.5e-106) t_1 (if (<= t 2850000000000.0) t_3 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + x) + a;
double t_2 = (b - a) * t;
double t_3 = fma((y - 2.0), b, x);
double tmp;
if (t <= -1.8e+105) {
tmp = t_2;
} else if (t <= -1.85) {
tmp = (b - z) * y;
} else if (t <= -1.42e-176) {
tmp = t_1;
} else if (t <= -1.02e-297) {
tmp = t_3;
} else if (t <= 6.5e-106) {
tmp = t_1;
} else if (t <= 2850000000000.0) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + x) + a) t_2 = Float64(Float64(b - a) * t) t_3 = fma(Float64(y - 2.0), b, x) tmp = 0.0 if (t <= -1.8e+105) tmp = t_2; elseif (t <= -1.85) tmp = Float64(Float64(b - z) * y); elseif (t <= -1.42e-176) tmp = t_1; elseif (t <= -1.02e-297) tmp = t_3; elseif (t <= 6.5e-106) tmp = t_1; elseif (t <= 2850000000000.0) tmp = t_3; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y - 2.0), $MachinePrecision] * b + x), $MachinePrecision]}, If[LessEqual[t, -1.8e+105], t$95$2, If[LessEqual[t, -1.85], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, -1.42e-176], t$95$1, If[LessEqual[t, -1.02e-297], t$95$3, If[LessEqual[t, 6.5e-106], t$95$1, If[LessEqual[t, 2850000000000.0], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + x\right) + a\\
t_2 := \left(b - a\right) \cdot t\\
t_3 := \mathsf{fma}\left(y - 2, b, x\right)\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+105}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.85:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq -1.42 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.02 \cdot 10^{-297}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2850000000000:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.7999999999999999e105 or 2.85e12 < t Initial program 90.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6474.2
Applied rewrites74.2%
if -1.7999999999999999e105 < t < -1.8500000000000001Initial program 91.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6455.8
Applied rewrites55.8%
if -1.8500000000000001 < t < -1.42000000000000009e-176 or -1.0200000000000001e-297 < t < 6.4999999999999997e-106Initial program 97.2%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites98.6%
Taylor expanded in y around 0
Applied rewrites69.6%
Taylor expanded in b around 0
Applied rewrites62.1%
if -1.42000000000000009e-176 < t < -1.0200000000000001e-297 or 6.4999999999999997e-106 < t < 2.85e12Initial program 96.5%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites79.8%
Taylor expanded in a around 0
Applied rewrites70.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- 1.0 t) a (fma (- (+ t y) 2.0) b x))))
(if (<= b -7.6e+62)
t_1
(if (<= b 4.05e+40) (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((1.0 - t), a, fma(((t + y) - 2.0), b, x));
double tmp;
if (b <= -7.6e+62) {
tmp = t_1;
} else if (b <= 4.05e+40) {
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(1.0 - t), a, fma(Float64(Float64(t + y) - 2.0), b, x)) tmp = 0.0 if (b <= -7.6e+62) tmp = t_1; elseif (b <= 4.05e+40) 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[(1.0 - t), $MachinePrecision] * a + N[(N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision] * b + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.6e+62], t$95$1, If[LessEqual[b, 4.05e+40], 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(1 - t, a, \mathsf{fma}\left(\left(t + y\right) - 2, b, x\right)\right)\\
\mathbf{if}\;b \leq -7.6 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.05 \cdot 10^{+40}:\\
\;\;\;\;\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 < -7.59999999999999967e62 or 4.0499999999999999e40 < b Initial program 86.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
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
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6488.7
Applied rewrites88.7%
if -7.59999999999999967e62 < b < 4.0499999999999999e40Initial 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
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites90.2%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.8e+105)
t_1
(if (<= t -1.85)
(* (- b z) y)
(if (<= t 5200000000000.0) (+ (+ (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 - a) * t;
double tmp;
if (t <= -1.8e+105) {
tmp = t_1;
} else if (t <= -1.85) {
tmp = (b - z) * y;
} else if (t <= 5200000000000.0) {
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 - a) * t) tmp = 0.0 if (t <= -1.8e+105) tmp = t_1; elseif (t <= -1.85) tmp = Float64(Float64(b - z) * y); elseif (t <= 5200000000000.0) tmp = Float64(Float64(fma(-2.0, b, 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 - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -1.8e+105], t$95$1, If[LessEqual[t, -1.85], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 5200000000000.0], N[(N[(N[(-2.0 * b + z), $MachinePrecision] + 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.8 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.85:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq 5200000000000:\\
\;\;\;\;\left(\mathsf{fma}\left(-2, b, z\right) + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.7999999999999999e105 or 5.2e12 < t Initial program 90.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6474.2
Applied rewrites74.2%
if -1.7999999999999999e105 < t < -1.8500000000000001Initial program 91.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6455.8
Applied rewrites55.8%
if -1.8500000000000001 < t < 5.2e12Initial program 96.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
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites98.3%
Taylor expanded in y around 0
Applied rewrites63.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -1.5e+150)
t_1
(if (<= b 4e+122) (fma (- 1.0 y) z (fma (- 1.0 t) a x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -1.5e+150) {
tmp = t_1;
} else if (b <= 4e+122) {
tmp = fma((1.0 - y), z, fma((1.0 - t), a, x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -1.5e+150) tmp = t_1; elseif (b <= 4e+122) tmp = fma(Float64(1.0 - y), z, fma(Float64(1.0 - t), a, x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.5e+150], t$95$1, If[LessEqual[b, 4e+122], N[(N[(1.0 - y), $MachinePrecision] * z + N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+122}:\\
\;\;\;\;\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.50000000000000006e150 or 4.00000000000000006e122 < b Initial program 82.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6484.3
Applied rewrites84.3%
if -1.50000000000000006e150 < b < 4.00000000000000006e122Initial 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
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites84.1%
Final simplification84.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -2.6e+136)
t_1
(if (<= b -1.12e-181)
(fma (- 1.0 t) a x)
(if (<= b 1.15e+84) (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 * ((t + y) - 2.0);
double tmp;
if (b <= -2.6e+136) {
tmp = t_1;
} else if (b <= -1.12e-181) {
tmp = fma((1.0 - t), a, x);
} else if (b <= 1.15e+84) {
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(t + y) - 2.0)) tmp = 0.0 if (b <= -2.6e+136) tmp = t_1; elseif (b <= -1.12e-181) tmp = fma(Float64(1.0 - t), a, x); elseif (b <= 1.15e+84) 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[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.6e+136], t$95$1, If[LessEqual[b, -1.12e-181], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[b, 1.15e+84], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -2.6 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.12 \cdot 10^{-181}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+84}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.6000000000000001e136 or 1.1499999999999999e84 < b Initial program 85.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6478.9
Applied rewrites78.9%
if -2.6000000000000001e136 < b < -1.11999999999999997e-181Initial program 98.6%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
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
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6473.3
Applied rewrites73.3%
Taylor expanded in b around 0
Applied rewrites58.1%
if -1.11999999999999997e-181 < b < 1.1499999999999999e84Initial program 97.9%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites88.6%
Taylor expanded in a around 0
Applied rewrites59.9%
Final simplification65.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -5.1e+60)
t_1
(if (<= t 3.1e-8)
(fma (- y 2.0) b (+ a x))
(if (<= t 9200000000000.0) (fma (- 1.0 y) z x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b - a) * t;
double tmp;
if (t <= -5.1e+60) {
tmp = t_1;
} else if (t <= 3.1e-8) {
tmp = fma((y - 2.0), b, (a + x));
} else if (t <= 9200000000000.0) {
tmp = fma((1.0 - y), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b - a) * t) tmp = 0.0 if (t <= -5.1e+60) tmp = t_1; elseif (t <= 3.1e-8) tmp = fma(Float64(y - 2.0), b, Float64(a + x)); elseif (t <= 9200000000000.0) tmp = fma(Float64(1.0 - y), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -5.1e+60], t$95$1, If[LessEqual[t, 3.1e-8], N[(N[(y - 2.0), $MachinePrecision] * b + N[(a + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9200000000000.0], N[(N[(1.0 - y), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - a\right) \cdot t\\
\mathbf{if}\;t \leq -5.1 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-8}:\\
\;\;\;\;\mathsf{fma}\left(y - 2, b, a + x\right)\\
\mathbf{elif}\;t \leq 9200000000000:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.09999999999999996e60 or 9.2e12 < t Initial program 90.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.6
Applied rewrites70.6%
if -5.09999999999999996e60 < t < 3.1e-8Initial program 96.3%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites95.6%
Taylor expanded in z around 0
Applied rewrites70.4%
if 3.1e-8 < t < 9.2e12Initial program 100.0%
Taylor expanded in b around 0
+-commutativeN/A
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites100.0%
Taylor expanded in a around 0
Applied rewrites100.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b z) y)))
(if (<= y -6.8e+49)
t_1
(if (<= y 6.2e-201)
(fma (- 1.0 t) a x)
(if (<= y 3e+93) (* (- 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 <= -6.8e+49) {
tmp = t_1;
} else if (y <= 6.2e-201) {
tmp = fma((1.0 - t), a, x);
} else if (y <= 3e+93) {
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 <= -6.8e+49) tmp = t_1; elseif (y <= 6.2e-201) tmp = fma(Float64(1.0 - t), a, x); elseif (y <= 3e+93) 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, -6.8e+49], t$95$1, If[LessEqual[y, 6.2e-201], N[(N[(1.0 - t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[y, 3e+93], 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 -6.8 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-201}:\\
\;\;\;\;\mathsf{fma}\left(1 - t, a, x\right)\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+93}:\\
\;\;\;\;\left(b - a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.8000000000000001e49 or 2.99999999999999978e93 < y Initial program 88.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6475.1
Applied rewrites75.1%
if -6.8000000000000001e49 < y < 6.1999999999999998e-201Initial program 98.8%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
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
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6487.6
Applied rewrites87.6%
Taylor expanded in b around 0
Applied rewrites59.3%
if 6.1999999999999998e-201 < y < 2.99999999999999978e93Initial program 94.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6450.2
Applied rewrites50.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- b a) t)))
(if (<= t -1.8e+105)
t_1
(if (<= t -9e-249)
(* (- b z) y)
(if (<= t 5200000000000.0) (+ (+ 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.8e+105) {
tmp = t_1;
} else if (t <= -9e-249) {
tmp = (b - z) * y;
} else if (t <= 5200000000000.0) {
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.8d+105)) then
tmp = t_1
else if (t <= (-9d-249)) then
tmp = (b - z) * y
else if (t <= 5200000000000.0d0) 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.8e+105) {
tmp = t_1;
} else if (t <= -9e-249) {
tmp = (b - z) * y;
} else if (t <= 5200000000000.0) {
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.8e+105: tmp = t_1 elif t <= -9e-249: tmp = (b - z) * y elif t <= 5200000000000.0: 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.8e+105) tmp = t_1; elseif (t <= -9e-249) tmp = Float64(Float64(b - z) * y); elseif (t <= 5200000000000.0) 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.8e+105) tmp = t_1; elseif (t <= -9e-249) tmp = (b - z) * y; elseif (t <= 5200000000000.0) 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.8e+105], t$95$1, If[LessEqual[t, -9e-249], N[(N[(b - z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 5200000000000.0], 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.8 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-249}:\\
\;\;\;\;\left(b - z\right) \cdot y\\
\mathbf{elif}\;t \leq 5200000000000:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.7999999999999999e105 or 5.2e12 < t Initial program 90.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6474.2
Applied rewrites74.2%
if -1.7999999999999999e105 < t < -8.99999999999999962e-249Initial program 95.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6450.3
Applied rewrites50.3%
if -8.99999999999999962e-249 < t < 5.2e12Initial program 96.2%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites98.5%
Taylor expanded in y around 0
Applied rewrites68.7%
Taylor expanded in b around 0
Applied rewrites54.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ t y) 2.0))))
(if (<= b -6.8e+65)
t_1
(if (<= b 1.15e+84) (fma (- 1.0 y) z (+ a x)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((t + y) - 2.0);
double tmp;
if (b <= -6.8e+65) {
tmp = t_1;
} else if (b <= 1.15e+84) {
tmp = fma((1.0 - y), z, (a + x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -6.8e+65) tmp = t_1; elseif (b <= 1.15e+84) tmp = fma(Float64(1.0 - y), z, Float64(a + x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.8e+65], t$95$1, If[LessEqual[b, 1.15e+84], N[(N[(1.0 - y), $MachinePrecision] * z + N[(a + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+84}:\\
\;\;\;\;\mathsf{fma}\left(1 - y, z, a + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.7999999999999999e65 or 1.1499999999999999e84 < b Initial program 87.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6474.3
Applied rewrites74.3%
if -6.7999999999999999e65 < b < 1.1499999999999999e84Initial program 98.0%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites73.8%
Taylor expanded in b around 0
Applied rewrites70.9%
Final simplification72.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- b a) t))) (if (<= t -6.6e+30) t_1 (if (<= t 5200000000000.0) (+ (+ 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 <= -6.6e+30) {
tmp = t_1;
} else if (t <= 5200000000000.0) {
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 <= (-6.6d+30)) then
tmp = t_1
else if (t <= 5200000000000.0d0) 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 <= -6.6e+30) {
tmp = t_1;
} else if (t <= 5200000000000.0) {
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 <= -6.6e+30: tmp = t_1 elif t <= 5200000000000.0: 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 <= -6.6e+30) tmp = t_1; elseif (t <= 5200000000000.0) 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 <= -6.6e+30) tmp = t_1; elseif (t <= 5200000000000.0) 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, -6.6e+30], t$95$1, If[LessEqual[t, 5200000000000.0], 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 -6.6 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5200000000000:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.60000000000000053e30 or 5.2e12 < t Initial program 91.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6468.3
Applied rewrites68.3%
if -6.60000000000000053e30 < t < 5.2e12Initial program 96.3%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites97.6%
Taylor expanded in y around 0
Applied rewrites62.3%
Taylor expanded in b around 0
Applied rewrites49.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- y 2.0) b))) (if (<= b -1.8e+102) t_1 (if (<= b 1.7e+124) (+ (+ z x) a) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y - 2.0) * b;
double tmp;
if (b <= -1.8e+102) {
tmp = t_1;
} else if (b <= 1.7e+124) {
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 = (y - 2.0d0) * b
if (b <= (-1.8d+102)) then
tmp = t_1
else if (b <= 1.7d+124) 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 = (y - 2.0) * b;
double tmp;
if (b <= -1.8e+102) {
tmp = t_1;
} else if (b <= 1.7e+124) {
tmp = (z + x) + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y - 2.0) * b tmp = 0 if b <= -1.8e+102: tmp = t_1 elif b <= 1.7e+124: tmp = (z + x) + a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y - 2.0) * b) tmp = 0.0 if (b <= -1.8e+102) tmp = t_1; elseif (b <= 1.7e+124) 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 = (y - 2.0) * b; tmp = 0.0; if (b <= -1.8e+102) tmp = t_1; elseif (b <= 1.7e+124) 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[(y - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.8e+102], t$95$1, If[LessEqual[b, 1.7e+124], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - 2\right) \cdot b\\
\mathbf{if}\;b \leq -1.8 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{+124}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.8000000000000001e102 or 1.7e124 < b Initial program 85.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6478.5
Applied rewrites78.5%
Taylor expanded in t around 0
Applied rewrites53.6%
if -1.8000000000000001e102 < b < 1.7e124Initial program 98.2%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites71.7%
Taylor expanded in y around 0
Applied rewrites46.5%
Taylor expanded in b around 0
Applied rewrites45.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- t 2.0) b))) (if (<= b -6.4e+65) t_1 (if (<= b 4.6e+79) (+ (+ z x) a) 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 <= -6.4e+65) {
tmp = t_1;
} else if (b <= 4.6e+79) {
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 = (t - 2.0d0) * b
if (b <= (-6.4d+65)) then
tmp = t_1
else if (b <= 4.6d+79) 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 = (t - 2.0) * b;
double tmp;
if (b <= -6.4e+65) {
tmp = t_1;
} else if (b <= 4.6e+79) {
tmp = (z + x) + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - 2.0) * b tmp = 0 if b <= -6.4e+65: tmp = t_1 elif b <= 4.6e+79: tmp = (z + x) + a 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 <= -6.4e+65) tmp = t_1; elseif (b <= 4.6e+79) 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 = (t - 2.0) * b; tmp = 0.0; if (b <= -6.4e+65) tmp = t_1; elseif (b <= 4.6e+79) 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[(t - 2.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -6.4e+65], t$95$1, If[LessEqual[b, 4.6e+79], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t - 2\right) \cdot b\\
\mathbf{if}\;b \leq -6.4 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{+79}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.40000000000000014e65 or 4.6000000000000001e79 < b Initial program 87.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6473.6
Applied rewrites73.6%
Taylor expanded in y around 0
Applied rewrites48.6%
if -6.40000000000000014e65 < b < 4.6000000000000001e79Initial program 98.0%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites74.2%
Taylor expanded in y around 0
Applied rewrites47.6%
Taylor expanded in b around 0
Applied rewrites46.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.05e+51) (* b t) (if (<= t 1.05e+84) (+ (+ z x) a) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+51) {
tmp = b * t;
} else if (t <= 1.05e+84) {
tmp = (z + x) + a;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.05d+51)) then
tmp = b * t
else if (t <= 1.05d+84) then
tmp = (z + x) + a
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+51) {
tmp = b * t;
} else if (t <= 1.05e+84) {
tmp = (z + x) + a;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.05e+51: tmp = b * t elif t <= 1.05e+84: tmp = (z + x) + a else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.05e+51) tmp = Float64(b * t); elseif (t <= 1.05e+84) tmp = Float64(Float64(z + x) + a); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.05e+51) tmp = b * t; elseif (t <= 1.05e+84) tmp = (z + x) + a; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.05e+51], N[(b * t), $MachinePrecision], If[LessEqual[t, 1.05e+84], N[(N[(z + x), $MachinePrecision] + a), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+51}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+84}:\\
\;\;\;\;\left(z + x\right) + a\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -2.05000000000000005e51 or 1.05000000000000009e84 < t Initial program 89.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6450.4
Applied rewrites50.4%
Taylor expanded in t around inf
Applied rewrites43.0%
if -2.05000000000000005e51 < t < 1.05000000000000009e84Initial program 96.2%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites88.9%
Taylor expanded in y around 0
Applied rewrites57.4%
Taylor expanded in b around 0
Applied rewrites46.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.05e+51) (* b t) (if (<= t 5.7e+44) (+ a x) (* b t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+51) {
tmp = b * t;
} else if (t <= 5.7e+44) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.05d+51)) then
tmp = b * t
else if (t <= 5.7d+44) then
tmp = a + x
else
tmp = b * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+51) {
tmp = b * t;
} else if (t <= 5.7e+44) {
tmp = a + x;
} else {
tmp = b * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.05e+51: tmp = b * t elif t <= 5.7e+44: tmp = a + x else: tmp = b * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.05e+51) tmp = Float64(b * t); elseif (t <= 5.7e+44) tmp = Float64(a + x); else tmp = Float64(b * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.05e+51) tmp = b * t; elseif (t <= 5.7e+44) tmp = a + x; else tmp = b * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.05e+51], N[(b * t), $MachinePrecision], If[LessEqual[t, 5.7e+44], N[(a + x), $MachinePrecision], N[(b * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+51}:\\
\;\;\;\;b \cdot t\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{+44}:\\
\;\;\;\;a + x\\
\mathbf{else}:\\
\;\;\;\;b \cdot t\\
\end{array}
\end{array}
if t < -2.05000000000000005e51 or 5.7000000000000003e44 < t Initial program 89.8%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f6447.5
Applied rewrites47.5%
Taylor expanded in t around inf
Applied rewrites40.8%
if -2.05000000000000005e51 < t < 5.7000000000000003e44Initial program 96.6%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites93.2%
Taylor expanded in z around 0
Applied rewrites65.4%
Taylor expanded in b around 0
Applied rewrites38.1%
(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 93.7%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-commutativeN/A
neg-mul-1N/A
sub-negN/A
lower--.f64N/A
lower-+.f64N/A
Applied rewrites68.8%
Taylor expanded in z around 0
Applied rewrites46.5%
Taylor expanded in b around 0
Applied rewrites25.4%
herbie shell --seed 2024270
(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)))