Clicky

Fortran Wiki
aint (Rev #1, changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #0 to #1: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Description

aint(a [, kind]) truncates its argument to a whole number.

Standard

Fortran 77 and later

Class

Elemental function

Syntax

result = aint(a [, kind])

Arguments

  • a - the type of the argument shall be real.
  • kind - (optional) an integer initialization expression indicating the kind parameter of the result.

Return value

The return value is of type real with the kind type parameter of the argument if the optional kind is absent; otherwise, the kind type parameter will be given by kind. If the magnitude of x is less than one, aint(x) returns zero. If the magnitude is equal to or greater than one then it returns the largest whole number that does not exceed its magnitude. The sign is the same as the sign of x.

Example

program test_aint
 real(4) x4
 real(8) x8
 x4 = 1.234E0_4
 x8 = 4.321_8
 print *, aint(x4), dint(x8)
 x8 = aint(x4,8)
end program test_aint

category: Intrinsics

Revision from April 24, 2009 15:44:23 by Jason Blevins
Forward in time (to current) | See current | History | Rollback | View: Source | Linked from: Intrinsic procedures

AltStyle によって変換されたページ (->オリジナル) /