cubic_roots Subroutine

public subroutine cubic_roots(parameters, real_roots, complex_roots, flag)

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: parameters(4)
real(kind=pr), intent(out) :: real_roots(3)
complex(kind=pr), intent(out) :: complex_roots(3)
integer, intent(out) :: flag

flag that identifies which case the solution is - 0: 3 real rotos, one of them repeated (use real_roots(1) and real_roots(2)) - 1: 1 real root, 2 complex roots. Use real_roots(1) and complex_roots(1) and complex_roots(2) - -1: 3 real roots, all different


Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: disc
real(kind=pr), public :: nan
real(kind=pr), public :: p
real(kind=pr), public, parameter :: pi = atan(1.0_pr)*4.0_pr
real(kind=pr), public :: q
real(kind=pr), public :: theta
real(kind=pr), public :: u
real(kind=pr), public :: v