3 ms·
I disagree. If you are writing shippable code in an article, it's because the article is about how to write shippable code. This article is not about that, so w
by anonytrary 8y ago
I disagree. If you are writing shippable code in an article, it's because the article is about how to write shippable code. This article is not about that, so writing shippable code risks detracting from the main purpose of the article.
- braythwayt 8y agoExponentiation is almost never shippable code, most languages have an operator or standard library for that.
- paulddraper 8y agoFor certain ranges of numbers. But you could imagine this being part of, say, a "big integer" library. (Which C, C++, PHP, JS all lack.)
- braythwayt 8y agoIf you like esoteric, I learned this algorithm for obtaining the exponent of a 2x2 matrix, which amusingly enough is part of an interesting fibonaccialgorithm.
- ZeikJT 8y agoYou will hopefully have to edit out JS someday: https://github.com/tc39/proposal-bigint https://github.com/tc39/proposal-bigint https://developers.google.com/web/updates/2018/05/bigint https://developers.google.com/web/updates/2018/05/bigint