Front page | perl.perl6.language |
Postings from June 2005
From: Roger Hale
June 6, 2005 06:16
Message ID: email@example.com
Just a nit, for the record, with no great perl relevance:
"TSa (Thomas Sandlaß)" wrote:
> But what is the first quarter of year 0? 0.25?
Sure (of course if there were a year 0 instead of becoming 1 BCE)
> And the last quarter of year -1? -0.25?
> That works numerically, but March of a
> year is then not always the same difference to the start of the year,
but you seem to have changed the question (first quarter to last
quarter) but called both quarters March?
[>] And the _first_ quarter of year -1? -0.75?
[>] That works numerically, _and_ March of a
[>] year is then _ always the same difference to the start of the year,
(although it's the end of March and April Fool's Day (yyyy-04-01) that's
a quarter after New Year's Day.)
[> although written differently as a decimal substring; two's
> complement numbers with positive fractions do this better, being 0b.01
> in both cases.] paraphrasing
>> It lets me do things without bounds checking and
>> correct the ranges later, because, e.g., plugging in January -20, 0 AD
>> yields the correct result for December 11, 2 BC. Such calculations break
>> dramatically across 0 if you use the definition found in some C
>> implementations, where (-3 mod 5) == -3.
(Note that this recognizes that 0 CE == 1 BCE, and that January -20
brings you back into the previous December.)