This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author valhallasw
Recipients fkbreitl, gekonntde, georg.brandl, mark.dickinson, rhettinger, valhallasw
Date 2012-03-15.14:31:28
SpamBayes Score 1.2847532e-08
Marked as misclassified No
Message-id <1331821889.35.0.664450354553.issue829370@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not quite sure why that formula would be "elegant" in the first place, and I most certainly don't understand why

0.5*sign((100*YY)+MM-190002.5) + 0.5

is more elegant than

((100*YY)+MM > 190002.5)

or

(((YY = 1900) and (MM > 2.5)) or (YY > 1900))

or rather: implementing leap years correctly in the first place, so the formula also works outside of the 1800-2099 range.


And, in general, I don't understand the problem. Everyone who does scientific computing has numpy *anyway*, so there is no gain for them.

As a last note, the C math.h also doesn't have a sign() function, and only a copysign() function: http://en.wikipedia.org/wiki/C_mathematical_functions
History
Date User Action Args
2012-03-15 14:31:29valhallaswsetrecipients: + valhallasw, georg.brandl, rhettinger, mark.dickinson, gekonntde, fkbreitl
2012-03-15 14:31:29valhallaswsetmessageid: <1331821889.35.0.664450354553.issue829370@psf.upfronthosting.co.za>
2012-03-15 14:31:28valhallaswlinkissue829370 messages
2012-03-15 14:31:28valhallaswcreate