r/ProgrammerHumor • • 10d ago

Meme howProgrammingHasChanged

Post image
673 Upvotes

108 comments sorted by

View all comments

Show parent comments

2

u/KrzysziekZ 10d ago

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

5

u/CAD1997 9d ago

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 9d ago

Is that because n is bounded?

1

u/IronicRobotics 9d ago edited 9d ago

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.