4 ms·
>It's even worse for a builtin function... You'd need to test it, code review it, and so on If you can't trust built-in functions to do what they say on the st
by superuser2 11y ago
>It's even worse for a builtin function... You'd need to test it, code review it, and so on
If you can't trust built-in functions to do what they say on the standard library documentation, you're either paranoid or made a wrong choice of language. (Or you have some very compelling reason to be working in a language that's still rough, like the early days of Swift, which is an entirely different game).
>If you're really suggesting that you can't be trusted to calculate an average correctly
It's not about what you can be trusted to do, but what's worth spending your time on.
- sago 11y agoWhich languages do you trust to use Knuth's algorithm (or something similarly comprehensive and exhaustive) without checking? Not going to check many, but a quick look, since I've got them handy: Python fails Spivak's criteria, as does .NET.
- superuser2 11y agoI don't care. I expect it to work for the simple case, and I expect not to spend time on it unless there is a good reason (like I have very large numbers and must be careful not to overflow).
- sago 11y agoYou responded to a point I made in response to Spivak. If you don't care about his argument, then it might be worth responding elsewhere.