! Program Example from "Essential Fortran 90 & 95" by Loren P. Meissner
! Copyright 1996. Copying for sale requires permission from the author.
! Otherwise, distribution is permitted if these three lines are included.

! Example P.2. (Catherine Spade, 4 October 1999)
! Examples of intrinsic library functions.
  program A02
    implicit none
    real :: A
    real, parameter :: B = 1.234, C = 5.678
    integer, parameter :: I = 9, J = 10
! start program A02
    A = sqrt( B ) + abs( C )
    write (unit = *, fmt = *) A, int( A ), nint( A ), real( I ), I
    write (unit = *, fmt = *) I / J, modulo( I, J ), abs( I ), sign( I, 1 ), sign( I, -1 )
    write (unit = *, fmt = *) B, B / C, modulo( B, C ), abs( B )
    write (unit = *, fmt = *) sign( B, 1.0 ), sign( B, -1.0 )
    write (unit = *, fmt = *) atan2( 0.0, -1.0 ), exp( 1.0 )
    write (unit = *, fmt = *) cos( 1.0 ), sin( 1.0 ), tan( 1.0 ), log( 2.0 ), log10( 2.0 )
    stop
  end program A02

