Powers vs Multiplying

BlitzMax Forums/BlitzMax Programming/Powers vs Multiplying

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

.

There is no reason why the compiler can't replace x^c with ( x * x * ... x ) for sufficiently small values of c. Using multiplication is O( n ) and calculating with exp and ln is constant, but a very large one.