Transaction time takes too long when doing float multiplication
I consistently get the message:
Error 3080006: Transaction took too long
everytime that I include the following line of code:
result += int(x)*factor;
Where x is a number, and factor is a double which is less than 1.
The same code works if factor is 10, or 100. But it fails with transaction taking too long everytime factor is 0.1 or 0.01.
interesting, floating point operation takes more time?
all floating point operations are emulated using integer operations. However, the timing is also affected by your actual machine speed. You can either optimize it by using pure integer operations or try to have less number of floating point ops.