testprofile on i686

Berthold Stoeger bstoeger at mail.tuwien.ac.at
Fri Dec 3 03:49:48 PST 2021


Hi Robert,

On Donnerstag, 2. Dezember 2021 08:38:25 CET Robert Helling via subsurface 
wrote:

> 		fn2 = (int)(1000.0 * entry->pressures.n2 / 
amb_pressure);

This looks ill-defined. You probably want lrint(...) or (int)(round(...)) or  
(int)(ceil(...)) or (int)(floor(...)) for reproducible behavior.

The whole code looks fishy to me (why round to int in the first place?).

Berthold




More information about the subsurface mailing list