Skip to content

Overflow in Legendre polynomials #1

Description

@astrojuanlu

I am getting infinite overflows when computing Legendre polynomials of high order:

>> [data, dataD] = associated_legendre(360, 0.0, 'none');
>> data(150, 150)
ans =  -1.2553e+304
>> data(151, 151)
ans = Inf

and, as expected, NaN when computing the normalized polynomial:

>> [dataN, dataDN] = associated_legendre(360, 0.0, 'egm96');
>> dataN(150, 150)
ans = 0
>> dataN(151, 151)
ans = NaN

Does this affect the results displayed in https://people.sc.fsu.edu/~lb13f/projects/space_environment/egm96.php in some way? I haven't run the whole script yet because I am not sure whether it's going to work in Octave, but I stopped here and wanted to ask anyway.

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