Skip to content

Overflow when computing radial dipole moments between orbitals of high ℓs #2

Description

@jagot
julia> radial_dipole_moment(o"9i", o"7h")
ERROR: DomainError with -4.055919775679775e17:
sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
Stacktrace:
 [1] throw_complex_domainerror(::Symbol, ::Float64) at ./math.jl:33
 [2] sqrt at ./math.jl:557 [inlined]
 [3] sqrt at ./math.jl:583 [inlined]
 [4] radial_dipole_moment(::Orbital{Int64}, ::Orbital{Int64}) at /Users/jagot/.julia/dev/Hydrogen/src/dipoles.jl:53

The culprit is this factor
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions