Skip to content

S2Cell.GetDistanceToEdge test failure #505

@jmr

Description

@jmr

https://github.com/google/s2geometry/actions/runs/20560316982/job/59050110468?pr=453

[ RUN      ] S2Cell.GetDistanceToEdge
/home/runner/work/s2geometry/s2geometry/src/s2/s2cell_test.cc:759: Failure
The difference between expected_min.radians() and actual_min.radians() is 4.2146848233670653e-08, which exceeds 3e-8, where
expected_min.radians() evaluates to 3.1415926535897931,
actual_min.radians() evaluates to 3.1415926114429449, and
3e-8 evaluates to 2.9999999999999997e-08.
Google Test trace:
/home/runner/work/s2geometry/s2geometry/src/s2/s2cell_test.cc:746: Iteration 559

[  FAILED  ] S2Cell.GetDistanceToEdge (376 ms)

The comment says the max error is "about 3e-8", so the tolerance could just be too low.

// Max error for S1ChordAngle as it approaches Pi is about 3e-8.
EXPECT_NEAR(expected_min.radians(), actual_min.radians(), 3e-8);

@ericveach

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions