What does Four-Pillar Computation conclude, in numbers, about “Two Chart Engines and a Set of Test Vectors”?
Answer: Chapter 6 compares two chart engines, clock time with the day changing at 23:00 against true solar time with the day changing at midnight: at least one pillar differs for 0.1043 of births in Shanghai and 0.6463 in Kuala Lumpur; it also gives test vectors and a fingerprint.
Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.1043, 0.6463
city day pillar hour pillar any pillar Shanghai 0.0379 0.0674 0.1043 Beijing 0.0520 0.1252 0.1668 Singapore 0.0869 0.5432 0.5801 Kuala Lumpur 0.0929 0.6143 0.6463 Reading: in Shanghai the two engines disagree on about one birth in ten; in Kuala Lumpur and Singapore on more than half. Most disagreements are in the hour pillar; the day pillar differs for four to nine births in a hundred, around midnight.
Show the full program
# Chapter 6. Two engines, one birth: how often do the pillars differ?
# Engine X reads the clock (UTC+8) and changes the day at 23:00 (rule A
# of p03). Engine Y converts to true solar time (longitude and the
# equation of time, as in p04) and changes the day at midnight with the
# late-zi stem rule (rule B). Year and month pillars depend only on the
# instant of birth and are the same in both. Every minute of 2026 is
# taken as an equally likely birth time.
import math
CITIES = (("Shanghai", 121.47), ("Beijing", 116.40),
("Singapore", 103.82), ("Kuala Lumpur", 101.69))
JDN_2026 = 2461042 # 1 January 2026
def equation_of_time(n):
g = 2 * math.pi / 365 * (n - 1)
return 229.18 * (0.000075 + 0.001868 * math.cos(g)
- 0.032077 * math.sin(g) - 0.014615 * math.cos(2 * g)
- 0.040849 * math.sin(2 * g))
def pillars(day_idx, minute, rule):
hb = ((minute + 60) // 120) % 12
late = minute >= 23 * 60
d = day_idx + (1 if late and rule == "A" else 0)
stem_day = day_idx + (1 if late else 0)
return d % 60, (2 * (stem_day % 10 % 5) + hb) % 10, hb
if __name__ == "__main__":
print(" city day pillar hour pillar any pillar")
for name, lon in CITIES:
day = hour = anyp = total = 0
for n in range(365):
di = (JDN_2026 + n + 49) % 60
off = 4 * (lon - 120) + equation_of_time(n + 1)
for t in range(1440):
x = pillars(di, t, "A")
ts = t + off
dj = di
if ts < 0:
ts, dj = ts + 1440, di - 1
elif ts >= 1440:
ts, dj = ts - 1440, di + 1
y = pillars(dj, int(ts), "B")
day += x[0] != y[0]
hour += x[1:] != y[1:]
anyp += x != y
total += 1
print(" {:12s} {:8.4f} {:8.4f} {:8.4f}".format(
name, day / total, hour / total, anyp / total))
print("\nReading: in Shanghai the two engines disagree on about one")
print("birth in ten; in Kuala Lumpur and Singapore on more than half.")
print("Most disagreements are in the hour pillar; the day pillar")
print("differs for four to nine births in a hundred, around midnight.")Single source and citation
Fan, Y. (2026). Four-Pillar Calendrical Computation and Formal Rule Engines (Version 1.0.0), Chapter 6: Two Chart Engines and a Set of Test Vectors. 5D Library. https://doi.org/10.5281/zenodo.24090180
DOI: 10.5281/zenodo.24090180 · Read the monograph · 5DL-B-066 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026066,
author = {Fan, Yafu},
title = {Four-Pillar Calendrical Computation and Formal Rule Engines},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090180},
url = {https://doi.org/10.5281/zenodo.24090180}
}Other chapter answers in this book
- Chapter 1 · The Julian Day and the Congruences of the Four Pillars
- Chapter 2 · Three Conventions for the Zi Hour, and True Solar Time
- Chapter 3 · Timing Errors and the Edges of the Double-Hours
- Chapter 4 · The Ten Gods Are Z5 × Z2, the Hidden Stems Weight Vectors
- Chapter 5 · Strength Is Scoring on a Weighted Graph
- Chapter 7 · The Yuanhai ziping, the Sanming tonghui and the Ditian sui
- Chapter 8 · A Four-Step Check, an Agreement Study and a Pre-Registered Matching Test