User:Xaosflux/Sandbox6

booleans

 * 1 and 1=
 * 1 and 0=
 * 0 and 1=
 * 0 and 0=
 * 1 or 1=
 * 1 or 0=
 * 0 or 1=
 * 0 or 0=

template test run

 * current
 * 2000
 * 2006
 * 2008
 * 2100
 * 2200
 * 2300
 * 2400
 * 2800

tighter code-try 2

 * CURRENT

Test Data tight-2

 * 1600
 * 1700
 * 1800
 * 1900
 * 1999
 * 2000
 * 2001
 * 2002
 * 2003
 * 2004
 * 2005
 * 2006
 * 2007
 * 2008
 * 2009
 * 2010
 * 2011
 * 2012
 * 2013
 * 2100
 * 2200
 * 2300
 * 2400
 * 2800

-

 * 1600

tighter code?
It looks like this expression can be shortened (e.g.)


 * CURRENTYEAR


 * CURRENTYEAR


 * 1600
 * 1700
 * 1800
 * 1900
 * 1999
 * 2000
 * 2001
 * 2002
 * 2003
 * 2004
 * 2005
 * 2006
 * 2007
 * 2008
 * 2009
 * 2010
 * 2011
 * 2012
 * 2013
 * 2100
 * 2200
 * 2300
 * 2400
 * 2800

This looks like it works and uses less cycles, though it may fail in 2800CE.

— xaosflux  Talk  03:33, 28 April 2006 (UTC)


 * I added a few more test cases; your code fails for years evenly divisible by 100 (but not divisible by 400). :( If you can get it working with those tests though, feel free to update it. (It does seem to work for 2800 though). —Locke Cole • t • c 03:45, 28 April 2006 (UTC)
 * Thanks, will get back on this tonight, think i have a not in the wrong place. — xaosflux  Talk  12:12, 28 April 2006 (UTC)

tighter code?
It looks like this expression can be shortened (e.g.)


 * CURRENTYEAR


 * CURRENTYEAR


 * 1600
 * 1700
 * 1800
 * 1900
 * 1999
 * 2000
 * 2001
 * 2002
 * 2003
 * 2004
 * 2005
 * 2006
 * 2007
 * 2008
 * 2009
 * 2010
 * 2011
 * 2012
 * 2013
 * 2100
 * 2200
 * 2300
 * 2400
 * 2800

This looks like it works and uses less cycles, though it may fail in 2800CE.

— xaosflux  Talk  03:33, 28 April 2006 (UTC)


 * I added a few more test cases; your code fails for years evenly divisible by 100 (but not divisible by 400). :( If you can get it working with those tests though, feel free to update it. (It does seem to work for 2800 though). —Locke Cole • t • c 03:45, 28 April 2006 (UTC)
 * Thanks, will get back on this tonight, think i have a not in the wrong place. — xaosflux  Talk  12:12, 28 April 2006 (UTC)