#include <assert.h>
#include <stdio.h>
-const float THIRD = (1.0/3.0);
-const float f_0 = 47.7; // 47.7 MHz from [Alg 1.1], to convert frequency into wavenumber and vica versa
+const double THIRD = (1.0/3.0);
+const double f_0 = 47.7; // 47.7 MHz from [Alg 1.1], to convert frequency into wavenumber and vica versa
using namespace std;
kdv = propv.mdvar;
no_situation_variability = kdv >= 20;
if (no_situation_variability)
- no_situation_variability -= 20;
+ kdv -= 20;
no_location_variability = kdv >= 10;
if (no_location_variability)
n = 10 * ka - 5;
kb = n - ka + 1;
sn = n - 1;
- assert((s = new double[n+2]) != 0);
+ s = new double[n+2];
s[0] = sn;
s[1] = 1.0;
xb = (xb - xa) / sn;