Fortran Wiki
huge

Description

huge(x) returns the largest number that is not an infinity in the model of the type of x.

Standard

Fortran 95 and later

Class

Inquiry function

Syntax

result = huge(x)

Arguments

  • x - Shall be of type real or integer.

Return value

The return value is of the same type and kind as x

Example

program test_huge_tiny
  print *, huge(0), huge(0.0), huge(0.0d0)
  print *, tiny(0.0), tiny(0.0d0)
end program test_huge_tiny

category: intrinsics