
(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: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -4.3e+198)
(+ a t_1)
(if (<= x 4.2e+228)
(fma y i (+ a (+ t (+ z (* (log c) (- b 0.5))))))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -4.3e+198) {
tmp = a + t_1;
} else if (x <= 4.2e+228) {
tmp = fma(y, i, (a + (t + (z + (log(c) * (b - 0.5))))));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -4.3e+198) tmp = Float64(a + t_1); elseif (x <= 4.2e+228) tmp = fma(y, i, Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.3e+198], N[(a + t$95$1), $MachinePrecision], If[LessEqual[x, 4.2e+228], N[(y * i + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{+198}:\\
\;\;\;\;a + t\_1\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+228}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.29999999999999982e198Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in a around -inf 73.3%
Taylor expanded in x around inf 38.6%
Taylor expanded in a around 0 60.7%
mul-1-neg60.7%
unsub-neg60.7%
mul-1-neg60.7%
Simplified60.7%
if -4.29999999999999982e198 < x < 4.19999999999999988e228Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 93.7%
if 4.19999999999999988e228 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 55.9%
Simplified55.6%
Taylor expanded in x around inf 77.1%
Final simplification89.7%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -8.2e+200)
(+ a t_1)
(if (<= x 4.6e+226)
(+ (+ t a) (+ (* y i) (fma (log c) (+ b -0.5) z)))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -8.2e+200) {
tmp = a + t_1;
} else if (x <= 4.6e+226) {
tmp = (t + a) + ((y * i) + fma(log(c), (b + -0.5), z));
} else {
tmp = t_1;
}
return tmp;
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -8.2e+200) tmp = Float64(a + t_1); elseif (x <= 4.6e+226) tmp = Float64(Float64(t + a) + Float64(Float64(y * i) + fma(log(c), Float64(b + -0.5), z))); else tmp = t_1; end return tmp end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.2e+200], N[(a + t$95$1), $MachinePrecision], If[LessEqual[x, 4.6e+226], N[(N[(t + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{+200}:\\
\;\;\;\;a + t\_1\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+226}:\\
\;\;\;\;\left(t + a\right) + \left(y \cdot i + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.2000000000000005e200Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in a around -inf 73.3%
Taylor expanded in x around inf 38.6%
Taylor expanded in a around 0 60.7%
mul-1-neg60.7%
unsub-neg60.7%
mul-1-neg60.7%
Simplified60.7%
if -8.2000000000000005e200 < x < 4.5999999999999999e226Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 93.7%
associate-+r+93.7%
+-commutative93.7%
sub-neg93.7%
metadata-eval93.7%
*-commutative93.7%
associate-+r+93.7%
+-commutative93.7%
fma-define93.7%
+-commutative93.7%
Simplified93.7%
if 4.5999999999999999e226 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 55.9%
Simplified55.6%
Taylor expanded in x around inf 77.1%
Final simplification89.7%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= y 4e-96)
(+ a (+ t (+ z (+ t_1 (* (log c) (- b 0.5))))))
(+ (* y i) (+ (+ a (+ t (+ z t_1))) (* b (log c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (y <= 4e-96) {
tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + ((a + (t + (z + t_1))) + (b * log(c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 = x * log(y)
if (y <= 4d-96) then
tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5d0)))))
else
tmp = (y * i) + ((a + (t + (z + t_1))) + (b * log(c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (y <= 4e-96) {
tmp = a + (t + (z + (t_1 + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + ((a + (t + (z + t_1))) + (b * Math.log(c)));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if y <= 4e-96: tmp = a + (t + (z + (t_1 + (math.log(c) * (b - 0.5))))) else: tmp = (y * i) + ((a + (t + (z + t_1))) + (b * math.log(c))) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (y <= 4e-96) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + t_1))) + Float64(b * log(c)))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = x * log(y);
tmp = 0.0;
if (y <= 4e-96)
tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
else
tmp = (y * i) + ((a + (t + (z + t_1))) + (b * log(c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4e-96], N[(a + N[(t + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;y \leq 4 \cdot 10^{-96}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + t\_1\right)\right)\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if y < 3.9999999999999996e-96Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 98.8%
if 3.9999999999999996e-96 < y Initial program 99.8%
Taylor expanded in b around inf 98.0%
*-commutative98.0%
Simplified98.0%
Final simplification98.3%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= y 1.45e-37)
(+ a (+ t (+ z (+ (* x (log y)) t_1))))
(fma y i (+ a (+ t (+ z t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double tmp;
if (y <= 1.45e-37) {
tmp = a + (t + (z + ((x * log(y)) + t_1)));
} else {
tmp = fma(y, i, (a + (t + (z + t_1))));
}
return tmp;
}
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (y <= 1.45e-37) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + t_1)))); else tmp = fma(y, i, Float64(a + Float64(t + Float64(z + t_1)))); end return tmp end
NOTE: x, y, z, t, a, b, c, and i 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[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.45e-37], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;y \leq 1.45 \cdot 10^{-37}:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if y < 1.45000000000000002e-37Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 98.2%
if 1.45000000000000002e-37 < y Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 89.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* y i)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i);
}
NOTE: x, y, z, t, a, b, c, and i 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 + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (y * i)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (y * i);
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (y * i)
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + Float64(y * i)) end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i);
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(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] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.8%
Final simplification99.8%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -6.5e+199)
(+ a t_1)
(if (<= x 2e+228)
(+ a (+ t (+ z (+ (* y i) (* (log c) (- b 0.5))))))
t_1))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -6.5e+199) {
tmp = a + t_1;
} else if (x <= 2e+228) {
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 = x * log(y)
if (x <= (-6.5d+199)) then
tmp = a + t_1
else if (x <= 2d+228) then
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5d0)))))
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (x <= -6.5e+199) {
tmp = a + t_1;
} else if (x <= 2e+228) {
tmp = a + (t + (z + ((y * i) + (Math.log(c) * (b - 0.5)))));
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if x <= -6.5e+199: tmp = a + t_1 elif x <= 2e+228: tmp = a + (t + (z + ((y * i) + (math.log(c) * (b - 0.5))))) else: tmp = t_1 return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -6.5e+199) tmp = Float64(a + t_1); elseif (x <= 2e+228) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5)))))); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = x * log(y);
tmp = 0.0;
if (x <= -6.5e+199)
tmp = a + t_1;
elseif (x <= 2e+228)
tmp = a + (t + (z + ((y * i) + (log(c) * (b - 0.5)))));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.5e+199], N[(a + t$95$1), $MachinePrecision], If[LessEqual[x, 2e+228], N[(a + N[(t + N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -6.5 \cdot 10^{+199}:\\
\;\;\;\;a + t\_1\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+228}:\\
\;\;\;\;a + \left(t + \left(z + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.5000000000000003e199Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in a around -inf 73.3%
Taylor expanded in x around inf 38.6%
Taylor expanded in a around 0 60.7%
mul-1-neg60.7%
unsub-neg60.7%
mul-1-neg60.7%
Simplified60.7%
if -6.5000000000000003e199 < x < 1.9999999999999998e228Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 93.7%
if 1.9999999999999998e228 < x Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 55.9%
Simplified55.6%
Taylor expanded in x around inf 77.1%
Final simplification89.7%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* x (log y)))))
(if (<= y 2.3e-208)
t_1
(if (<= y 2.1e-67)
(+ a (* b (log c)))
(if (<= y 4.2e-16) t_1 (* y (+ i (/ z y))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (x * log(y));
double tmp;
if (y <= 2.3e-208) {
tmp = t_1;
} else if (y <= 2.1e-67) {
tmp = a + (b * log(c));
} else if (y <= 4.2e-16) {
tmp = t_1;
} else {
tmp = y * (i + (z / y));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 = a + (x * log(y))
if (y <= 2.3d-208) then
tmp = t_1
else if (y <= 2.1d-67) then
tmp = a + (b * log(c))
else if (y <= 4.2d-16) then
tmp = t_1
else
tmp = y * (i + (z / y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (x * Math.log(y));
double tmp;
if (y <= 2.3e-208) {
tmp = t_1;
} else if (y <= 2.1e-67) {
tmp = a + (b * Math.log(c));
} else if (y <= 4.2e-16) {
tmp = t_1;
} else {
tmp = y * (i + (z / y));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): t_1 = a + (x * math.log(y)) tmp = 0 if y <= 2.3e-208: tmp = t_1 elif y <= 2.1e-67: tmp = a + (b * math.log(c)) elif y <= 4.2e-16: tmp = t_1 else: tmp = y * (i + (z / y)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(x * log(y))) tmp = 0.0 if (y <= 2.3e-208) tmp = t_1; elseif (y <= 2.1e-67) tmp = Float64(a + Float64(b * log(c))); elseif (y <= 4.2e-16) tmp = t_1; else tmp = Float64(y * Float64(i + Float64(z / y))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = a + (x * log(y));
tmp = 0.0;
if (y <= 2.3e-208)
tmp = t_1;
elseif (y <= 2.1e-67)
tmp = a + (b * log(c));
elseif (y <= 4.2e-16)
tmp = t_1;
else
tmp = y * (i + (z / y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.3e-208], t$95$1, If[LessEqual[y, 2.1e-67], N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e-16], t$95$1, N[(y * N[(i + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
t_1 := a + x \cdot \log y\\
\mathbf{if}\;y \leq 2.3 \cdot 10^{-208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-67}:\\
\;\;\;\;a + b \cdot \log c\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(i + \frac{z}{y}\right)\\
\end{array}
\end{array}
if y < 2.29999999999999997e-208 or 2.1000000000000002e-67 < y < 4.2000000000000002e-16Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in a around -inf 71.6%
Taylor expanded in x around inf 41.8%
Taylor expanded in a around 0 53.5%
mul-1-neg53.5%
unsub-neg53.5%
mul-1-neg53.5%
Simplified53.5%
if 2.29999999999999997e-208 < y < 2.1000000000000002e-67Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in a around -inf 67.4%
Taylor expanded in b around inf 32.8%
associate-/l*32.8%
Simplified32.8%
Taylor expanded in a around 0 43.7%
neg-mul-143.7%
+-commutative43.7%
mul-1-neg43.7%
*-commutative43.7%
neg-mul-143.7%
fma-define43.7%
fma-neg43.7%
neg-mul-143.7%
distribute-rgt-neg-in43.7%
Simplified43.7%
if 4.2000000000000002e-16 < y Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 99.7%
Simplified99.7%
Taylor expanded in z around inf 59.3%
Final simplification53.9%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= y 2.25e+118) (+ a (+ t (+ z (* (log c) (- b 0.5))))) (if (<= y 4.8e+172) (* y (+ i (* x (/ (log y) y)))) (* y (+ i (/ z y))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.25e+118) {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
} else if (y <= 4.8e+172) {
tmp = y * (i + (x * (log(y) / y)));
} else {
tmp = y * (i + (z / y));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 <= 2.25d+118) then
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
else if (y <= 4.8d+172) then
tmp = y * (i + (x * (log(y) / y)))
else
tmp = y * (i + (z / y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.25e+118) {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
} else if (y <= 4.8e+172) {
tmp = y * (i + (x * (Math.log(y) / y)));
} else {
tmp = y * (i + (z / y));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 2.25e+118: tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) elif y <= 4.8e+172: tmp = y * (i + (x * (math.log(y) / y))) else: tmp = y * (i + (z / y)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 2.25e+118) tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); elseif (y <= 4.8e+172) tmp = Float64(y * Float64(i + Float64(x * Float64(log(y) / y)))); else tmp = Float64(y * Float64(i + Float64(z / y))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (y <= 2.25e+118)
tmp = a + (t + (z + (log(c) * (b - 0.5))));
elseif (y <= 4.8e+172)
tmp = y * (i + (x * (log(y) / y)));
else
tmp = y * (i + (z / y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 2.25e+118], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+172], N[(y * N[(i + N[(x * N[(N[Log[y], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(i + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.25 \cdot 10^{+118}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+172}:\\
\;\;\;\;y \cdot \left(i + x \cdot \frac{\log y}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(i + \frac{z}{y}\right)\\
\end{array}
\end{array}
if y < 2.25000000000000001e118Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 81.3%
Taylor expanded in y around 0 72.5%
if 2.25000000000000001e118 < y < 4.8000000000000001e172Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 99.8%
Simplified99.7%
Taylor expanded in x around inf 75.7%
associate-/l*75.6%
Simplified75.6%
if 4.8000000000000001e172 < y Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 99.8%
Simplified99.8%
Taylor expanded in z around inf 83.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 19000000000000.0) (* y (+ i (/ z y))) (if (<= a 1.02e+127) (* b (log c)) (* a (+ (* i (/ y a)) 1.0)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 19000000000000.0) {
tmp = y * (i + (z / y));
} else if (a <= 1.02e+127) {
tmp = b * log(c);
} else {
tmp = a * ((i * (y / a)) + 1.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 <= 19000000000000.0d0) then
tmp = y * (i + (z / y))
else if (a <= 1.02d+127) then
tmp = b * log(c)
else
tmp = a * ((i * (y / a)) + 1.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 19000000000000.0) {
tmp = y * (i + (z / y));
} else if (a <= 1.02e+127) {
tmp = b * Math.log(c);
} else {
tmp = a * ((i * (y / a)) + 1.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 19000000000000.0: tmp = y * (i + (z / y)) elif a <= 1.02e+127: tmp = b * math.log(c) else: tmp = a * ((i * (y / a)) + 1.0) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 19000000000000.0) tmp = Float64(y * Float64(i + Float64(z / y))); elseif (a <= 1.02e+127) tmp = Float64(b * log(c)); else tmp = Float64(a * Float64(Float64(i * Float64(y / a)) + 1.0)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 19000000000000.0)
tmp = y * (i + (z / y));
elseif (a <= 1.02e+127)
tmp = b * log(c);
else
tmp = a * ((i * (y / a)) + 1.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 19000000000000.0], N[(y * N[(i + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.02e+127], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(i * N[(y / a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 19000000000000:\\
\;\;\;\;y \cdot \left(i + \frac{z}{y}\right)\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{+127}:\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(i \cdot \frac{y}{a} + 1\right)\\
\end{array}
\end{array}
if a < 1.9e13Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.8%
Taylor expanded in y around inf 67.6%
Simplified67.6%
Taylor expanded in z around inf 37.1%
if 1.9e13 < a < 1.02e127Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 93.6%
Taylor expanded in y around inf 68.6%
associate-+r+68.6%
+-commutative68.6%
associate-/l*68.7%
sub-neg68.7%
metadata-eval68.7%
fma-undefine68.7%
Simplified68.7%
Taylor expanded in b around inf 45.0%
*-commutative45.0%
Simplified45.0%
if 1.02e127 < a Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in a around -inf 99.6%
Taylor expanded in i around inf 60.9%
associate-/l*60.9%
Simplified60.9%
Final simplification41.7%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= y 2.1e-16) (+ a (* x (log y))) (* y (+ i (/ z y)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.1e-16) {
tmp = a + (x * log(y));
} else {
tmp = y * (i + (z / y));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 <= 2.1d-16) then
tmp = a + (x * log(y))
else
tmp = y * (i + (z / y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.1e-16) {
tmp = a + (x * Math.log(y));
} else {
tmp = y * (i + (z / y));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 2.1e-16: tmp = a + (x * math.log(y)) else: tmp = y * (i + (z / y)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 2.1e-16) tmp = Float64(a + Float64(x * log(y))); else tmp = Float64(y * Float64(i + Float64(z / y))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (y <= 2.1e-16)
tmp = a + (x * log(y));
else
tmp = y * (i + (z / y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 2.1e-16], N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(i + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.1 \cdot 10^{-16}:\\
\;\;\;\;a + x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(i + \frac{z}{y}\right)\\
\end{array}
\end{array}
if y < 2.1000000000000001e-16Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in a around -inf 69.8%
Taylor expanded in x around inf 34.2%
Taylor expanded in a around 0 42.4%
mul-1-neg42.4%
unsub-neg42.4%
mul-1-neg42.4%
Simplified42.4%
if 2.1000000000000001e-16 < y Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 99.7%
Simplified99.7%
Taylor expanded in z around inf 59.3%
Final simplification50.1%
NOTE: x, y, z, t, a, b, c, and i 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+155) z (if (<= z 1.05e-224) (* y (+ i (/ a y))) a)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.35e+155) {
tmp = z;
} else if (z <= 1.05e-224) {
tmp = y * (i + (a / y));
} else {
tmp = a;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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+155)) then
tmp = z
else if (z <= 1.05d-224) then
tmp = y * (i + (a / y))
else
tmp = a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
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+155) {
tmp = z;
} else if (z <= 1.05e-224) {
tmp = y * (i + (a / y));
} else {
tmp = a;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.35e+155: tmp = z elif z <= 1.05e-224: tmp = y * (i + (a / y)) else: tmp = a return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.35e+155) tmp = z; elseif (z <= 1.05e-224) tmp = Float64(y * Float64(i + Float64(a / y))); else tmp = a; end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (z <= -1.35e+155)
tmp = z;
elseif (z <= 1.05e-224)
tmp = y * (i + (a / y));
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.35e+155], z, If[LessEqual[z, 1.05e-224], N[(y * N[(i + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], a]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+155}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-224}:\\
\;\;\;\;y \cdot \left(i + \frac{a}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.34999999999999997e155Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.9%
+-commutative99.9%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 42.8%
if -1.34999999999999997e155 < z < 1.05000000000000003e-224Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 69.1%
Simplified69.0%
Taylor expanded in a around inf 37.0%
if 1.05000000000000003e-224 < z Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in a around inf 16.5%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.5e-268) z (if (<= a 2.8e-64) (* y i) (if (<= a 1.95e+148) z a))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.5e-268) {
tmp = z;
} else if (a <= 2.8e-64) {
tmp = y * i;
} else if (a <= 1.95e+148) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 <= 2.5d-268) then
tmp = z
else if (a <= 2.8d-64) then
tmp = y * i
else if (a <= 1.95d+148) then
tmp = z
else
tmp = a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.5e-268) {
tmp = z;
} else if (a <= 2.8e-64) {
tmp = y * i;
} else if (a <= 1.95e+148) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.5e-268: tmp = z elif a <= 2.8e-64: tmp = y * i elif a <= 1.95e+148: tmp = z else: tmp = a return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.5e-268) tmp = z; elseif (a <= 2.8e-64) tmp = Float64(y * i); elseif (a <= 1.95e+148) tmp = z; else tmp = a; end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 2.5e-268)
tmp = z;
elseif (a <= 2.8e-64)
tmp = y * i;
elseif (a <= 1.95e+148)
tmp = z;
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.5e-268], z, If[LessEqual[a, 2.8e-64], N[(y * i), $MachinePrecision], If[LessEqual[a, 1.95e+148], z, a]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.5 \cdot 10^{-268}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-64}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{+148}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.5e-268 or 2.80000000000000004e-64 < a < 1.95000000000000001e148Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.8%
Taylor expanded in z around inf 17.9%
if 2.5e-268 < a < 2.80000000000000004e-64Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 26.2%
*-commutative26.2%
Simplified26.2%
if 1.95000000000000001e148 < a Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in a around inf 48.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.6e+81) (* y (+ i (/ z y))) (* a (+ (* i (/ y a)) 1.0))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.6e+81) {
tmp = y * (i + (z / y));
} else {
tmp = a * ((i * (y / a)) + 1.0);
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 <= 2.6d+81) then
tmp = y * (i + (z / y))
else
tmp = a * ((i * (y / a)) + 1.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.6e+81) {
tmp = y * (i + (z / y));
} else {
tmp = a * ((i * (y / a)) + 1.0);
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.6e+81: tmp = y * (i + (z / y)) else: tmp = a * ((i * (y / a)) + 1.0) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.6e+81) tmp = Float64(y * Float64(i + Float64(z / y))); else tmp = Float64(a * Float64(Float64(i * Float64(y / a)) + 1.0)); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 2.6e+81)
tmp = y * (i + (z / y));
else
tmp = a * ((i * (y / a)) + 1.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.6e+81], N[(y * N[(i + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(i * N[(y / a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.6 \cdot 10^{+81}:\\
\;\;\;\;y \cdot \left(i + \frac{z}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(i \cdot \frac{y}{a} + 1\right)\\
\end{array}
\end{array}
if a < 2.59999999999999992e81Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 67.1%
Simplified67.1%
Taylor expanded in z around inf 36.2%
if 2.59999999999999992e81 < a Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in a around -inf 99.7%
Taylor expanded in i around inf 50.2%
associate-/l*50.2%
Simplified50.2%
Final simplification39.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.16e-22) (* a (+ 1.0 (/ z a))) (* y (+ i (/ z y)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.16e-22) {
tmp = a * (1.0 + (z / a));
} else {
tmp = y * (i + (z / y));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 <= 1.16d-22) then
tmp = a * (1.0d0 + (z / a))
else
tmp = y * (i + (z / y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.16e-22) {
tmp = a * (1.0 + (z / a));
} else {
tmp = y * (i + (z / y));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.16e-22: tmp = a * (1.0 + (z / a)) else: tmp = y * (i + (z / y)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.16e-22) tmp = Float64(a * Float64(1.0 + Float64(z / a))); else tmp = Float64(y * Float64(i + Float64(z / y))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (y <= 1.16e-22)
tmp = a * (1.0 + (z / a));
else
tmp = y * (i + (z / y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.16e-22], N[(a * N[(1.0 + N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(i + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.16 \cdot 10^{-22}:\\
\;\;\;\;a \cdot \left(1 + \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(i + \frac{z}{y}\right)\\
\end{array}
\end{array}
if y < 1.1600000000000001e-22Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in a around -inf 70.3%
Taylor expanded in z around inf 30.3%
if 1.1600000000000001e-22 < y Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 99.7%
Simplified99.7%
Taylor expanded in z around inf 58.5%
Final simplification44.0%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 3.9e+148) (* y (+ i (/ z y))) (* a (+ 1.0 (/ t a)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.9e+148) {
tmp = y * (i + (z / y));
} else {
tmp = a * (1.0 + (t / a));
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 <= 3.9d+148) then
tmp = y * (i + (z / y))
else
tmp = a * (1.0d0 + (t / a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.9e+148) {
tmp = y * (i + (z / y));
} else {
tmp = a * (1.0 + (t / a));
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 3.9e+148: tmp = y * (i + (z / y)) else: tmp = a * (1.0 + (t / a)) return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 3.9e+148) tmp = Float64(y * Float64(i + Float64(z / y))); else tmp = Float64(a * Float64(1.0 + Float64(t / a))); end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 3.9e+148)
tmp = y * (i + (z / y));
else
tmp = a * (1.0 + (t / a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.9e+148], N[(y * N[(i + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(1.0 + N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.9 \cdot 10^{+148}:\\
\;\;\;\;y \cdot \left(i + \frac{z}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(1 + \frac{t}{a}\right)\\
\end{array}
\end{array}
if a < 3.90000000000000002e148Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.8%
Taylor expanded in y around inf 67.4%
Simplified67.4%
Taylor expanded in z around inf 35.2%
if 3.90000000000000002e148 < a Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in a around -inf 99.7%
Taylor expanded in t around inf 56.6%
Final simplification38.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.35e+148) (* y (+ i (/ z y))) a))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.35e+148) {
tmp = y * (i + (z / y));
} else {
tmp = a;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 <= 2.35d+148) then
tmp = y * (i + (z / y))
else
tmp = a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.35e+148) {
tmp = y * (i + (z / y));
} else {
tmp = a;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.35e+148: tmp = y * (i + (z / y)) else: tmp = a return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.35e+148) tmp = Float64(y * Float64(i + Float64(z / y))); else tmp = a; end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 2.35e+148)
tmp = y * (i + (z / y));
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.35e+148], N[(y * N[(i + N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.35 \cdot 10^{+148}:\\
\;\;\;\;y \cdot \left(i + \frac{z}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.3499999999999999e148Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.8%
Taylor expanded in y around inf 67.4%
Simplified67.4%
Taylor expanded in z around inf 35.2%
if 2.3499999999999999e148 < a Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in a around inf 48.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 1e+148) z a))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1e+148) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
NOTE: x, y, z, t, a, b, c, and i 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 <= 1d+148) then
tmp = z
else
tmp = a
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1e+148) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1e+148: tmp = z else: tmp = a return tmp
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1e+148) tmp = z; else tmp = a; end return tmp end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 1e+148)
tmp = z;
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1e+148], z, a]
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 10^{+148}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 1e148Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.8%
Taylor expanded in z around inf 18.8%
if 1e148 < a Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in a around inf 48.2%
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 a)
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
NOTE: x, y, z, t, a, b, c, and i 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 x < y && y < z && z < t && t < a && a < b && b < c && c < i;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
[x, y, z, t, a, b, c, i] = sort([x, y, z, t, a, b, c, i]) def code(x, y, z, t, a, b, c, i): return a
x, y, z, t, a, b, c, i = sort([x, y, z, t, a, b, c, i]) function code(x, y, z, t, a, b, c, i) return a end
x, y, z, t, a, b, c, i = num2cell(sort([x, y, z, t, a, b, c, i])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = a;
end
NOTE: x, y, z, t, a, b, c, and i should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
[x, y, z, t, a, b, c, i] = \mathsf{sort}([x, y, z, t, a, b, c, i])\\
\\
a
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in a around inf 16.7%
herbie shell --seed 2024145
(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)))