Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • FORCES FORCES
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CHSCHS
  • FORCESFORCES
  • Issues
  • #29
Closed
Open
Issue created Nov 22, 2021 by Sebastian Müller@muellese🐈Owner

short-circuits for exact equality in mo_utils and code reuse

Routines in mo_utils could be simplified like this:

  logical elemental pure function equal_dp(a, b) result(boolean)

    real(dp), intent(in) :: a
    real(dp), intent(in) :: b

    boolean = (a == b)
    if (boolean) return
    boolean = .not. ((epsilon(1.0_dp) * abs(b) - abs(a - b)) < 0.0_dp)

  end function equal_dp


  logical elemental pure function greaterequal_dp(a, b) result(boolean)

    real(dp), intent(in) :: a
    real(dp), intent(in) :: b

    boolean = equal_dp(a, b) .or. (a > b)

  end function greaterequal_dp
Assignee
Assign to
Time tracking