mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Prevent overflow in effective GF calculation
For deep dives with long deco, the sum of deco stops could overflow. This is prevent by turning it into long. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
5eec251be8
commit
ca38644005
1 changed files with 4 additions and 4 deletions
|
@ -153,8 +153,8 @@ const double vpmb_conservatism_lvls[] = { 1.0, 1.05, 1.12, 1.22, 1.35 };
|
||||||
|
|
||||||
#define TISSUE_ARRAY_SZ sizeof(ds->tissue_n2_sat)
|
#define TISSUE_ARRAY_SZ sizeof(ds->tissue_n2_sat)
|
||||||
|
|
||||||
int sumx, sum1;
|
int sum1;
|
||||||
long sumxx;
|
long sumx, sumxx;
|
||||||
double sumy, sumxy;
|
double sumy, sumxy;
|
||||||
|
|
||||||
double get_crit_radius_He()
|
double get_crit_radius_He()
|
||||||
|
@ -649,7 +649,7 @@ double regressionb()
|
||||||
|
|
||||||
void reset_regression()
|
void reset_regression()
|
||||||
{
|
{
|
||||||
sumx = sum1 = 0;
|
sum1 = 0;
|
||||||
sumxx = 0L;
|
sumxx = sumx = 0L;
|
||||||
sumy = sumxy = 0.0;
|
sumy = sumxy = 0.0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue