4 ms·
Is anyone else bothered that there's no bounds checking in any of the implementations? factorial(-1) would likely crash all of them.
by mikewarot 5y ago
Is anyone else bothered that there's no bounds checking in any of the implementations? factorial(-1) would likely crash all of them.
- jonsen 5y agoFor the record — and for brevity — one thing that is not the focus of this mini-series is error handling. Behaviour outside the valid domain and range of any of the factorial implementations is not defined.