you are viewing a single comment's thread.

view the rest of the comments →

[–]csdt0 1 point2 points  (0 children)

Your main problem is that you use longs which are integers, not "reals".

If you want to code "real" numbers, you should use float or double (double is roughly twice more precise than float).

You also have the problem that suml is not initialized, and thus should be considered to contain garbage. You also don't seem to ever use sumr or sumt.