Hacker News new | ask | show | jobs
by Ragib_Zaman 2386 days ago
And the pow and log methods they call run loops anyway. What is wrong with loops anyway?
1 comments

> the pow and log methods they call run loops anyway.

That's actually not true (as somebody mentioned on reddit) https://github.com/openjdk-mirror/jdk/blob/jdk8u/jdk8u/maste...

It is probably slower anyway, but I was surprised to see no loops

They kind of cheated because they used a hard-coded polynomial approximation of log(x). So there is an implicit unrolled loop going over A_i*x^i.