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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top