I am porting some code from Matlab to C++.
In Matlab
format long D = 0.689655172413793 (this is 1.0 / 1.45) E = 2600 / D // I get E
If I understand what you are trying to achieve, using ceil function might help:
ceil
ans = ceil(ans); /* smallest integral value that is not less than ans. */ // now ans in C++ is also be 3970.
Here is usage reference.