algorithms

Gregorian Leap Years

In the case you don’t know how exactly this goes. Every year divisible by four is a leap year. Unless it is also divisible by 100 – then it is not. Unless it is also divisible by 400. In that case it’s a leap year.

An algorithm in a computer language may follow these instructions. Usually it does. But here you have something better. The first 100 leap years generator. It is in a “Taylorian manner”, where just a relative value from some initial point is given. The first leap year is zero, the second 4 and so on. You have to add this results  to 1600, 2000, 2400 and so on. The cosine function is employed to calculate the next leap year in the R0 register.

GregorianLeapYears

I wouldn’t mention it at all, but the inventor is not a human being and it’s a very good example of  a “pure mechanical invention”.

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s