3 ms·
interesting, I am a physicist and I use (modern 2018 standard) Fortran on a daily basis, the reason being that it perfectly suits my research needs, in particul
by TheRealKing 7y ago
interesting, I am a physicist and I use (modern 2018 standard) Fortran on a daily basis, the reason being that it perfectly suits my research needs, in particular, for its concise vectorized array-based syntax. For example, to compute the statistical mean of a weighted sample of points, represented by the two vectors Weight and Point, I'd do,
mean = sum(Weight*Point) / sum(Weight)
where sum() is an intrinsic Fortran function. I am curious to know how this computation would be done in C++?