Powers vs Multiplying

BlitzMax Forums/BlitzMax Programming/Powers vs Multiplying

Problem is: Did you ever try to create a power of 2.72343 in your way? ;-)

It ends up constant becase a^b = a * ln(b) on which ln is the worse and calculation intense part.
If you defined your variables correctly (with type not this sluggish B3D style), you could have used :float which would be faster, because yours uses int which ends with double calculation. Gives more accurate results but takes its time.

I always use * if I know the power and if the power is not > 4 (got used to that in B3D where the multiplication is faster for a^x with x < 4)