MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1x58u7b/howprogramminghaschanged/pgnhe1x/?context=3
r/ProgrammerHumor • u/shizzy0 • Oct 13 '26
108 comments sorted by
View all comments
Show parent comment
5
powf is definitely not O(1) https://youtu.be/u24AjKinHNU?t=177
4 u/ChalkyChalkson Oct 14 '26 Even if we go to exponentiation by squaring, we're still upgrading from O(2n) with the naive recursion to O(log n), which is pretty sweet. 2 u/IronicRobotics Oct 14 '26 oh lol, I figured it was O(1) on technicality since there's limited precision. Shows me for not going and reading a proof!
4
Even if we go to exponentiation by squaring, we're still upgrading from O(2n) with the naive recursion to O(log n), which is pretty sweet.
2
oh lol, I figured it was O(1) on technicality since there's limited precision. Shows me for not going and reading a proof!
View all comments
Show parent comment
5
u/norude1 Oct 14 '26
powf is definitely not O(1) https://youtu.be/u24AjKinHNU?t=177