关于「沈括论指南针与玄空、相法的文本」,《飞星置换、罗盘离散与骨相计量》给出的定量结论是什么?
结论:程序给四种方法各设一个示意的读数误差:水浮 6 度,指甲与碗沿各 4 度,丝悬 1.5 度。对均匀分布的朝向,水浮法读错山的概率为 0.3192,读错宫的概率为 0.1064;丝悬法分别只有 0.0798 与 0.0266。「微偏东」若为 3 度,未经改正就有 0.2000 的朝向换山。沈括选择丝悬,正是选择了最小的测量误差;他对偏东的记录,提醒每一位用罗盘的人说明以哪一个北为准。
数据口径:罗盘误差、磁偏角、面部尺寸与标点误差都是示意参数;排盘规则按书中写明的约定执行。 书中以标注框区分证据、可运行的 Python 程序、原典与假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.0266, 0.0798, 0.1064, 0.2000, 0.3192, 1.5
| method sigma wrong mountain wrong palace | |
| floated on water | 6.0 0.3192 0.1064 |
| on a fingernail | 4.0 0.2128 0.0709 |
| on a bowl rim | 4.0 0.2128 0.0709 |
| hung from a silk thread | 1.5 0.0798 0.0266 |
| declination 1 deg moves 0.0667 of facings | |
| declination 3 deg moves 0.2000 of facings | |
| declination 5 deg moves 0.3333 of facings | |
| periods x years | 9 x 20 = 180 years |
| ordinary charts | 24 x 9 = 216 |
| with replacement charts | 432 |
查看完整验算程序
# Chapter 7. p14: Shen Kuo's four ways to hang a needle, and the counts
# behind the classical charts.
# Shen Kuo compares a needle floated on water, balanced on a fingernail,
# balanced on the rim of a bowl, and hung from a single silk thread,
# and notes that the needle points slightly east of south. We give each
# method an illustrative reading error sigma (degrees) and compute the
# chance of naming the wrong mountain (15 degrees) or the wrong palace
# (45 degrees) for a uniform facing: E|error| / width, with
# E|error| = sigma sqrt(2 / pi). A steady declination d moves a share
# d / 15 of facings to the next mountain. Last, the counts that frame
# the classical method: 9 periods of 20 years; 24 mountains x 9
# periods ordinary charts; the same again as replacement charts.
import math
METHODS = [("floated on water", 6.0), ("on a fingernail", 4.0),
("on a bowl rim", 4.0), ("hung from a silk thread", 1.5)]
if __name__ == "__main__":
print(" method sigma wrong mountain"
" wrong palace")
for name, s in METHODS:
e = s * math.sqrt(2 / math.pi)
print(" {:24s} {:6.1f} {:16.4f} {:14.4f}".format(
name, s, e / 15, e / 45))
for d in (1.0, 3.0, 5.0):
print(" declination {:.0f} deg moves {:.4f} of facings".format(
d, d / 15))
print("\n periods x years: {} x {} = {} years".format(9, 20, 9 * 20))
print(" ordinary charts: {} x {} = {}".format(24, 9, 24 * 9))
print(" with replacement charts: {}".format(2 * 24 * 9))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《玄空飞星置换代数、二十四山罗盘离散化与骨相比例计量》第 7 章「沈括论指南针与玄空、相法的文本」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090215
DOI: 10.5281/zenodo.24090215 · 阅读本章所在专著 · 5DL-B-082 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026082,
author = {Fan, Yafu},
title = {Xuankong Flying-Star Permutations, Twenty-Four-Mountain Compass Discretization and Craniofacial Ratio Metrology},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090215},
url = {https://doi.org/10.5281/zenodo.24090215}
}