
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (+ (fma x (log y) z) (+ t a)) (+ (* y i) (* (log c) (+ b -0.5)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (fma(x, log(y), z) + (t + a)) + ((y * i) + (log(c) * (b + -0.5)));
}
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(fma(x, log(y), z) + Float64(t + a)) + Float64(Float64(y * i) + Float64(log(c) * Float64(b + -0.5)))) end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \left(y \cdot i + \log c \cdot \left(b + -0.5\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.45e+113)
(+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ t (* x (log y))))))
(if (<= x 2.3e+19)
(+ (* y i) (+ (+ t a) (+ z (* (log c) (+ b -0.5)))))
(+ (* y i) (fma x (log y) (+ z a))))))assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.45e+113) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (t + (x * log(y)))));
} else if (x <= 2.3e+19) {
tmp = (y * i) + ((t + a) + (z + (log(c) * (b + -0.5))));
} else {
tmp = (y * i) + fma(x, log(y), (z + a));
}
return tmp;
}
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.45e+113) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(x * log(y)))))); elseif (x <= 2.3e+19) tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + Float64(z + Float64(log(c) * Float64(b + -0.5))))); else tmp = Float64(Float64(y * i) + fma(x, log(y), Float64(z + a))); end return tmp end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.45e+113], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e+19], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+113}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + x \cdot \log y\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+19}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \left(z + \log c \cdot \left(b + -0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \mathsf{fma}\left(x, \log y, z + a\right)\\
\end{array}
\end{array}
if x < -1.44999999999999992e113Initial program 99.8%
Taylor expanded in x around inf 88.1%
if -1.44999999999999992e113 < x < 2.3e19Initial program 99.9%
Taylor expanded in x around 0 99.0%
associate-+r+99.0%
sub-neg99.0%
metadata-eval99.0%
+-commutative99.0%
Simplified99.0%
if 2.3e19 < x Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in t around 0 86.8%
associate-+r+86.8%
+-commutative86.8%
fma-def86.8%
Simplified86.8%
Final simplification94.7%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0)))
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5)));
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5)))
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5)))) end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.02e+85) (not (<= x 2.3e+19))) (+ (* y i) (fma x (log y) (+ z a))) (+ (* y i) (+ (+ t a) (+ z (* (log c) (+ b -0.5)))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.02e+85) || !(x <= 2.3e+19)) {
tmp = (y * i) + fma(x, log(y), (z + a));
} else {
tmp = (y * i) + ((t + a) + (z + (log(c) * (b + -0.5))));
}
return tmp;
}
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.02e+85) || !(x <= 2.3e+19)) tmp = Float64(Float64(y * i) + fma(x, log(y), Float64(z + a))); else tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + Float64(z + Float64(log(c) * Float64(b + -0.5))))); end return tmp end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.02e+85], N[Not[LessEqual[x, 2.3e+19]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+85} \lor \neg \left(x \leq 2.3 \cdot 10^{+19}\right):\\
\;\;\;\;y \cdot i + \mathsf{fma}\left(x, \log y, z + a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \left(z + \log c \cdot \left(b + -0.5\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.02e85 or 2.3e19 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around 0 83.6%
associate-+r+83.6%
+-commutative83.6%
fma-def83.6%
Simplified83.6%
if -1.02e85 < x < 2.3e19Initial program 99.9%
Taylor expanded in x around 0 99.6%
associate-+r+99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Final simplification93.2%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.5e+229) (not (<= x 9e+128))) (+ (* y i) (+ a (+ t (* x (log y))))) (+ (* y i) (+ (+ t a) (+ z (* (log c) (+ b -0.5)))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.5e+229) || !(x <= 9e+128)) {
tmp = (y * i) + (a + (t + (x * log(y))));
} else {
tmp = (y * i) + ((t + a) + (z + (log(c) * (b + -0.5))));
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.5d+229)) .or. (.not. (x <= 9d+128))) then
tmp = (y * i) + (a + (t + (x * log(y))))
else
tmp = (y * i) + ((t + a) + (z + (log(c) * (b + (-0.5d0)))))
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.5e+229) || !(x <= 9e+128)) {
tmp = (y * i) + (a + (t + (x * Math.log(y))));
} else {
tmp = (y * i) + ((t + a) + (z + (Math.log(c) * (b + -0.5))));
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.5e+229) or not (x <= 9e+128): tmp = (y * i) + (a + (t + (x * math.log(y)))) else: tmp = (y * i) + ((t + a) + (z + (math.log(c) * (b + -0.5)))) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.5e+229) || !(x <= 9e+128)) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + Float64(z + Float64(log(c) * Float64(b + -0.5))))); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -1.5e+229) || ~((x <= 9e+128)))
tmp = (y * i) + (a + (t + (x * log(y))));
else
tmp = (y * i) + ((t + a) + (z + (log(c) * (b + -0.5))));
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.5e+229], N[Not[LessEqual[x, 9e+128]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+229} \lor \neg \left(x \leq 9 \cdot 10^{+128}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(t + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \left(z + \log c \cdot \left(b + -0.5\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.49999999999999999e229 or 9.0000000000000003e128 < x Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 94.0%
*-commutative94.0%
Simplified94.0%
Taylor expanded in z around 0 91.9%
if -1.49999999999999999e229 < x < 9.0000000000000003e128Initial program 99.9%
Taylor expanded in x around 0 93.2%
associate-+r+93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
Simplified93.2%
Final simplification93.0%
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (+ a (+ t (* x (log y)))))))
(if (<= x -1.15e+113)
t_1
(if (<= x 2.1e-160)
(+ (* y i) (+ z (+ t a)))
(if (<= x 1.85e+19) (+ (+ t a) (+ z (* (log c) (- b 0.5)))) t_1)))))assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (a + (t + (x * log(y))));
double tmp;
if (x <= -1.15e+113) {
tmp = t_1;
} else if (x <= 2.1e-160) {
tmp = (y * i) + (z + (t + a));
} else if (x <= 1.85e+19) {
tmp = (t + a) + (z + (log(c) * (b - 0.5)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (y * i) + (a + (t + (x * log(y))))
if (x <= (-1.15d+113)) then
tmp = t_1
else if (x <= 2.1d-160) then
tmp = (y * i) + (z + (t + a))
else if (x <= 1.85d+19) then
tmp = (t + a) + (z + (log(c) * (b - 0.5d0)))
else
tmp = t_1
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (a + (t + (x * Math.log(y))));
double tmp;
if (x <= -1.15e+113) {
tmp = t_1;
} else if (x <= 2.1e-160) {
tmp = (y * i) + (z + (t + a));
} else if (x <= 1.85e+19) {
tmp = (t + a) + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = t_1;
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (a + (t + (x * math.log(y)))) tmp = 0 if x <= -1.15e+113: tmp = t_1 elif x <= 2.1e-160: tmp = (y * i) + (z + (t + a)) elif x <= 1.85e+19: tmp = (t + a) + (z + (math.log(c) * (b - 0.5))) else: tmp = t_1 return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(x * log(y))))) tmp = 0.0 if (x <= -1.15e+113) tmp = t_1; elseif (x <= 2.1e-160) tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); elseif (x <= 1.85e+19) tmp = Float64(Float64(t + a) + Float64(z + Float64(log(c) * Float64(b - 0.5)))); else tmp = t_1; end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = (y * i) + (a + (t + (x * log(y))));
tmp = 0.0;
if (x <= -1.15e+113)
tmp = t_1;
elseif (x <= 2.1e-160)
tmp = (y * i) + (z + (t + a));
elseif (x <= 1.85e+19)
tmp = (t + a) + (z + (log(c) * (b - 0.5)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+113], t$95$1, If[LessEqual[x, 2.1e-160], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+19], N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := y \cdot i + \left(a + \left(t + x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-160}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+19}:\\
\;\;\;\;\left(t + a\right) + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.14999999999999998e113 or 1.85e19 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in z around 0 81.0%
if -1.14999999999999998e113 < x < 2.1e-160Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in x around 0 88.7%
+-commutative88.7%
+-commutative88.7%
associate-+l+88.7%
+-commutative88.7%
Simplified88.7%
if 2.1e-160 < x < 1.85e19Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 98.4%
associate-+r+98.4%
+-commutative98.4%
sub-neg98.4%
metadata-eval98.4%
*-commutative98.4%
fma-udef98.4%
+-commutative98.4%
Simplified98.4%
Taylor expanded in y around 0 80.7%
Final simplification84.8%
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (+ a (+ t (* x (log y)))))))
(if (<= x -1.36e+113)
t_1
(if (<= x 2.4e-160)
(+ (+ t a) (+ z (+ (* y i) (* -0.5 (log c)))))
(if (<= x 2e+19) (+ (+ t a) (+ z (* (log c) (- b 0.5)))) t_1)))))assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (a + (t + (x * log(y))));
double tmp;
if (x <= -1.36e+113) {
tmp = t_1;
} else if (x <= 2.4e-160) {
tmp = (t + a) + (z + ((y * i) + (-0.5 * log(c))));
} else if (x <= 2e+19) {
tmp = (t + a) + (z + (log(c) * (b - 0.5)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (y * i) + (a + (t + (x * log(y))))
if (x <= (-1.36d+113)) then
tmp = t_1
else if (x <= 2.4d-160) then
tmp = (t + a) + (z + ((y * i) + ((-0.5d0) * log(c))))
else if (x <= 2d+19) then
tmp = (t + a) + (z + (log(c) * (b - 0.5d0)))
else
tmp = t_1
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (a + (t + (x * Math.log(y))));
double tmp;
if (x <= -1.36e+113) {
tmp = t_1;
} else if (x <= 2.4e-160) {
tmp = (t + a) + (z + ((y * i) + (-0.5 * Math.log(c))));
} else if (x <= 2e+19) {
tmp = (t + a) + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = t_1;
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (a + (t + (x * math.log(y)))) tmp = 0 if x <= -1.36e+113: tmp = t_1 elif x <= 2.4e-160: tmp = (t + a) + (z + ((y * i) + (-0.5 * math.log(c)))) elif x <= 2e+19: tmp = (t + a) + (z + (math.log(c) * (b - 0.5))) else: tmp = t_1 return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(x * log(y))))) tmp = 0.0 if (x <= -1.36e+113) tmp = t_1; elseif (x <= 2.4e-160) tmp = Float64(Float64(t + a) + Float64(z + Float64(Float64(y * i) + Float64(-0.5 * log(c))))); elseif (x <= 2e+19) tmp = Float64(Float64(t + a) + Float64(z + Float64(log(c) * Float64(b - 0.5)))); else tmp = t_1; end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = (y * i) + (a + (t + (x * log(y))));
tmp = 0.0;
if (x <= -1.36e+113)
tmp = t_1;
elseif (x <= 2.4e-160)
tmp = (t + a) + (z + ((y * i) + (-0.5 * log(c))));
elseif (x <= 2e+19)
tmp = (t + a) + (z + (log(c) * (b - 0.5)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.36e+113], t$95$1, If[LessEqual[x, 2.4e-160], N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[(y * i), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+19], N[(N[(t + a), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := y \cdot i + \left(a + \left(t + x \cdot \log y\right)\right)\\
\mathbf{if}\;x \leq -1.36 \cdot 10^{+113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-160}:\\
\;\;\;\;\left(t + a\right) + \left(z + \left(y \cdot i + -0.5 \cdot \log c\right)\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+19}:\\
\;\;\;\;\left(t + a\right) + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.35999999999999997e113 or 2e19 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 90.5%
*-commutative90.5%
Simplified90.5%
Taylor expanded in z around 0 81.0%
if -1.35999999999999997e113 < x < 2.39999999999999991e-160Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 99.2%
associate-+r+99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
*-commutative99.1%
fma-udef99.1%
+-commutative99.1%
Simplified99.1%
Taylor expanded in b around 0 90.4%
if 2.39999999999999991e-160 < x < 2e19Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 98.4%
associate-+r+98.4%
+-commutative98.4%
sub-neg98.4%
metadata-eval98.4%
*-commutative98.4%
fma-udef98.4%
+-commutative98.4%
Simplified98.4%
Taylor expanded in y around 0 80.7%
Final simplification85.6%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -1.26e+67) (not (<= i 5.6e-73))) (+ (* y i) (+ z (+ t a))) (+ a (+ z (* b (log c))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -1.26e+67) || !(i <= 5.6e-73)) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = a + (z + (b * log(c)));
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((i <= (-1.26d+67)) .or. (.not. (i <= 5.6d-73))) then
tmp = (y * i) + (z + (t + a))
else
tmp = a + (z + (b * log(c)))
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -1.26e+67) || !(i <= 5.6e-73)) {
tmp = (y * i) + (z + (t + a));
} else {
tmp = a + (z + (b * Math.log(c)));
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -1.26e+67) or not (i <= 5.6e-73): tmp = (y * i) + (z + (t + a)) else: tmp = a + (z + (b * math.log(c))) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -1.26e+67) || !(i <= 5.6e-73)) tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); else tmp = Float64(a + Float64(z + Float64(b * log(c)))); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((i <= -1.26e+67) || ~((i <= 5.6e-73)))
tmp = (y * i) + (z + (t + a));
else
tmp = a + (z + (b * log(c)));
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -1.26e+67], N[Not[LessEqual[i, 5.6e-73]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.26 \cdot 10^{+67} \lor \neg \left(i \leq 5.6 \cdot 10^{-73}\right):\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + b \cdot \log c\right)\\
\end{array}
\end{array}
if i < -1.26e67 or 5.60000000000000023e-73 < i Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in x around 0 82.4%
+-commutative82.4%
+-commutative82.4%
associate-+l+82.4%
+-commutative82.4%
Simplified82.4%
if -1.26e67 < i < 5.60000000000000023e-73Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 77.5%
associate-+r+77.5%
+-commutative77.5%
sub-neg77.5%
metadata-eval77.5%
*-commutative77.5%
fma-udef77.5%
+-commutative77.5%
Simplified77.5%
Taylor expanded in b around inf 71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in t around 0 55.6%
Final simplification68.4%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= y 3100000000.0) (+ a (+ t (+ z (* x (log y))))) (+ (* y i) (+ z (+ t a)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 3100000000.0) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= 3100000000.0d0) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = (y * i) + (z + (t + a))
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 3100000000.0) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 3100000000.0: tmp = a + (t + (z + (x * math.log(y)))) else: tmp = (y * i) + (z + (t + a)) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 3100000000.0) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (y <= 3100000000.0)
tmp = a + (t + (z + (x * log(y))));
else
tmp = (y * i) + (z + (t + a));
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 3100000000.0], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3100000000:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if y < 3.1e9Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y around 0 80.5%
if 3.1e9 < y Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in x around 0 78.6%
+-commutative78.6%
+-commutative78.6%
associate-+l+78.6%
+-commutative78.6%
Simplified78.6%
Final simplification79.5%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= y 4100000000.0) (+ a (+ z (* x (log y)))) (+ (* y i) (+ z (+ t a)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 4100000000.0) {
tmp = a + (z + (x * log(y)));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= 4100000000.0d0) then
tmp = a + (z + (x * log(y)))
else
tmp = (y * i) + (z + (t + a))
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 4100000000.0) {
tmp = a + (z + (x * Math.log(y)));
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 4100000000.0: tmp = a + (z + (x * math.log(y))) else: tmp = (y * i) + (z + (t + a)) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 4100000000.0) tmp = Float64(a + Float64(z + Float64(x * log(y)))); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (y <= 4100000000.0)
tmp = a + (z + (x * log(y)));
else
tmp = (y * i) + (z + (t + a));
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 4100000000.0], N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4100000000:\\
\;\;\;\;a + \left(z + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if y < 4.1e9Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y around 0 80.5%
Taylor expanded in t around 0 65.6%
if 4.1e9 < y Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in x around 0 78.6%
+-commutative78.6%
+-commutative78.6%
associate-+l+78.6%
+-commutative78.6%
Simplified78.6%
Final simplification72.1%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.5e+231) (not (<= x 2e+228))) (* x (log y)) (+ (* y i) (+ z (+ t a)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.5e+231) || !(x <= 2e+228)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-4.5d+231)) .or. (.not. (x <= 2d+228))) then
tmp = x * log(y)
else
tmp = (y * i) + (z + (t + a))
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.5e+231) || !(x <= 2e+228)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (z + (t + a));
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4.5e+231) or not (x <= 2e+228): tmp = x * math.log(y) else: tmp = (y * i) + (z + (t + a)) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.5e+231) || !(x <= 2e+228)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(z + Float64(t + a))); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -4.5e+231) || ~((x <= 2e+228)))
tmp = x * log(y);
else
tmp = (y * i) + (z + (t + a));
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.5e+231], N[Not[LessEqual[x, 2e+228]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+231} \lor \neg \left(x \leq 2 \cdot 10^{+228}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + \left(t + a\right)\right)\\
\end{array}
\end{array}
if x < -4.49999999999999991e231 or 1.9999999999999998e228 < x Initial program 99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
associate-+l+99.5%
fma-def99.5%
+-commutative99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 94.1%
*-commutative94.1%
Simplified94.1%
Taylor expanded in y around 0 74.2%
Taylor expanded in x around inf 70.3%
if -4.49999999999999991e231 < x < 1.9999999999999998e228Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in x around 0 77.0%
+-commutative77.0%
+-commutative77.0%
associate-+l+77.0%
+-commutative77.0%
Simplified77.0%
Final simplification76.1%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z (+ t a))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + (t + a));
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + (z + (t + a))
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + (t + a));
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): return (y * i) + (z + (t + a))
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + Float64(t + a))) end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (y * i) + (z + (t + a));
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
y \cdot i + \left(z + \left(t + a\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in x around 0 70.3%
+-commutative70.3%
+-commutative70.3%
associate-+l+70.3%
+-commutative70.3%
Simplified70.3%
Final simplification70.3%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a -1.1e-231) z (if (<= a 6.8e+181) (* y i) a)))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -1.1e-231) {
tmp = z;
} else if (a <= 6.8e+181) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= (-1.1d-231)) then
tmp = z
else if (a <= 6.8d+181) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -1.1e-231) {
tmp = z;
} else if (a <= 6.8e+181) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= -1.1e-231: tmp = z elif a <= 6.8e+181: tmp = y * i else: tmp = a return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= -1.1e-231) tmp = z; elseif (a <= 6.8e+181) tmp = Float64(y * i); else tmp = a; end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= -1.1e-231)
tmp = z;
elseif (a <= 6.8e+181)
tmp = y * i;
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, -1.1e-231], z, If[LessEqual[a, 6.8e+181], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-231}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{+181}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.10000000000000005e-231Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y around 0 55.1%
Taylor expanded in z around inf 13.1%
if -1.10000000000000005e-231 < a < 6.80000000000000062e181Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in y around inf 33.5%
*-commutative33.5%
Simplified33.5%
if 6.80000000000000062e181 < a Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in y around 0 79.2%
Taylor expanded in a around inf 74.2%
Final simplification29.7%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= i -2.4e+145) (* y i) (if (<= i 1.4e+108) (+ z a) (* y i))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -2.4e+145) {
tmp = y * i;
} else if (i <= 1.4e+108) {
tmp = z + a;
} else {
tmp = y * i;
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (i <= (-2.4d+145)) then
tmp = y * i
else if (i <= 1.4d+108) then
tmp = z + a
else
tmp = y * i
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -2.4e+145) {
tmp = y * i;
} else if (i <= 1.4e+108) {
tmp = z + a;
} else {
tmp = y * i;
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if i <= -2.4e+145: tmp = y * i elif i <= 1.4e+108: tmp = z + a else: tmp = y * i return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (i <= -2.4e+145) tmp = Float64(y * i); elseif (i <= 1.4e+108) tmp = Float64(z + a); else tmp = Float64(y * i); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (i <= -2.4e+145)
tmp = y * i;
elseif (i <= 1.4e+108)
tmp = z + a;
else
tmp = y * i;
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -2.4e+145], N[(y * i), $MachinePrecision], If[LessEqual[i, 1.4e+108], N[(z + a), $MachinePrecision], N[(y * i), $MachinePrecision]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.4 \cdot 10^{+145}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;i \leq 1.4 \cdot 10^{+108}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if i < -2.39999999999999992e145 or 1.3999999999999999e108 < i Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y around inf 63.3%
*-commutative63.3%
Simplified63.3%
if -2.39999999999999992e145 < i < 1.3999999999999999e108Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y around 0 75.5%
Taylor expanded in x around 0 56.6%
+-commutative56.6%
associate-+l+56.6%
Simplified56.6%
Taylor expanded in t around 0 42.4%
Final simplification49.1%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.02e+151) (+ z a) (+ a (* y i))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.02e+151) {
tmp = z + a;
} else {
tmp = a + (y * i);
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.02d+151)) then
tmp = z + a
else
tmp = a + (y * i)
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.02e+151) {
tmp = z + a;
} else {
tmp = a + (y * i);
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.02e+151: tmp = z + a else: tmp = a + (y * i) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.02e+151) tmp = Float64(z + a); else tmp = Float64(a + Float64(y * i)); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -1.02e+151)
tmp = z + a;
else
tmp = a + (y * i);
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.02e+151], N[(z + a), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+151}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.02000000000000002e151Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y around 0 71.5%
Taylor expanded in x around 0 61.9%
+-commutative61.9%
associate-+l+61.9%
Simplified61.9%
Taylor expanded in t around 0 51.7%
if -1.02000000000000002e151 < z Initial program 99.9%
Taylor expanded in a around inf 47.6%
Final simplification48.0%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.26e+151) (+ t (+ z a)) (+ a (* y i))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.26e+151) {
tmp = t + (z + a);
} else {
tmp = a + (y * i);
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.26d+151)) then
tmp = t + (z + a)
else
tmp = a + (y * i)
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.26e+151) {
tmp = t + (z + a);
} else {
tmp = a + (y * i);
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.26e+151: tmp = t + (z + a) else: tmp = a + (y * i) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.26e+151) tmp = Float64(t + Float64(z + a)); else tmp = Float64(a + Float64(y * i)); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -1.26e+151)
tmp = t + (z + a);
else
tmp = a + (y * i);
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.26e+151], N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.26 \cdot 10^{+151}:\\
\;\;\;\;t + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.26000000000000006e151Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y around 0 71.5%
Taylor expanded in x around 0 61.9%
+-commutative61.9%
associate-+l+61.9%
Simplified61.9%
if -1.26000000000000006e151 < z Initial program 99.9%
Taylor expanded in a around inf 47.6%
Final simplification49.1%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.35e+151) (+ z (+ t a)) (+ a (* y i))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.35e+151) {
tmp = z + (t + a);
} else {
tmp = a + (y * i);
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.35d+151)) then
tmp = z + (t + a)
else
tmp = a + (y * i)
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.35e+151) {
tmp = z + (t + a);
} else {
tmp = a + (y * i);
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.35e+151: tmp = z + (t + a) else: tmp = a + (y * i) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.35e+151) tmp = Float64(z + Float64(t + a)); else tmp = Float64(a + Float64(y * i)); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -1.35e+151)
tmp = z + (t + a);
else
tmp = a + (y * i);
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.35e+151], N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+151}:\\
\;\;\;\;z + \left(t + a\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.3500000000000001e151Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y around 0 71.5%
Taylor expanded in x around 0 61.9%
+-commutative61.9%
associate-+l+61.9%
Simplified61.9%
Taylor expanded in t around 0 61.9%
+-commutative61.9%
+-commutative61.9%
associate-+l+61.9%
+-commutative61.9%
Simplified61.9%
if -1.3500000000000001e151 < z Initial program 99.9%
Taylor expanded in a around inf 47.6%
Final simplification49.1%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 7.5e+139) z a))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7.5e+139) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 7.5d+139) then
tmp = z
else
tmp = a
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7.5e+139) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7.5e+139: tmp = z else: tmp = a return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7.5e+139) tmp = z; else tmp = a; end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 7.5e+139)
tmp = z;
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7.5e+139], z, a]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7.5 \cdot 10^{+139}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 7.49999999999999992e139Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in y around 0 57.8%
Taylor expanded in z around inf 19.7%
if 7.49999999999999992e139 < a Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y around 0 77.8%
Taylor expanded in a around inf 66.9%
Final simplification26.9%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 a)
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): return a
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) return a end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = a;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
a
\end{array}
Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y around 0 60.8%
Taylor expanded in a around inf 19.0%
Final simplification19.0%
herbie shell --seed 2023271
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
:precision binary64
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))