• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sfbrigade / adopt-a-drain / 590
97%

Build:
DEFAULT BRANCH: production
Ran 23 Jan 2018 04:38AM UTC
Jobs 1
Files 25
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
590

push

travis-ci

jszwedko
Switch from Haversine formula to earth_distance Postgres extension

More readible and solves the issues we had where the query lat/lng
resulting in a value outside of [1,-1] within ACOS() leading to an
error, "input is out of range". This appears to occur when the lat/lng
in the query exactly matches a thing's location. E.g.

```
SELECT
  ACOS(
    COS(RADIANS(37.7876114900295))
    * COS(RADIANS(37.78761149002950))
    * COS(RADIANS(-122.39915856367400) - RADIANS(-122.399158563674))
    + SIN(RADIANS(37.7876114900295))
    * SIN(RADIANS(37.78761149002950))
  )
;
```

Results in `ERROR:  input is out of range`.

I _think_ this is because of floating point imprecision because if we
remove the ACOS:

```
SELECT
  COS(RADIANS(37.7876114900295))
  * COS(RADIANS(37.78761149002950))
  * COS(RADIANS(-122.39915856367400) - RADIANS(-122.399158563674))
  + SIN(RADIANS(37.7876114900295))
  * SIN(RADIANS(37.78761149002950))
;
```

We get `1` which should give an `ACOS(1)` == `0`.

1 of 1 new or added line in 1 file covered. (100.0%)

278 of 282 relevant lines covered (98.58%)

2.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 590.1 (2.2.3) 23 Jan 2018 04:38AM UTC 0
98.58
Travis Job 590.1
Source Files on build 590
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #590
  • 82fa46f6 on github
  • Prev Build on production (#578)
  • Next Build on production (#604)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc