r/ProgrammerHumor • • Oct 13 '26

Meme howProgrammingHasChanged

Post image
673 Upvotes

108 comments sorted by

View all comments

Show parent comment

2

u/KrzysziekZ Oct 14 '26

Is power O(1) not something like log log n?

5

u/CAD1997 Oct 14 '26

Mat::pow is O(log n)ish. powf is O(1) for any useful model; even a perfectly rounded result can be computed in a bounded maximum number of machine steps.

1

u/KrzysziekZ Oct 14 '26

Is that because n is bounded?

1

u/IronicRobotics Oct 14 '26 edited Oct 14 '26

Likely, I seem to have been repeating a potentially false fact about floating point powers. I didn't verify it with a proof last night lol.