File tree Expand file tree Collapse file tree
basics-on-computational-thinking Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ $-1$ 的原码为 $1000 \ 0001$,反码为 $1111 \ 1110$ ,补码为 $1111 \ 1
155155$0$ 有两种表示方式,即 $+0$ 和 $-0$
156156,表示范围为$-(2^n - 1) \sim +(2^n - 1)$。但若牵扯进补码的话 $0$
157157就只有一种表示了,范围也就变成了$-2^n \sim +(2^n - 1)$。如欲了解 C 语言中存储数字的具体方式,不妨参考上篇博文
158- [ 乱谈整型与浮点] ( https://codgician.me/zh-hans/posts/2017/08 /on-int-and-float/) 。
158+ [ 乱谈整型与浮点] ( .. /on-int-and-float/) 。
159159
160160## 数值运算
161161
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ $\left\lfloor \frac{\left\lfloor n \right\rfloor}{2} \right\rfloor = \left\lfloo
7171后两项均可记作 $\sum\limits_ {d = 1}^{n} \left\lfloor k \cdot d \right\rfloor$
7272的形式,其中 $k = \frac{at + b}{c}$($a, b, c$ 均为整数,而 $t = \sqrt{r}$
7373是无理数)。这就显得跟类欧几里得可解决的问题很相似了。我们尝试仿照之前一篇博文
74- [ 浅谈类欧几里德算法 ] ( https://codgician.me/zh-hans/posts/2018/10 /quasi-euclidean-algorithm/)
74+ [ 浅谈类欧几里得算法 ] ( .. /quasi-euclidean-algorithm/)
7575里的推导方法对下面的式子进行推导(为了符合一般习惯下面一段中把 $d$ 写作 $i$):
7676
7777$$
Original file line number Diff line number Diff line change 6161$$
6262
6363我们发现这个式子非常类似于类欧几里德可解决的 $f$
64- 式子(有一点不一样,但是后文会通过一些变换使其一样)。有关类欧几里德算法的相关内容可参考我的另一篇博客: [ 浅谈类欧几里德算法 ] ( https://codgician.me/zh-hans/posts/2018/10 /quasi-euclidean-algorithm/) 。
64+ 式子(有一点不一样,但是后文会通过一些变换使其一样)。有关类欧几里得算法的相关内容可参考我的另一篇博客: [ 浅谈类欧几里得算法 ] ( .. /quasi-euclidean-algorithm/) 。
6565
6666至于 $\left\lfloor \frac{n}{i} \right\rfloor$,我们可以对其进行整除分块。
6767
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ draft: false
2222本文会从初等数论角度介绍 _ 莫比乌斯反演公式 (Mobius inversion
2323formula)_ ,不过如果我们借助一点抽象代数知识引入 _ 狄利克雷卷积 (Dirichlet
2424convolution)_
25- 的话便能得到更加优雅的推导~ 因此强烈安利另一篇姊妹博文:[ 数论函数与狄利克雷卷积] ( /zh/posts /arithmetic-function-and-dirichlet-convolution/) 。
25+ 的话便能得到更加优雅的推导~ 因此强烈安利另一篇姊妹博文:[ 数论函数与狄利克雷卷积] ( .. /arithmetic-function-and-dirichlet-convolution/) 。
2626
2727# 莫比乌斯函数
2828
You can’t perform that action at this time.
0 commit comments