Skip to content

Commit db3f978

Browse files
authored
Easter algorithm chapter (#673)
* adding rough draft of intro to computus chapter * adding rough draft of chapter, need to add visuals and code * k-q has been changed to correctly reflect the fact that it is non-observed leapdays * adding correction to p term * fixing text and adding source code * adding computus chapter with gauss's Easter algorithm * Adding new visualization and fixing grammar Co-authored-by: lockcmpxchg8beax
1 parent 747f2c9 commit db3f978

File tree

9 files changed

+536
-0
lines changed

9 files changed

+536
-0
lines changed

‎SUMMARY.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@
3535
*[Data Compression](contents/data_compression/data_compression.md)
3636
*[Huffman Encoding](contents/huffman_encoding/huffman_encoding.md)
3737
*[Quantum Information](contents/quantum_information/quantum_information.md)
38+
*[Computus](contents/computus/computus.md)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
functioncomputus(year; servois=false)
2+
3+
# Year's position on the 19 year metonic cycle
4+
a =mod(year, 19)
5+
6+
# Century index
7+
k =floor(Int, year/100)
8+
9+
# Shift of metonic cycle, add a day offset every 300 years
10+
p =floor(Int, (13+8* k) /25)
11+
12+
# Correction for non-observed leap days
13+
q =floor(Int, k /4)
14+
15+
# Correction to starting point of calculation each century
16+
M =mod(15- p + k - q, 30)
17+
18+
# Number of days from March 21st until the full moon
19+
d =mod(19* a + M, 30)
20+
21+
# Returning if user wants value for Servois' table
22+
if servois
23+
returnmod(21+d,31)
24+
end
25+
26+
# Finding the next Sunday
27+
# Century-based offset in weekly calculation
28+
N =mod(4+ k - q, 7)
29+
30+
# Correction for leap days
31+
b =mod(year, 4)
32+
c =mod(year, 7)
33+
34+
# Days from d to next Sunday
35+
e =mod(2* b +4* c +6* d + N, 7)
36+
37+
# Historical corrections for April 26 and 25
38+
if (d ==29&& e ==6) || (d ==28&& e ==6&& a >10)
39+
e =-1
40+
end
41+
42+
# Determination of the correct month for Easter
43+
if(22+ d + e >31)
44+
return"April "*string(d + e -9)
45+
else
46+
return"March "*string(22+d+e)
47+
end
48+
end
49+
50+
# Here, we will output the date of the Paschal full moon
51+
# (using Servois notation), and Easter for 2020-2030
52+
53+
a = [i for i =2020:2030]
54+
servois_numbers =computus.(a;servois=true)
55+
easter_dates =computus.(a)
56+
57+
println("The following are the dates of the Paschal full moon (using Servois "*
58+
"notation) and the date of Easter for 2020-2030 AD:")
59+
println("Year Servois number Easter")
60+
for i =1:length(a)
61+
println(string(a[i])*"\t"*string(servois_numbers[i])*"\t\t"*
62+
string(easter_dates[i]))
63+
end

‎contents/computus/computus.md‎

Lines changed: 312 additions & 0 deletions
Large diffs are not rendered by default.

‎contents/computus/res/orbit.png‎

20.1 KB
Loading

‎contents/computus/res/orbit.svg‎

Lines changed: 86 additions & 0 deletions
Loading
187 KB
Loading
195 KB
Loading
19.2 KB
Loading

‎literature.bib‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#------------------------------------------------------------------------------#
2+
# FFT
3+
#------------------------------------------------------------------------------#
4+
15
@article{ct1965,
26
title={An algorithm for the machine calculation of complex Fourier series},
37
author={Cooley, James W and Tukey, John W},
@@ -9,6 +13,10 @@ @article{ct1965
913
publisher={JSTOR}
1014
}
1115

16+
#------------------------------------------------------------------------------#
17+
# Convex Hull
18+
#------------------------------------------------------------------------------#
19+
1220
@article{jm1973,
1321
title={On the identification of the convex hull of a finite set of points in the plane},
1422
author={Jarvis, Ray A},
@@ -31,8 +39,74 @@ @article{gs1972
3139
publisher={Elsevier}
3240
}
3341

42+
#------------------------------------------------------------------------------#
43+
# Plotting
44+
#------------------------------------------------------------------------------#
45+
3446
@misc{gnuplot,
3547
title={Gnuplot 5.0: An Interactive Plotting Program, Official Gnuplot Documentation},
3648
author={Williams, T and Kelley, C},
3749
year={2015}
3850
}
51+
52+
#------------------------------------------------------------------------------#
53+
# Computus
54+
#------------------------------------------------------------------------------#
55+
56+
@book{bede725,
57+
title={Bede, the Reckoning of Time},
58+
author={Venerabilis, Beda and others},
59+
volume={29},
60+
year={1999},
61+
publisher={Liverpool University Press}
62+
}
63+
64+
@misc{dictcomputus,
65+
title={Dictionary.com definition of computus},
66+
url={https://www.merriam-webster.com/dictionary/computus},
67+
year={2020}
68+
}
69+
70+
@article{computus1876,
71+
title={To find Easter: a new York correspondent sends us the following},
72+
author={unknown},
73+
journal={Nature},
74+
year={1876}
75+
}
76+
77+
@article{bien2004,
78+
title={Gauss and beyond: The making of Easter algorithms},
79+
author={Bien, Reinhold},
80+
journal={Archive for history of exact sciences},
81+
volume={58},
82+
number={5},
83+
pages={439--452},
84+
year={2004},
85+
publisher={Springer}
86+
}
87+
88+
@inproceedings{servois,
89+
title={84 Calendrier},
90+
author={Servois, M},
91+
booktitle={Annales de Mathématiques pures et appliquées},
92+
volume={4},
93+
number={1813-1814},
94+
pages={84--90}
95+
}
96+
97+
@article{standish2004,
98+
title={The astronomical unit now},
99+
author={Standish, EM},
100+
journal={Proceedings of the International Astronomical Union},
101+
volume={2004},
102+
number={IAUC196},
103+
pages={163--179},
104+
year={2004},
105+
publisher={Cambridge University Press}
106+
}
107+
108+
@misc{lunar_month_wiki,
109+
title={Wikipedia: Lunar Month},
110+
url={https://en.wikipedia.org/wiki/Lunar_month},
111+
year={2020}
112+
}

0 commit comments

Comments
(0)