3 ms·
And nearly every mathematical context as well. There's a reason why R, Julia, Mathematica, Matlab, etc. use 1-based numbering -- it lets you translate standard
by jhbadger 10y ago
And nearly every mathematical context as well. There's a reason why R, Julia, Mathematica, Matlab, etc. use 1-based numbering -- it lets you translate standard formulas into code without fiddling with numbering.
- sincerel 10y agoIt lets you translate freshman level math problems with the same indices. As soon as you deal with Fourier transforms, Vandermonde matrices, polynomials, or pretty much anything where the array index is related to the value in the array, zeros make more sense. People like 1-based because they're familiar with it, and that's fine, but pretending that it makes more sense because their familiar with some math that uses 1-based is silly.