
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (+ x (* z (- 1.0 y))) (* a (- 1.0 t))) (* (- (+ y t) 2.0) b))))
(if (<= t_1 INFINITY) t_1 (+ a (* y (- b z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = a + (y * (b - z));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = a + (y * (b - z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = a + (y * (b - z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * Float64(1.0 - y))) + Float64(a * Float64(1.0 - t))) + Float64(Float64(Float64(y + t) - 2.0) * b)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(a + Float64(y * Float64(b - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * (1.0 - y))) + (a * (1.0 - t))) + (((y + t) - 2.0) * b); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = a + (y * (b - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(a + N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + \left(\left(y + t\right) - 2\right) \cdot b\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot \left(b - z\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in x around 0
Applied rewrites57.1%
Taylor expanded in y around inf
Applied rewrites72.1%
Final simplification98.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (fma z (- 1.0 y) x))) (t_2 (* t (- b a))))
(if (<= t -8.6e+100)
t_2
(if (<= t -1.75e-291)
t_1
(if (<= t 3.8e-188)
(fma b (+ y -2.0) (fma (- z) y z))
(if (<= t 1.35e-99)
(fma b (+ y -2.0) (+ x a))
(if (<= t 1.25e+69) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + fma(z, (1.0 - y), x);
double t_2 = t * (b - a);
double tmp;
if (t <= -8.6e+100) {
tmp = t_2;
} else if (t <= -1.75e-291) {
tmp = t_1;
} else if (t <= 3.8e-188) {
tmp = fma(b, (y + -2.0), fma(-z, y, z));
} else if (t <= 1.35e-99) {
tmp = fma(b, (y + -2.0), (x + a));
} else if (t <= 1.25e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a + fma(z, Float64(1.0 - y), x)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -8.6e+100) tmp = t_2; elseif (t <= -1.75e-291) tmp = t_1; elseif (t <= 3.8e-188) tmp = fma(b, Float64(y + -2.0), fma(Float64(-z), y, z)); elseif (t <= 1.35e-99) tmp = fma(b, Float64(y + -2.0), Float64(x + a)); elseif (t <= 1.25e+69) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e+100], t$95$2, If[LessEqual[t, -1.75e-291], t$95$1, If[LessEqual[t, 3.8e-188], N[(b * N[(y + -2.0), $MachinePrecision] + N[((-z) * y + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-99], N[(b * N[(y + -2.0), $MachinePrecision] + N[(x + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+69], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \mathsf{fma}\left(z, 1 - y, x\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-188}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, \mathsf{fma}\left(-z, y, z\right)\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-99}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, x + a\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.59999999999999986e100 or 1.25000000000000009e69 < t Initial program 94.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6474.8
Applied rewrites74.8%
if -8.59999999999999986e100 < t < -1.74999999999999998e-291 or 1.35e-99 < t < 1.25000000000000009e69Initial program 96.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites95.0%
Taylor expanded in b around 0
Applied rewrites77.0%
if -1.74999999999999998e-291 < t < 3.8e-188Initial program 96.6%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in z around inf
Applied rewrites80.2%
Applied rewrites80.3%
if 3.8e-188 < t < 1.35e-99Initial program 83.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites83.3%
Taylor expanded in z around 0
Applied rewrites87.1%
Final simplification77.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (fma z (- 1.0 y) x))) (t_2 (* t (- b a))))
(if (<= t -8.6e+100)
t_2
(if (<= t -1.75e-291)
t_1
(if (<= t 3.8e-188)
(fma b (+ y -2.0) (- z (* y z)))
(if (<= t 1.35e-99)
(fma b (+ y -2.0) (+ x a))
(if (<= t 1.25e+69) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + fma(z, (1.0 - y), x);
double t_2 = t * (b - a);
double tmp;
if (t <= -8.6e+100) {
tmp = t_2;
} else if (t <= -1.75e-291) {
tmp = t_1;
} else if (t <= 3.8e-188) {
tmp = fma(b, (y + -2.0), (z - (y * z)));
} else if (t <= 1.35e-99) {
tmp = fma(b, (y + -2.0), (x + a));
} else if (t <= 1.25e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a + fma(z, Float64(1.0 - y), x)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -8.6e+100) tmp = t_2; elseif (t <= -1.75e-291) tmp = t_1; elseif (t <= 3.8e-188) tmp = fma(b, Float64(y + -2.0), Float64(z - Float64(y * z))); elseif (t <= 1.35e-99) tmp = fma(b, Float64(y + -2.0), Float64(x + a)); elseif (t <= 1.25e+69) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e+100], t$95$2, If[LessEqual[t, -1.75e-291], t$95$1, If[LessEqual[t, 3.8e-188], N[(b * N[(y + -2.0), $MachinePrecision] + N[(z - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-99], N[(b * N[(y + -2.0), $MachinePrecision] + N[(x + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+69], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \mathsf{fma}\left(z, 1 - y, x\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-188}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, z - y \cdot z\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-99}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, x + a\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.59999999999999986e100 or 1.25000000000000009e69 < t Initial program 94.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6474.8
Applied rewrites74.8%
if -8.59999999999999986e100 < t < -1.74999999999999998e-291 or 1.35e-99 < t < 1.25000000000000009e69Initial program 96.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites95.0%
Taylor expanded in b around 0
Applied rewrites77.0%
if -1.74999999999999998e-291 < t < 3.8e-188Initial program 96.6%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in z around inf
Applied rewrites80.2%
if 3.8e-188 < t < 1.35e-99Initial program 83.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites83.3%
Taylor expanded in z around 0
Applied rewrites87.1%
Final simplification77.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (* y (- b z)))) (t_2 (* t (- b a))))
(if (<= t -1.4e+94)
t_2
(if (<= t -7.5e-109)
t_1
(if (<= t 2e-177)
(fma z (- 1.0 y) x)
(if (<= t 1.52e-124)
(* b (+ y (+ t -2.0)))
(if (<= t 5.6e+67) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (y * (b - z));
double t_2 = t * (b - a);
double tmp;
if (t <= -1.4e+94) {
tmp = t_2;
} else if (t <= -7.5e-109) {
tmp = t_1;
} else if (t <= 2e-177) {
tmp = fma(z, (1.0 - y), x);
} else if (t <= 1.52e-124) {
tmp = b * (y + (t + -2.0));
} else if (t <= 5.6e+67) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(y * Float64(b - z))) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1.4e+94) tmp = t_2; elseif (t <= -7.5e-109) tmp = t_1; elseif (t <= 2e-177) tmp = fma(z, Float64(1.0 - y), x); elseif (t <= 1.52e-124) tmp = Float64(b * Float64(y + Float64(t + -2.0))); elseif (t <= 5.6e+67) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e+94], t$95$2, If[LessEqual[t, -7.5e-109], t$95$1, If[LessEqual[t, 2e-177], N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.52e-124], N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+67], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + y \cdot \left(b - z\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{+94}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-177}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{elif}\;t \leq 1.52 \cdot 10^{-124}:\\
\;\;\;\;b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.39999999999999999e94 or 5.5999999999999995e67 < t Initial program 94.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6473.4
Applied rewrites73.4%
if -1.39999999999999999e94 < t < -7.49999999999999982e-109 or 1.52e-124 < t < 5.5999999999999995e67Initial program 95.9%
Taylor expanded in x around 0
Applied rewrites98.6%
Taylor expanded in y around inf
Applied rewrites67.3%
if -7.49999999999999982e-109 < t < 1.9999999999999999e-177Initial program 94.2%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-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
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites77.7%
Taylor expanded in a around 0
Applied rewrites64.0%
if 1.9999999999999999e-177 < t < 1.52e-124Initial program 90.9%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval77.0
Applied rewrites77.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (fma z (- 1.0 y) x))) (t_2 (* t (- b a))))
(if (<= t -8.6e+100)
t_2
(if (<= t 1e-179)
t_1
(if (<= t 1.35e-99)
(fma b (+ y -2.0) (+ x a))
(if (<= t 1.25e+69) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + fma(z, (1.0 - y), x);
double t_2 = t * (b - a);
double tmp;
if (t <= -8.6e+100) {
tmp = t_2;
} else if (t <= 1e-179) {
tmp = t_1;
} else if (t <= 1.35e-99) {
tmp = fma(b, (y + -2.0), (x + a));
} else if (t <= 1.25e+69) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a + fma(z, Float64(1.0 - y), x)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -8.6e+100) tmp = t_2; elseif (t <= 1e-179) tmp = t_1; elseif (t <= 1.35e-99) tmp = fma(b, Float64(y + -2.0), Float64(x + a)); elseif (t <= 1.25e+69) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e+100], t$95$2, If[LessEqual[t, 1e-179], t$95$1, If[LessEqual[t, 1.35e-99], N[(b * N[(y + -2.0), $MachinePrecision] + N[(x + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+69], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \mathsf{fma}\left(z, 1 - y, x\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 10^{-179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-99}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, x + a\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.59999999999999986e100 or 1.25000000000000009e69 < t Initial program 94.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6474.8
Applied rewrites74.8%
if -8.59999999999999986e100 < t < 1e-179 or 1.35e-99 < t < 1.25000000000000009e69Initial program 96.4%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites96.1%
Taylor expanded in b around 0
Applied rewrites74.2%
if 1e-179 < t < 1.35e-99Initial program 81.3%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites81.3%
Taylor expanded in z around 0
Applied rewrites91.3%
Final simplification75.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma z (- 1.0 y) x)))
(if (<= t -8.6e+100)
(* t (- b a))
(if (<= t 2.65e+79) (fma b (+ y -2.0) (+ a t_1)) (fma a (- 1.0 t) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma(z, (1.0 - y), x);
double tmp;
if (t <= -8.6e+100) {
tmp = t * (b - a);
} else if (t <= 2.65e+79) {
tmp = fma(b, (y + -2.0), (a + t_1));
} else {
tmp = fma(a, (1.0 - t), t_1);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(z, Float64(1.0 - y), x) tmp = 0.0 if (t <= -8.6e+100) tmp = Float64(t * Float64(b - a)); elseif (t <= 2.65e+79) tmp = fma(b, Float64(y + -2.0), Float64(a + t_1)); else tmp = fma(a, Float64(1.0 - t), t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -8.6e+100], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.65e+79], N[(b * N[(y + -2.0), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 - t), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+100}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(b, y + -2, a + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, t\_1\right)\\
\end{array}
\end{array}
if t < -8.59999999999999986e100Initial program 94.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6478.4
Applied rewrites78.4%
if -8.59999999999999986e100 < t < 2.64999999999999989e79Initial program 94.9%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites94.0%
if 2.64999999999999989e79 < t Initial program 93.2%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-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
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites73.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -8.6e+100)
(* t (- b a))
(if (<= t 2.65e+79)
(+ a (fma z (- 1.0 y) (fma b (+ y -2.0) x)))
(fma a (- 1.0 t) (fma z (- 1.0 y) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -8.6e+100) {
tmp = t * (b - a);
} else if (t <= 2.65e+79) {
tmp = a + fma(z, (1.0 - y), fma(b, (y + -2.0), x));
} else {
tmp = fma(a, (1.0 - t), fma(z, (1.0 - y), x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -8.6e+100) tmp = Float64(t * Float64(b - a)); elseif (t <= 2.65e+79) tmp = Float64(a + fma(z, Float64(1.0 - y), fma(b, Float64(y + -2.0), x))); else tmp = fma(a, Float64(1.0 - t), fma(z, Float64(1.0 - y), x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -8.6e+100], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.65e+79], N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + N[(b * N[(y + -2.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 - t), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+100}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{+79}:\\
\;\;\;\;a + \mathsf{fma}\left(z, 1 - y, \mathsf{fma}\left(b, y + -2, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)\\
\end{array}
\end{array}
if t < -8.59999999999999986e100Initial program 94.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6478.4
Applied rewrites78.4%
if -8.59999999999999986e100 < t < 2.64999999999999989e79Initial program 94.9%
Taylor expanded in x around 0
Applied rewrites96.8%
Taylor expanded in t around 0
Applied rewrites92.8%
if 2.64999999999999989e79 < t Initial program 93.2%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-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
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites73.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -8.6e+100)
t_1
(if (<= t 2e-177)
(fma z (- 1.0 y) x)
(if (<= t 8.2e-109)
(* b (+ y -2.0))
(if (<= t 5.6e+67) (* y (- b z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -8.6e+100) {
tmp = t_1;
} else if (t <= 2e-177) {
tmp = fma(z, (1.0 - y), x);
} else if (t <= 8.2e-109) {
tmp = b * (y + -2.0);
} else if (t <= 5.6e+67) {
tmp = y * (b - z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -8.6e+100) tmp = t_1; elseif (t <= 2e-177) tmp = fma(z, Float64(1.0 - y), x); elseif (t <= 8.2e-109) tmp = Float64(b * Float64(y + -2.0)); elseif (t <= 5.6e+67) tmp = Float64(y * Float64(b - z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e+100], t$95$1, If[LessEqual[t, 2e-177], N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 8.2e-109], N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+67], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-177}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-109}:\\
\;\;\;\;b \cdot \left(y + -2\right)\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+67}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.59999999999999986e100 or 5.5999999999999995e67 < t Initial program 94.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6474.1
Applied rewrites74.1%
if -8.59999999999999986e100 < t < 1.9999999999999999e-177Initial program 96.3%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-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
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites77.4%
Taylor expanded in a around 0
Applied rewrites59.2%
if 1.9999999999999999e-177 < t < 8.2000000000000004e-109Initial program 85.7%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval75.3
Applied rewrites75.3%
Taylor expanded in t around 0
Applied rewrites75.3%
if 8.2000000000000004e-109 < t < 5.5999999999999995e67Initial program 93.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6456.5
Applied rewrites56.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -3.6e+84)
t_1
(if (<= t 1e-179)
(- z (* y z))
(if (<= t 8.2e-109)
(* b (+ y -2.0))
(if (<= t 5.6e+67) (* y (- b z)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -3.6e+84) {
tmp = t_1;
} else if (t <= 1e-179) {
tmp = z - (y * z);
} else if (t <= 8.2e-109) {
tmp = b * (y + -2.0);
} else if (t <= 5.6e+67) {
tmp = y * (b - 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 = t * (b - a)
if (t <= (-3.6d+84)) then
tmp = t_1
else if (t <= 1d-179) then
tmp = z - (y * z)
else if (t <= 8.2d-109) then
tmp = b * (y + (-2.0d0))
else if (t <= 5.6d+67) then
tmp = y * (b - 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 = t * (b - a);
double tmp;
if (t <= -3.6e+84) {
tmp = t_1;
} else if (t <= 1e-179) {
tmp = z - (y * z);
} else if (t <= 8.2e-109) {
tmp = b * (y + -2.0);
} else if (t <= 5.6e+67) {
tmp = y * (b - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -3.6e+84: tmp = t_1 elif t <= 1e-179: tmp = z - (y * z) elif t <= 8.2e-109: tmp = b * (y + -2.0) elif t <= 5.6e+67: tmp = y * (b - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -3.6e+84) tmp = t_1; elseif (t <= 1e-179) tmp = Float64(z - Float64(y * z)); elseif (t <= 8.2e-109) tmp = Float64(b * Float64(y + -2.0)); elseif (t <= 5.6e+67) tmp = Float64(y * Float64(b - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -3.6e+84) tmp = t_1; elseif (t <= 1e-179) tmp = z - (y * z); elseif (t <= 8.2e-109) tmp = b * (y + -2.0); elseif (t <= 5.6e+67) tmp = y * (b - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e+84], t$95$1, If[LessEqual[t, 1e-179], N[(z - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e-109], N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+67], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10^{-179}:\\
\;\;\;\;z - y \cdot z\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-109}:\\
\;\;\;\;b \cdot \left(y + -2\right)\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+67}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.5999999999999999e84 or 5.5999999999999995e67 < t Initial program 94.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6473.0
Applied rewrites73.0%
if -3.5999999999999999e84 < t < 1e-179Initial program 96.2%
Taylor expanded in z around inf
sub-negN/A
neg-mul-1N/A
distribute-rgt-inN/A
*-lft-identityN/A
associate-*r*N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-*.f6443.2
Applied rewrites43.2%
if 1e-179 < t < 8.2000000000000004e-109Initial program 85.7%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval75.3
Applied rewrites75.3%
Taylor expanded in t around 0
Applied rewrites75.3%
if 8.2000000000000004e-109 < t < 5.5999999999999995e67Initial program 93.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6456.5
Applied rewrites56.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (+ y (+ t -2.0)))))
(if (<= b -2.4e+97)
t_1
(if (<= b 5.2e+120) (fma a (- 1.0 t) (fma z (- 1.0 y) 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.4e+97) {
tmp = t_1;
} else if (b <= 5.2e+120) {
tmp = fma(a, (1.0 - t), fma(z, (1.0 - y), x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y + Float64(t + -2.0))) tmp = 0.0 if (b <= -2.4e+97) tmp = t_1; elseif (b <= 5.2e+120) tmp = fma(a, Float64(1.0 - t), fma(z, Float64(1.0 - y), x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.4e+97], t$95$1, If[LessEqual[b, 5.2e+120], N[(a * N[(1.0 - t), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{if}\;b \leq -2.4 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{+120}:\\
\;\;\;\;\mathsf{fma}\left(a, 1 - t, \mathsf{fma}\left(z, 1 - y, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.4e97 or 5.1999999999999998e120 < b Initial program 87.6%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval83.4
Applied rewrites83.4%
if -2.4e97 < b < 5.1999999999999998e120Initial program 97.7%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-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
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites86.7%
(FPCore (x y z t a b) :precision binary64 (+ a (fma z (- 1.0 y) (fma t (- b a) (fma b (+ y -2.0) x)))))
double code(double x, double y, double z, double t, double a, double b) {
return a + fma(z, (1.0 - y), fma(t, (b - a), fma(b, (y + -2.0), x)));
}
function code(x, y, z, t, a, b) return Float64(a + fma(z, Float64(1.0 - y), fma(t, Float64(b - a), fma(b, Float64(y + -2.0), x)))) end
code[x_, y_, z_, t_, a_, b_] := N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + N[(t * N[(b - a), $MachinePrecision] + N[(b * N[(y + -2.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \mathsf{fma}\left(z, 1 - y, \mathsf{fma}\left(t, b - a, \mathsf{fma}\left(b, y + -2, x\right)\right)\right)
\end{array}
Initial program 94.5%
Taylor expanded in x around 0
Applied rewrites96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -3.6e+84)
t_1
(if (<= t 7.2e-304)
(* y (- z))
(if (<= t 4.9e+64) (* b (+ y -2.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -3.6e+84) {
tmp = t_1;
} else if (t <= 7.2e-304) {
tmp = y * -z;
} else if (t <= 4.9e+64) {
tmp = b * (y + -2.0);
} 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 * (b - a)
if (t <= (-3.6d+84)) then
tmp = t_1
else if (t <= 7.2d-304) then
tmp = y * -z
else if (t <= 4.9d+64) then
tmp = b * (y + (-2.0d0))
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 * (b - a);
double tmp;
if (t <= -3.6e+84) {
tmp = t_1;
} else if (t <= 7.2e-304) {
tmp = y * -z;
} else if (t <= 4.9e+64) {
tmp = b * (y + -2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -3.6e+84: tmp = t_1 elif t <= 7.2e-304: tmp = y * -z elif t <= 4.9e+64: tmp = b * (y + -2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -3.6e+84) tmp = t_1; elseif (t <= 7.2e-304) tmp = Float64(y * Float64(-z)); elseif (t <= 4.9e+64) tmp = Float64(b * Float64(y + -2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -3.6e+84) tmp = t_1; elseif (t <= 7.2e-304) tmp = y * -z; elseif (t <= 4.9e+64) tmp = b * (y + -2.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e+84], t$95$1, If[LessEqual[t, 7.2e-304], N[(y * (-z)), $MachinePrecision], If[LessEqual[t, 4.9e+64], N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-304}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+64}:\\
\;\;\;\;b \cdot \left(y + -2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.5999999999999999e84 or 4.9000000000000003e64 < t Initial program 94.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6473.0
Applied rewrites73.0%
if -3.5999999999999999e84 < t < 7.2000000000000003e-304Initial program 94.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6439.8
Applied rewrites39.8%
Taylor expanded in b around 0
Applied rewrites29.9%
if 7.2000000000000003e-304 < t < 4.9000000000000003e64Initial program 94.7%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval41.1
Applied rewrites41.1%
Taylor expanded in t around 0
Applied rewrites40.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- a))))
(if (<= t -3.65e+205)
t_1
(if (<= t -9e+100) (* t b) (if (<= t 1e+38) (* y (- z)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * -a;
double tmp;
if (t <= -3.65e+205) {
tmp = t_1;
} else if (t <= -9e+100) {
tmp = t * b;
} else if (t <= 1e+38) {
tmp = 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 = t * -a
if (t <= (-3.65d+205)) then
tmp = t_1
else if (t <= (-9d+100)) then
tmp = t * b
else if (t <= 1d+38) then
tmp = 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 = t * -a;
double tmp;
if (t <= -3.65e+205) {
tmp = t_1;
} else if (t <= -9e+100) {
tmp = t * b;
} else if (t <= 1e+38) {
tmp = y * -z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * -a tmp = 0 if t <= -3.65e+205: tmp = t_1 elif t <= -9e+100: tmp = t * b elif t <= 1e+38: tmp = y * -z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(-a)) tmp = 0.0 if (t <= -3.65e+205) tmp = t_1; elseif (t <= -9e+100) tmp = Float64(t * b); elseif (t <= 1e+38) tmp = Float64(y * Float64(-z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * -a; tmp = 0.0; if (t <= -3.65e+205) tmp = t_1; elseif (t <= -9e+100) tmp = t * b; elseif (t <= 1e+38) tmp = y * -z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[t, -3.65e+205], t$95$1, If[LessEqual[t, -9e+100], N[(t * b), $MachinePrecision], If[LessEqual[t, 1e+38], N[(y * (-z)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-a\right)\\
\mathbf{if}\;t \leq -3.65 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9 \cdot 10^{+100}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq 10^{+38}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.64999999999999991e205 or 9.99999999999999977e37 < t Initial program 94.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6469.9
Applied rewrites69.9%
Taylor expanded in b around 0
Applied rewrites45.4%
if -3.64999999999999991e205 < t < -9.00000000000000073e100Initial program 92.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6481.2
Applied rewrites81.2%
Taylor expanded in b around inf
Applied rewrites62.6%
if -9.00000000000000073e100 < t < 9.99999999999999977e37Initial program 94.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6442.8
Applied rewrites42.8%
Taylor expanded in b around 0
Applied rewrites28.2%
Final simplification36.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- a))))
(if (<= t -3.65e+205)
t_1
(if (<= t -5e+84) (* t b) (if (<= t 7.2e+91) (* y b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * -a;
double tmp;
if (t <= -3.65e+205) {
tmp = t_1;
} else if (t <= -5e+84) {
tmp = t * b;
} else if (t <= 7.2e+91) {
tmp = y * b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = t * -a
if (t <= (-3.65d+205)) then
tmp = t_1
else if (t <= (-5d+84)) then
tmp = t * b
else if (t <= 7.2d+91) then
tmp = y * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * -a;
double tmp;
if (t <= -3.65e+205) {
tmp = t_1;
} else if (t <= -5e+84) {
tmp = t * b;
} else if (t <= 7.2e+91) {
tmp = y * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * -a tmp = 0 if t <= -3.65e+205: tmp = t_1 elif t <= -5e+84: tmp = t * b elif t <= 7.2e+91: tmp = y * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(-a)) tmp = 0.0 if (t <= -3.65e+205) tmp = t_1; elseif (t <= -5e+84) tmp = Float64(t * b); elseif (t <= 7.2e+91) tmp = Float64(y * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * -a; tmp = 0.0; if (t <= -3.65e+205) tmp = t_1; elseif (t <= -5e+84) tmp = t * b; elseif (t <= 7.2e+91) tmp = y * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * (-a)), $MachinePrecision]}, If[LessEqual[t, -3.65e+205], t$95$1, If[LessEqual[t, -5e+84], N[(t * b), $MachinePrecision], If[LessEqual[t, 7.2e+91], N[(y * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(-a\right)\\
\mathbf{if}\;t \leq -3.65 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{+84}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+91}:\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.64999999999999991e205 or 7.2e91 < t Initial program 94.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6471.9
Applied rewrites71.9%
Taylor expanded in b around 0
Applied rewrites48.9%
if -3.64999999999999991e205 < t < -5.0000000000000001e84Initial program 93.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6476.6
Applied rewrites76.6%
Taylor expanded in b around inf
Applied rewrites56.4%
if -5.0000000000000001e84 < t < 7.2e91Initial program 94.9%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval33.0
Applied rewrites33.0%
Taylor expanded in y around inf
Applied rewrites20.9%
Final simplification32.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (+ y (+ t -2.0)))))
(if (<= b -2.4e+97)
t_1
(if (<= b 4.6e+120) (+ a (fma z (- 1.0 y) 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.4e+97) {
tmp = t_1;
} else if (b <= 4.6e+120) {
tmp = a + fma(z, (1.0 - y), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y + Float64(t + -2.0))) tmp = 0.0 if (b <= -2.4e+97) tmp = t_1; elseif (b <= 4.6e+120) tmp = Float64(a + fma(z, Float64(1.0 - y), x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.4e+97], t$95$1, If[LessEqual[b, 4.6e+120], N[(a + N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{if}\;b \leq -2.4 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{+120}:\\
\;\;\;\;a + \mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.4e97 or 4.59999999999999985e120 < b Initial program 87.6%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval83.4
Applied rewrites83.4%
if -2.4e97 < b < 4.59999999999999985e120Initial program 97.7%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites72.7%
Taylor expanded in b around 0
Applied rewrites67.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (* y (- b z)))))
(if (<= y -5.8e+28)
t_1
(if (<= y 1.25e+25) (+ a (+ x (fma b -2.0 z))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (y * (b - z));
double tmp;
if (y <= -5.8e+28) {
tmp = t_1;
} else if (y <= 1.25e+25) {
tmp = a + (x + fma(b, -2.0, z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(y * Float64(b - z))) tmp = 0.0 if (y <= -5.8e+28) tmp = t_1; elseif (y <= 1.25e+25) tmp = Float64(a + Float64(x + fma(b, -2.0, z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e+28], t$95$1, If[LessEqual[y, 1.25e+25], N[(a + N[(x + N[(b * -2.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+25}:\\
\;\;\;\;a + \left(x + \mathsf{fma}\left(b, -2, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.8000000000000002e28 or 1.25000000000000006e25 < y Initial program 91.4%
Taylor expanded in x around 0
Applied rewrites92.2%
Taylor expanded in y around inf
Applied rewrites77.8%
if -5.8000000000000002e28 < y < 1.25000000000000006e25Initial program 97.1%
Taylor expanded in t around 0
+-commutativeN/A
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-evalN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
associate-+l+N/A
+-commutativeN/A
sub-negN/A
lower-+.f64N/A
sub-negN/A
+-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites64.3%
Taylor expanded in y around 0
Applied rewrites61.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (+ y (+ t -2.0))))) (if (<= b -2.05e+52) t_1 (if (<= b 3.6e+24) (fma z (- 1.0 y) 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.05e+52) {
tmp = t_1;
} else if (b <= 3.6e+24) {
tmp = fma(z, (1.0 - y), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y + Float64(t + -2.0))) tmp = 0.0 if (b <= -2.05e+52) tmp = t_1; elseif (b <= 3.6e+24) tmp = fma(z, Float64(1.0 - y), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.05e+52], t$95$1, If[LessEqual[b, 3.6e+24], N[(z * N[(1.0 - y), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y + \left(t + -2\right)\right)\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(z, 1 - y, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.05e52 or 3.59999999999999983e24 < b Initial program 88.3%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval74.1
Applied rewrites74.1%
if -2.05e52 < b < 3.59999999999999983e24Initial program 98.7%
Taylor expanded in b around 0
associate--r+N/A
sub-negN/A
+-commutativeN/A
associate-+r-N/A
distribute-rgt-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
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites90.2%
Taylor expanded in a around 0
Applied rewrites57.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* t (- b a)))) (if (<= t -1.7e+86) t_1 (if (<= t 5.6e+67) (* y (- b z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -1.7e+86) {
tmp = t_1;
} else if (t <= 5.6e+67) {
tmp = y * (b - 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 = t * (b - a)
if (t <= (-1.7d+86)) then
tmp = t_1
else if (t <= 5.6d+67) then
tmp = y * (b - 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 = t * (b - a);
double tmp;
if (t <= -1.7e+86) {
tmp = t_1;
} else if (t <= 5.6e+67) {
tmp = y * (b - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -1.7e+86: tmp = t_1 elif t <= 5.6e+67: tmp = y * (b - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1.7e+86) tmp = t_1; elseif (t <= 5.6e+67) tmp = Float64(y * Float64(b - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -1.7e+86) tmp = t_1; elseif (t <= 5.6e+67) tmp = y * (b - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+86], t$95$1, If[LessEqual[t, 5.6e+67], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+67}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.6999999999999999e86 or 5.5999999999999995e67 < t Initial program 94.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6473.0
Applied rewrites73.0%
if -1.6999999999999999e86 < t < 5.5999999999999995e67Initial program 94.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6443.7
Applied rewrites43.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* y (- z)))) (if (<= z -4.5e+97) t_1 (if (<= z 2.75e+110) (* b (+ t -2.0)) 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 <= -4.5e+97) {
tmp = t_1;
} else if (z <= 2.75e+110) {
tmp = b * (t + -2.0);
} 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 <= (-4.5d+97)) then
tmp = t_1
else if (z <= 2.75d+110) then
tmp = b * (t + (-2.0d0))
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 <= -4.5e+97) {
tmp = t_1;
} else if (z <= 2.75e+110) {
tmp = b * (t + -2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * -z tmp = 0 if z <= -4.5e+97: tmp = t_1 elif z <= 2.75e+110: tmp = b * (t + -2.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(-z)) tmp = 0.0 if (z <= -4.5e+97) tmp = t_1; elseif (z <= 2.75e+110) tmp = Float64(b * Float64(t + -2.0)); 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 <= -4.5e+97) tmp = t_1; elseif (z <= 2.75e+110) tmp = b * (t + -2.0); 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, -4.5e+97], t$95$1, If[LessEqual[z, 2.75e+110], N[(b * N[(t + -2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{+110}:\\
\;\;\;\;b \cdot \left(t + -2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.49999999999999976e97 or 2.74999999999999998e110 < z Initial program 88.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6457.3
Applied rewrites57.3%
Taylor expanded in b around 0
Applied rewrites53.0%
if -4.49999999999999976e97 < z < 2.74999999999999998e110Initial program 97.6%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval46.9
Applied rewrites46.9%
Taylor expanded in y around 0
Applied rewrites32.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5e+84) (* t b) (if (<= t 6.8e+65) (* y b) (* t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5e+84) {
tmp = t * b;
} else if (t <= 6.8e+65) {
tmp = y * b;
} else {
tmp = t * 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 (t <= (-5d+84)) then
tmp = t * b
else if (t <= 6.8d+65) then
tmp = y * b
else
tmp = t * 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 (t <= -5e+84) {
tmp = t * b;
} else if (t <= 6.8e+65) {
tmp = y * b;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5e+84: tmp = t * b elif t <= 6.8e+65: tmp = y * b else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5e+84) tmp = Float64(t * b); elseif (t <= 6.8e+65) tmp = Float64(y * b); else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5e+84) tmp = t * b; elseif (t <= 6.8e+65) tmp = y * b; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5e+84], N[(t * b), $MachinePrecision], If[LessEqual[t, 6.8e+65], N[(y * b), $MachinePrecision], N[(t * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+84}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+65}:\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if t < -5.0000000000000001e84 or 6.7999999999999999e65 < t Initial program 94.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f6473.0
Applied rewrites73.0%
Taylor expanded in b around inf
Applied rewrites42.0%
if -5.0000000000000001e84 < t < 6.7999999999999999e65Initial program 94.7%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval32.3
Applied rewrites32.3%
Taylor expanded in y around inf
Applied rewrites21.0%
Final simplification29.5%
(FPCore (x y z t a b) :precision binary64 (* y b))
double code(double x, double y, double z, double t, double a, double b) {
return y * 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 = y * b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return y * b;
}
def code(x, y, z, t, a, b): return y * b
function code(x, y, z, t, a, b) return Float64(y * b) end
function tmp = code(x, y, z, t, a, b) tmp = y * b; end
code[x_, y_, z_, t_, a_, b_] := N[(y * b), $MachinePrecision]
\begin{array}{l}
\\
y \cdot b
\end{array}
Initial program 94.5%
Taylor expanded in b around inf
lower-*.f64N/A
+-commutativeN/A
associate-+r-N/A
lower-+.f64N/A
sub-negN/A
lower-+.f64N/A
metadata-eval37.3
Applied rewrites37.3%
Taylor expanded in y around inf
Applied rewrites16.4%
Final simplification16.4%
herbie shell --seed 2024238
(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)))