Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure consistent indentation #57

Open
Beliavsky opened this issue Mar 25, 2024 · 0 comments
Open

Ensure consistent indentation #57

Beliavsky opened this issue Mar 25, 2024 · 0 comments

Comments

@Beliavsky
Copy link

In stdlib_linalg_lapack_s.f90 in stdlib_slartg there is an else if that is not indented consistently with the rest of the block. It's a minor thing, but ultimately there should be an auto-formatting step that ensures consistent indentation.

     pure subroutine stdlib_slartg(f,g,c,s,r)
        ! -- lapack auxiliary routine --
        ! -- lapack is a software package provided by univ. of tennessee,    --
        ! -- univ. of california berkeley, univ. of colorado denver and nag ltd..--
           ! february 2021
        ! Scalar Arguments
        real(sp),intent(out) :: c,r,s
        real(sp),intent(in) :: f,g
        ! Local Scalars
        real(sp) :: d,f1,fs,g1,gs,p,u,uu
        ! Intrinsic Functions
        intrinsic :: abs,sign,sqrt
        ! Executable Statements
        f1 = abs(f)
        g1 = abs(g)
        if (g == zero) then
           c = one
           s = zero
           r = f
        else if (f == zero) then
           c = zero
           s = sign(one,g)
           r = g1
     else if (f1 > rtmin .and. f1 < rtmax .and. g1 > rtmin .and. g1 < rtmax) &
               then
           d = sqrt(f*f + g*g)
           p = one/d
           c = f1*p
           s = g*sign(p,f)
           r = sign(d,f)
        else
           u = min(safmax,max(safmin,f1,g1))
           uu = one/u
           fs = f*uu
           gs = g*uu
           d = sqrt(fs*fs + gs*gs)
           p = one/d
           c = abs(fs)*p
           s = gs*sign(p,f)
           r = sign(d,f)*u
        end if
        return
     end subroutine stdlib_slartg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant