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

sfbrigade / adopt-a-drain / 590 / 1
97%
production: 97%

Build:
DEFAULT BRANCH: production
Ran 23 Jan 2018 04:38AM UTC
Files 25
Run time 2s
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

23 Jan 2018 04:36AM UTC coverage: 98.582%. Remained the same
2.2.3

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`.

278 of 282 relevant lines covered (98.58%)

2.45 hits per line

Source Files on job 590.1 (2.2.3)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 590
  • Travis Job 590.1
  • 82fa46f6 on github
  • Prev Job for 2.2.3 on production (#578.1)
  • Next Job for 2.2.3 on production (#604.1)
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