constants_m Module

Predefined constants, including math constants.



Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: ip = int32

Default integer precision

integer, public, parameter :: ip_long = int64

Default long integer precision

integer, public, parameter :: rp = real64

Default real precision

integer, public, parameter :: sizeof_char = 1

Size of a char in bytes

integer, public, parameter :: sizeof_int = 4

Size of a default int in bytes

integer, public, parameter :: sizeof_long_int = 8

Size of a default long int in bytes

integer, public, parameter :: sizeof_real = 8

Size of a default real in bytes

real(kind=rp), public, parameter :: math_third = 0.333333333333333_rp

One third :

real(kind=rp), public, parameter :: math_pi = 3.1415926535897931_rp

pi :

real(kind=rp), public, parameter :: math_pi_2 = 1.5707963267948966_rp

pi/2 :

real(kind=rp), public, parameter :: math_pi_4 = 0.78539816339744828_rp

pi/4 :

real(kind=rp), public, parameter :: math_1_pi = 0.31830988618379069_rp

Reciprocal of pi :

real(kind=rp), public, parameter :: math_2_pi = 0.63661977236758138_rp

Two times reciprocal of pi :

real(kind=rp), public, parameter :: math_2_sqrtpi = 1.1283791670955126_rp

Two times the reciprocal of the square root of pi :

real(kind=rp), public, parameter :: math_sqrt2 = 1.4142135623730951_rp

Square root of two :

real(kind=rp), public, parameter :: math_cbrt2 = 1.2599210498948732_rp

Cube root of two :

real(kind=rp), public, parameter :: math_sqrt1_2 = 0.70710678118654746_rp

Reciprocal of the square root of two :

real(kind=rp), public, parameter :: math_sqrt3 = 1.7320508075688772_rp

Square root of three :

real(kind=rp), public, parameter :: math_sqrt_e = 1.6487212707001282_rp

Square root of e :

real(kind=rp), public, parameter :: math_sqrt_pi = 1.7724538509055159_rp

Square root of pi :

real(kind=rp), public, parameter :: math_e = 2.7182818284590451_rp

The base of natural logarithm :

real(kind=rp), public, parameter :: math_log2e = 1.4426950408889634_rp

The logarithm of e to base two :

real(kind=rp), public, parameter :: math_log10e = 0.43429448190325182_rp

The logarithm of e to base 10 :

real(kind=rp), public, parameter :: math_ln2 = 0.69314718055994529_rp

The natural logarithm of two :

real(kind=rp), public, parameter :: math_ln10 = 2.3025850929940459_rp

The natural logarithm of 10 :