Clicky

Fortran Wiki
spacing (changes)

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

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

Description

Determines the distance between the argument x and the nearest adjacent number of the same type.

Standard

(削除) Fortran 95 and later (削除ここまで)(追記) Fortran 95 (追記ここまで)(追記) and later (追記ここまで)

Class

Elemental function

Syntax

result = spacing(x)

Arguments

  • x - Shall be of type real.

Return value

The result is of the same type as the input argument x.

Example

program test_spacing
 integer, parameter :: sgl = selected_real_kind(p=6, r=37)
 integer, parameter :: dbl = selected_real_kind(p=13, r=200)
 write(*,*) spacing(1.0_sgl) ! "1.1920929e-07" on i686
 write(*,*) spacing(1.0_dbl) ! "2.220446049250313e-016" on i686
end program

See also

rrspacing

category: (削除) Intrinsics (削除ここまで)(追記) intrinsics (追記ここまで)

Revised on April 30, 2009 17:35:26 by Jason Blevins (71.70.142.190) (745 characters / 0.0 pages)
Edit | Back in time (1 revision) | Hide changes | History | Views: Print | TeX | Source | Linked from: Intrinsic procedures, rrspacing

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