|
|
|
|
|
|
|
6.2.3.1.2.1.3.4 epact_gregorian_obeirne_1 () |
|
|
|
|
|
|
|
|
This routine (Listing 6.12) for Gregorian epact is from T. H. O'Beirne's Puzzles and Paradoxes. This is the first of two alternative procedures given. |
|
|
|
|
|
|
|
|
6.2.3.1.2.1.3.5 epact_gregorian_obeirne_2 () |
|
|
|
|
|
|
|
|
This routine (Listing 6.13) for Gregorian epact is from T. H. O'Beirne's Puzzles and Paradoxes. This is the second of two alternative procedures given. |
|
|
|
|
| Listing 6.13 epact_gregorian_obeirne_2 () | |
|
|
|
|
/* epactgo2.c
+-------------------------------------------+
| Copyright (C) 1995 by Lance W. Latham. |
| All rights reserved. |
+-------------------------------------------+
Routine for Gregorian epact from T. H. O'Beirne, "Puzzles and
Paradoxes". This is the second of two alternative procedures given.
INPUTS:
1. year, type int, the year in the Gregorian calendar for which
the value of epact is desired. Valid values are 1583 to INT_MAX.
OUTPUTS:
1. Returned by routine, type int, the value of epact for the input
year. Valid values are 1 through 30.
NOTES:
1. This routine is based on Table 10b, page 180 of O'Beirne, and is
the set of 'lower rules' which emphasize simplicity of computation
rather than explanatory power. The value of epact is calculated as
part of the solution of Easter date, and this routine is essentially
a form of the routine 'easter_gregorian_obeirne_2 ()', truncated
at the point where epact is found.
2. O'Beirne states (page 178) that the algorithm is based on a procedure
which was first given in "Nature" in 1876 by an anonymous New York
correspondent. On page 181, O'Beirne states that the rules of Table
10b are an alternative procedure which introduce 'various
sophistications', but are arithmetically equivalent to the rules
of Table 10a.
3. This routine returns a value of zero for years less than 1583.
No other validation is performed, and no warning is issued in this
case.
*/
|
|
|
|
|
|
|
|