Skip to content

find_knot claims to handle floating point errors, but seems to cause them #252

@amaramth

Description

@amaramth

if i run the getting started hello world, but replace spline.equidistant_knot_seq(15) with spline.equidistant_knot_seq(7000), it makes lots of NaN, but if i remove tinyspline.c#L1216-L1222 the results appear correct

 * It is recommended that ::TS_KNOT_EPSILON is aligned to the span of
 * ::TS_DOMAIN_DEFAULT_MIN and ::TS_DOMAIN_DEFAULT_MAX. That is, adjacent
 * floating point values in the domain [::TS_DOMAIN_DEFAULT_MIN,
 * ::TS_DOMAIN_DEFAULT_MAX] should not be equal according to
 * ::TS_KNOT_EPSILON.

this issue may be related to the default TS_KNOT_EPSILON not having this property

i'd like to know what the purpose of lines 1216-1222 is, in case removing them bites later

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