google / google/s2geometry

S2Cell.GetDistanceToEdge test failure

Open
#505 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.7k
Forks
357
Avg merge
11h 4m
Merged PRs (30d)
1

Description

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.
https://github.com/google/s2geometry/blob/fd727ebd5c68dfd79d437d579fa988e3ab5cf37d/src/s2/s2cell_test.cc#L758-L759

@ericveach

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.