c = y / 100For the year 2012, we get the following intermediate values: c = 20, n = 17, k = 0, i = 17, j = 6, and l = 11. I'm leaving the programming as an exercise to the interested reader. This might be a good homework assignment for a programming course, and it would certainly teach how the division operator works with integer variables. I have, however, implemented this algorithm as an Open Office spreadsheet, Easter.ods, translated into an Excel spreadsheet, Easter.xls The spreadsheets illustrate how to avoid a typical pitfall of translating mathematical formulae into spreadsheet formulae; that is, how to properly treat negation. You can't copy and paste formulae and hope to get the proper results. For a short summary of why there are Easter bunnies, see Ref. 4.[4]
n = y - 19 * ( y / 19 )
k = ( c - 17 ) / 25
i = c - c / 4 - ( c - k ) / 3 + 19 * n + 15
i = i - 30 * ( i / 30 )
i = i - ( i / 28 ) * ( 1 - ( i / 28 ) * ( 29 / ( i + 1 ) ) * (( 21 - n ) / 11 ))
j = y + y / 4 + i + 2 - c + c / 4
j = j - 7 * ( j / 7 )
l = i - j
m = 3 + ( l + 40 ) / 44
d = l + 28 - 31 * ( m / 4 )
How can we show bunnies without some complementary chicks! (Source image: Wikimedia Commons). |