Very clever, and obvious once you know.
[0] https://www.ted.com/talks/arthur_benjamin_a_performance_of_m... ... starts at 7:47
21–30 of 109 posts
Very clever, and obvious once you know.
[0] https://www.ted.com/talks/arthur_benjamin_a_performance_of_m... ... starts at 7:47
I'd go as far as saying that in mathematics little other than notation matters and the same is true in computer science.
This is why lisp like languages are the obvious choice when variables are explicit.
Earlier quoted context omitted.
A little pressed with time, but does it handle leap years properly? Since every year divisible by 100 is not a leap year, unless it is also divisible by 400? (E.g. 1900 is not a leap year but 2000 is)
There is a small correction needed for January and February in leap years, and I haven't included the corrections for pre-1900. The Carroll method does deal with these issues and I have internalised them, but I find I never use them, so I retain only the simpler version.
Reading the article, I wandered into the difference of Old Style and New Style dates and what happened in 1752. From [1]: By the 18th century, the English legal year – used for legal, financial and other civil purposes – had for centuries begun on 25 March, or Lady Day.[13][i] Thus, for example, 24 March 1707 was immediately followed by 25 March 1708, while the day following 31 December 1708 was 1 January 1708, with…
The Century-Item:
The year is 2024. The century is 20.
20/4 = 5, with no remainder. Overplus is 0. 3-0 = 3. 3x2 = 6.
The Year-Item:
The year part is 24. Number of dozens: 2
24/12=2. Overplus: 24 mod 12 = 0. Number of 4's in the overplus: 0. 2+0+0 = 2.
The Month-Item: May: 1 (from the text).
The Day-Item: The day is 24.
Adding all items:
6+2+1+24=33. 33 mod 7 = 5, which is Friday.
Earlier quoted context omitted.
> which I have swutch to That's a past participle I've never seent before
Second guessed myself and had to look up whether this was actually a word
(i.e. past perfect, I think?)
Neat but what is this useful for?