News for hackers. Stuff that matters.
Re:Why Python is Slow: Looking Under the Hood (2014) by DonbunEf7 on Wednesday October 25, 2017 @12:11PM (#15551373)
Maths is zero-based. I'm not sure why you think that numbers start with one; every formulation of the integers in modern maths starts with zero.
Re:Why Python is Slow: Looking Under the Hood (2014) by peatmoss on Wednesday October 25, 2017 @12:18PM (#15551446)
Matrices, common in statistics because of applications of linear algebra, have long maintained the convention of i,j indexes starting with one.
Re:Why Python is Slow: Looking Under the Hood (2014) by dnautics on Thursday October 26, 2017 @12:12AM (#15556288)
It's not. Zero based is wise for offsets (CS) and fields where you have a zero element, and a few corner cases like factorial, but by and large any time you're enumerating an order over a nonempty set you start with one in math, because, max(indices) = |set|