floating point calculation problem

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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,743
Latest member
WoodrowMea

Latest Threads

Top