Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Apl > leapyear
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 960 of 1014
Post > Topic >>

leapyear

by "jk" <*axy*@[EMAIL PROTECTED] (remove the asterisks)> Feb 26, 2008 at 08:46 PM

Is 2008 a leapyear? ... almost a trivial question.

Anthony Camacho (I believe Manchester 1986) has provided an interesting
paper on a couple of subjects, among others the swastika and the
leapyear.

Despite it's relative triviality I love the APL/J algorithm.

Here is the J-version:
Are the years in arg leapyears?
2|+/0=4 100 400|/ arg

How many days in the years in arg
365+2|+/0=4 100 400|/arg

How many days in February of the years in arg
28+2|+/0=4 100 400|/ arg

Selecting the leapyears from the years in arg
(2|+/0=4 100 400|/ arg) # arg

Lovely!

An article on the subjects from some 10 years ago (forget the language -
it's
Dutch)
http://www.ganuenta.com/leap.pdf

_________________________________________________________
Jan Karman
http://www.ganuenta.com




 8 Posts in Topic:
leapyear
"jk" <*axy*@  2008-02-26 20:46:39 
Re: leapyear
"Stephen Taylor <  2008-02-27 01:44:22 
Re: leapyear
"jk" <*axy*@  2008-02-27 13:07:41 
Re: leapyear
Gosi <gosinn@[EMAIL PR  2008-02-27 06:04:45 
Re: leapyear
"jk" <*axy*@  2008-02-27 15:42:38 
Re: leapyear
"Kerry Liles" &  2008-02-27 09:49:20 
Re: leapyear
Phil Last <phil.last@[  2008-02-27 08:24:33 
Re: leapyear
"jk" <*axy*@  2008-02-27 18:11:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 3:22:53 CDT 2008.