剰余演算と床関数・天井関数の関係
剰余演算と床関数・天井関数の関係
\(\beta\ne0\)とする。
\(\left\lfloor z\right\rfloor \)は床関数
\(\left\lceil z\right\rceil \)は天井関数
\(\beta\ne0\)とする。
(1)
\[ \alpha=\beta\left\lfloor \frac{\alpha}{\beta}\right\rfloor +\mod\left(\alpha,\beta\right) \](2)
\[ \alpha=\beta\left\lceil \frac{\alpha}{\beta}\right\rceil +\mod\left(\alpha,-\beta\right) \](3)
\[ \alpha=\left\lfloor \alpha\right\rfloor +\mod\left(\alpha,1\right) \](4)
\[ \alpha=\left\lceil \alpha\right\rceil +\mod\left(\alpha,-1\right) \](5)
\[ \alpha=\beta\left\lfloor \frac{\alpha-\gamma}{\beta}\right\rfloor +\mod\left(\alpha,\beta,\gamma\right) \](6)
\[ \alpha=\beta\left\lceil \frac{\alpha-\gamma}{\beta}\right\rceil +\mod\left(\alpha,-\beta,\gamma\right) \]-
\(\mod\left(\alpha,\beta\right)\)は剰余演算\(\left\lfloor z\right\rfloor \)は床関数
\(\left\lceil z\right\rceil \)は天井関数
(1)
\(\alpha\)を\(\beta\)で割った商は\(\left\lfloor \frac{\alpha}{\beta}\right\rfloor \)、余りは\(\mod\left(\alpha,\beta\right)\)なので与式は成り立つ。(2)
\begin{align*} \alpha & =-\beta\left\lfloor \frac{\alpha}{-\beta}\right\rfloor +\mod\left(\alpha,-\beta\right)\\ & =\beta\left\lceil \frac{\alpha}{\beta}\right\rceil +\mod\left(\alpha,-\beta\right) \end{align*}(3)
(1)で\(\beta=1\)を代入すればいい。(4)
(2)で\(\beta=1\)を代入すればいい。(5)
\begin{align*} \alpha & =\alpha-\gamma+\gamma\\ & =\beta\left\lfloor \frac{\alpha-\gamma}{\beta}\right\rfloor +\mod\left(\alpha-\gamma,\beta\right)+\gamma\\ & =\beta\left\lfloor \frac{\alpha-\gamma}{\beta}\right\rfloor +\mod\left(\alpha,\beta,\gamma\right) \end{align*}(6)
\begin{align*} \alpha & =\alpha-\gamma+\gamma\\ & =\beta\left\lceil \frac{\alpha-\gamma}{\beta}\right\rceil +\mod\left(\alpha-\gamma,-\beta\right)+\gamma\\ & =\beta\left\lceil \frac{\alpha-\gamma}{\beta}\right\rceil +\mod\left(\alpha,-\beta,\gamma\right) \end{align*}ページ情報
タイトル | 剰余演算と床関数・天井関数の関係 |
URL | https://www.nomuramath.com/c42fve4z/ |
SNSボタン |
複素数と複素共役の実数での剰余演算
\[
\mod\left(\alpha,1\right)=\mod\left(\Re\alpha,1\right)+i\mod\left(\Im\alpha,1\right)
\]
剰余演算同士の和・差
\[
\mod\left(x,a,b\right)+\mod\left(y,a,b\right)=\mod\left(x+y,a,b\right)+a\mzp_{0,1}\left(b\sgn\left(a\right),b\sgn\left(a\right)+\left|a\right|;\sgn\left(a\right)\left(\mod\left(x,a,b\right)+\mod\left(y,a,b\right)\right)\right)
\]
偏角と剰余の関係
\[
\Arg\alpha=\mod\left(\Arg\left(\alpha\right),-2\pi,\pi\right)
\]
剰余演算の実部と虚部
\[
\mod\left(\alpha,\beta\right)=\Re\left(\beta\right)\mod\left(\Re\left(\frac{\alpha}{\beta}\right),1\right)-\Im\left(\beta\right)\mod\left(\Im\left(\frac{\alpha}{\beta}\right),1\right)+i\left\{ \Re\left(\beta\right)\mod\left(\Im\left(\frac{\alpha}{\beta}\right),1\right)+\Im\left(\beta\right)\mod\left(\Re\left(\frac{\alpha}{\beta}\right),1\right)\right\}
\]