Skip to content

Legendre Polynomials are defined for arguments lying in -1 ⩽ x ⩽ 1 #22

Open
@sloisel

Description

@sloisel

I got this error:

julia> Pl(1.2,3)
DomainError with 1.2:
Legendre Polynomials are defined for arguments lying in -1 ⩽ x ⩽ 1

I am somewhat perplexed. A polynomial defined on -1 ⩽ x ⩽ 1 is of course defined for all complex x, and in particular for x=1.2. Evaluating a Legendre polynomial at x=1.2 is particularly straightforward when using recurrence relations. I checked the source code of this library and it looks to me like it uses the recurrence relation. I'm not sure why it refuses to work at x=1.2.

Is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions