B
bei
Hello,
I was bothered by the following problem for a while and could not
understand how it happened.
Basically, i am doing an interpolation from a random position to the
closest grid point position. They are a lot of
floating point calculation in the code. Below is a part of the code
that resulted in large errors:
q0 = 1.0-2.5*pow(((v/dv+(N-0.5))-j0), 2.0)+1.5*pow(((v/dv+(N-0.5))-
j0), 3.0);
I was bothered by the following problem for a while and could not
understand how it happened.
Basically, i am doing an interpolation from a random position to the
closest grid point position. They are a lot of
floating point calculation in the code. Below is a part of the code
that resulted in large errors:
q0 = 1.0-2.5*pow(((v/dv+(N-0.5))-j0), 2.0)+1.5*pow(((v/dv+(N-0.5))-
j0), 3.0);