Hello,
I have two variables, x and y, inside a loop. X gets the value of an AP (1,3,5,7,...) while Y gets the value of a GP (1,-1,1,-1). My problem is that the value of 1(x*y) is rounded by the computer to 0. Here is part of the source code of my program.
...
float value;
...
while (loop_count != max){
...
value += 1/(x*y);
...
What am I doing wrong? How can I fix this?
Thanks a lot!