rpn_stack Module


Used by


Contents


Variables

Type Visibility Attributes Name Initial
logical, public :: complex_mode = .false.
integer, public :: dec_places = 6
logical, public :: degrees_mode = .true.
real(kind=8), public :: eps = 1.0d-14
integer, public :: nroots = 0
real(kind=8), public, parameter :: pi = 4*atan(1.0d0)
type(rpn_t), public, allocatable :: roots(:)
real(kind=8), public, parameter :: to_deg = 180/pi
real(kind=8), public, parameter :: to_rad = pi/180

Interfaces

interface

  • public module function acosine_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function add_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function add_rpns(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function ahcosine_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function ahsine_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function ahtangent_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function asine_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function atangent2_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function atangent_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function cbrt_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function chs_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module subroutine clear_stackt(stk)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk

interface

  • public module function conj_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function cosine_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function divide_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function divide_rpns(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function exp_10_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function exp_2_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function exp_e_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function fact_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function gamma_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function get_places() result(r)

    Arguments

    None

    Return Value integer

interface

  • public module function get_size_stackt(stk) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(in) :: stk

    Return Value integer

interface

  • public module function get_value_rpns(this, is_cartesian) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: this
    logical, intent(out), optional :: is_cartesian

    Return Value complex(kind=8)

interface

  • public module function hcosine_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function hsine_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function htangent_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module subroutine init(lang)

    Arguments

    Type IntentOptional Attributes Name
    character(len=5), intent(in), optional :: lang

interface

  • public module function is_cartesian_rpns(this) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: this

    Return Value logical

interface

  • public module function is_integer_rpns(this) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: this

    Return Value logical

interface

  • public module function is_positive_real_rpns(this) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: this

    Return Value logical

interface

  • public module function is_real_rpns(this) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: this

    Return Value logical

interface

  • public module function len_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function lg_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function ln_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function log2_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function multiply_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function multiply_rpns(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function ncr_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function next_root_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function npr_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function peek_stackt(stk, idx) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk
    integer, intent(in) :: idx

    Return Value type(rpn_t)

interface

  • public module function percent_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function pop_stackt(stk) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk

    Return Value type(rpn_t)

interface

  • public module function power_2_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function power_3_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function power_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function power_rpns(this, x) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: this
    real(kind=8), intent(in) :: x

    Return Value type(rpn_t)

interface

  • public module function previous_root_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module subroutine print_stackt(stk, ve_mode)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(in) :: stk
    logical, intent(in) :: ve_mode

interface

  • public module subroutine push_all_stackt(stk, z, is_cart)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk
    complex(kind=8), intent(in) :: z
    logical, intent(in), optional :: is_cart

interface

  • public module subroutine push_r_stackt(stk, x)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk
    real(kind=8) :: x

interface

  • public module subroutine push_stackt(stk, z)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk
    type(rpn_t) :: z

interface

  • public module function reciprocal_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function root_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module subroutine rotate_down_stackt(stk)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk

interface

  • public module subroutine rotate_up_stackt(stk)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk

interface

  • public module function round(x) result(r)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(in) :: x

    Return Value real(kind=8)

interface

  • public module subroutine set_angle_unit_rpns(this, degrees)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(inout) :: this
    logical, intent(in) :: degrees

interface

  • public module subroutine set_legend_stackt(stk, legend)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk
    character(len=2), intent(in) :: legend(:)

interface

  • public module subroutine set_places(n)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: n

interface

  • public module subroutine set_stackt(stk, z, idx)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk
    type(rpn_t), intent(in) :: z
    integer, intent(in), optional :: idx

interface

  • public module subroutine set_to_rpns(this, z)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(inout) :: this
    type(rpn_t), intent(in) :: z

interface

  • public module subroutine set_value_rpns(this, z, is_cartesian)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(inout) :: this
    complex(kind=8), intent(in), optional :: z
    logical, intent(in), optional :: is_cartesian

interface

  • public module function sine_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function sqrt_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module function subtract_fr(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function subtract_rpns(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

interface

  • public module function swap_real_imaginary_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

interface

  • public module subroutine swap_stackt(stk)

    Arguments

    Type IntentOptional Attributes Name
    class(stack_t(*)), intent(inout) :: stk

interface

  • public module function tangent_fr(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)

public interface to_cartesian

  • public module function to_cartesian_rpns(stk_z) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: stk_z

    Return Value type(rpn_t)

public interface to_polar

  • public module function to_polar_rpns(stk_z) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: stk_z

    Return Value type(rpn_t)

interface

  • public module subroutine to_string(x, str)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=8), intent(in) :: x
    character(len=:), intent(out), allocatable :: str

interface

  • public module subroutine write_rpns(se, unit, iotype, v_list, iostat, iomsg)

    Arguments

    Type IntentOptional Attributes Name
    class(rpn_t), intent(in) :: se
    integer, intent(in) :: unit
    character, intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character, intent(inout) :: iomsg

Abstract Interfaces

abstract interface

  • public function binary_f(a, b) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a
    type(rpn_t), intent(in) :: b

    Return Value type(rpn_t)

abstract interface

  • public function unary_f(a) result(r)

    Arguments

    Type IntentOptional Attributes Name
    type(rpn_t), intent(in) :: a

    Return Value type(rpn_t)


Derived Types

type, public ::  rpn_t

Type-Bound Procedures

generic, public :: assignment(=) => set_to_rpns
procedure , public :: get_value => get_value_rpns Interface
procedure , public :: is_cartesian => is_cartesian_rpns Interface
procedure , public :: is_integer => is_integer_rpns Interface
procedure , public :: is_positive_real => is_positive_real_rpns Interface
procedure , public :: is_real => is_real_rpns Interface
generic, public :: operator(*) => multiply_rpns
generic, public :: operator(**) => power_rpns
generic, public :: operator(+) => add_rpns
generic, public :: operator(-) => subtract_rpns
generic, public :: operator(/) => divide_rpns
procedure , public :: set_angle_unit => set_angle_unit_rpns Interface
procedure , public :: set_value => set_value_rpns Interface
generic, public :: write(formatted) => write_rpns

type, public ::  stack_t

Components

Type Visibility Attributes Name Initial
integer, public, len :: ssize

Type-Bound Procedures

procedure , public :: clear => clear_stackt Interface
procedure , public :: get_size => get_size_stackt Interface
procedure , public :: peek => peek_stackt Interface
procedure , public :: pop => pop_stackt Interface
procedure , public :: print => print_stackt Interface
generic, public :: push => push_stackt, push_all_stackt, push_r_stackt
procedure , public :: rotate_down => rotate_down_stackt Interface
procedure , public :: rotate_up => rotate_up_stackt Interface
procedure , public :: set => set_stackt Interface
procedure , public :: set_legend => set_legend_stackt Interface
procedure , public :: swap => swap_stackt Interface