On Sun, 2014-11-09 at 18:38 +0900, Malcolm Cohen wrote:
> >>! double precision :: max_allowed = 1.0d+75
> >> double precision :: max_allowed = sqrt(sqrt(huge(max_allowed)))
> >
> >Probably not relevant to your problem, and perhaps a result of incorrect
> >copy-and-paste, but how does the above work if the first line is a
> >comment?
>
> max_allowed is specified to be double precision, so huge(max_allowed) is
> well-defined, and most compilers accept this, as if it were written
>
> double precision :: max_allowed
> parameter ( max_allowed = sqrt(sqrt(huge(max_allowed))) )
>
> Technically I think this is beyond the standard, but it is not 100% clear.
> Anyway I've not seen anyone reject this particular kind of thing, though I
> do think it is confusingly bad style at best.
There was an interp that resulted in
integer, parameter :: N = bit_size(n)
being illegal. How is this one different?
|