3 ms·
I think the Fortran equivalent using an implied do-loop is sum([(j*2**(-j),j=1,n)]) Modern Fortran is arguably an array programming language. It has array
by Bostonian 5y ago
I think the Fortran equivalent using an implied do-loop is
sum([(j*2**(-j),j=1,n)])
Modern Fortran is arguably an array programming language. It has array operations like Matlab, Python/Numpy, and R.
- Jtsummers 5y agoI find it weird that that's called "modern" Fortran when that came with Fortran 90. Then I remember that even in 2010 academics (perhaps one of the biggest producers of Fortran today) still seemed to be hung up on F77.
- Bostonian 5y agoYou are right that the Fortran community took a long time adopt standards later than F77. Gfortran handles Fortran 90 and 95 well now, and I think F2003 and F2008 (although I don't use too many features from those standards and cannot say for sure from personal experience). I don't remember how mature gfortran was in 2010. Maybe then g95 was more mature.