Skip to content

ChebyCoeff::slope_a() type error leads to incorrect result #29

@jakelangham

Description

@jakelangham

ChebyCoeff::slope_a() for nontrivial profiles typically returns extremely high values - at least for my build environment (gcc 6.4.0).

This is because the loop index n is given as auto, becoming an unsigned int, but its negation is required in the computation leading to an overflow.

I wonder if some compilers behave differently leading to this not being picked up before.

Anyway, this can be fixed quickly by using an int instead, as in ChebyCoeff::slope_b().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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