What does DATA INF/1.D+300/ mean in Fortran?
fortran
Solution
The `D` means "× 10???", or commonly known as the `e` in `1.e+300` in C#, but it's for double precision.
The `DOUBLE PRECISION` statement just defines 3 variables to be of type `double`.
The `DATA` statement
DATA X/Y/
translates to
X = Y;
in C#. Hence you get
double INF = 1.e+300, DMIN, D12;
Since `INF` is so large I believe it means "Infinity", in that case it's better to use the real IEEE infinity (`double INF = double.PositiveInfinity, ...`).
Problem
I'm translating some Fortran to our C# app and I'm trying to figure out what a bit of Fortran means at the top of a function. ``` DOUBLE PRECISION INF, DMIN, D12 DATA INF/1.D+300/ ``` What would the value of INF be?