Páscoa

Toda a gente já se perguntou ou perguntou aos céus, pelo menos uma vez na vida, "como raio se calcula o dia da Páscoa". Pois bem, a fórmula é esta. Ou, se não quiserem dar-se ao trabalho de clicar e ir ao link, basta lerem a explicação abaixo:

------------------------------

We refer to the year number as y, and use it to calculate the Golden number, g:
g = y mod 19 + 1


Next we calculate the date of the Paschal full moon, that is, the full moon which Easter is the Sunday after. This is done in several stages. First we calculate two values called the solar correction, s, and the lunar correction, l.
s = (y - 1600) div 100 - (y - 1600) div 400 l = (((y - 1400) div 100) × 8) div 25


Next we calculate an uncorrected date for the Paschal full moon, p'; then we apply a minor correction to get the exact date, p, as the number of days after 21st March.
p' = (3 - 11g + s - l) mod 30 if (p' == 29) or (p' == 28 and g > 11) then p = p' - 1else p = p'


Now we need to determine the date of the following Sunday. First we calculate the 'Dominical number', d:
d = (y + (y div 4) - (y div 100) + (y div 400)) mod 7


Note that this is the number from which the Dominical letter is determined, and we calculate d', which is the date on which the first Sunday of the year falls:
d' = (8 - d) mod 7


We already have p, the date of the Paschal full moon in days after 21st March. Next we determine p'' the first date in the year which falls on the same day of the week as the Paschal full moon. First we determine the 'day number' of p with respect to 1st January. This is 31 + 28 + 21 + p = 80 + p.
(Note that we can disregard possible occurences of 29th February, because the calculation of d has already taken this into account, and we shall see that these two values will cancel each other out.)

p'' is then given by the formula:
p''
= (80 + p) mod 7
= (3 + p) mod 7


The difference between d' (the first Sunday in the year) and p'' (the day of the week when the Paschal full moon falls) gives us the number of days that must be added to p to get the date of the following Sunday, which is Easter Day. There is one further subtlety. This number must lie in the range 1-7, rather than 0-6, since Easter is not allowed to fall on the same day as the Paschal full moon. We first determine x', the difference between d' and p'':
x'
= d' - p''
= (8 - d) mod 7 - (3 + p) mod 7
= (8 - d - (3 + p)) mod 7
= (5 - d - p)) mod 7 To force this to lie in the range 1-7, we calculate x
x
= (x' - 1) mod 7 + 1
= (4 - d - p)) mod 7 + 1

We can now calculate e, the number of days Easter falls after 21st March:
e = p + x or
e = p + 1 + (4 - d - p) mod 7 In other words Easter Day is:
if e <>

------------------------------

Fácil, não!?
Claro que, na minha opinião e da minha mulher, eles simplesmente inventam o dia do Carnaval e já sabem que depois é só somar 4 semanas...

POSTED BY Unknown
POSTED IN
DISCUSSION 0 Comments