forked from fortran-lang/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstdlib_kinds.fypp
27 lines (21 loc) · 879 Bytes
/
stdlib_kinds.fypp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#:include "common.fypp"
!> Version: experimental
!>
!> The specification of this module is available [here](../page/specs/stdlib_kinds.html).
module stdlib_kinds
use iso_fortran_env, only: int8, int16, int32, int64
use iso_c_binding, only: c_bool
implicit none
private
public :: sp, dp, xdp, qp, int8, int16, int32, int64, lk, c_bool
!> Single precision real numbers
integer, parameter :: sp = selected_real_kind(6)
!> Double precision real numbers
integer, parameter :: dp = selected_real_kind(15)
!> Extended double precision real numbers
integer, parameter :: xdp = #{if WITH_XDP}#selected_real_kind(18)#{else}#-1#{endif}#
!> Quadruple precision real numbers
integer, parameter :: qp = #{if WITH_QP}#selected_real_kind(33)#{else}#-1#{endif}#
!> Default logical kind parameter
integer, parameter :: lk = kind(.true.)
end module stdlib_kinds