void pump::loop()
{
float amount;
float rate;
amount = getAmount(kB, vf, (timeValue), bC);
rate = getRate(kA, kB, vf, (timeValue),bC);
timeValue = timeValue + 1000;
float myQtApp::getAmount(float kB, float vf, float timeValue, float bC)
{
float amount;
amount=expf(-kB*timeValue)*bC*vf;
float myQtApp::getRate( float kA, float kB, float vf, float timeValue, float bC)
return(amount);
}
float myQtApp::getRate( float kA, float kB, float vf, float timeValue, float bC)
{
float rate;
float ga1 = getAmount(kB,vf,timeValue, bC);
float ga2 = getAmount(kB,vf, (timeValue+1), bC);
rate = -(expf(-kA) * ga1 - ga2); // it is here the calculation problem ocuurs
return(rate);
}
void pump::loop()
{
float amount;
float rate;
amount = getAmount(kB, vf, (timeValue), bC);
rate = getRate(kA, kB, vf, (timeValue),bC);
timeValue = timeValue + 1000;
float myQtApp::getAmount(float kB, float vf, float timeValue, float bC)
{
float amount;
amount=expf(-kB*timeValue)*bC*vf;
float myQtApp::getRate( float kA, float kB, float vf, float timeValue, float bC)
return(amount);
}
float myQtApp::getRate( float kA, float kB, float vf, float timeValue, float bC)
{
float rate;
float ga1 = getAmount(kB,vf,timeValue, bC);
float ga2 = getAmount(kB,vf, (timeValue+1), bC);
rate = -(expf(-kA) * ga1 - ga2); // it is here the calculation problem ocuurs
return(rate);
}
To copy to clipboard, switch view to plain text mode
it if very small number so I think an expanation could possibly be that qt rounds off the values. How can I tell qt to include as many decimals as possible in this calculations?
Bookmarks