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

blockfirm / pine-app / 474 / 1
47%
master: 47%

Build:
DEFAULT BRANCH: master
Ran 30 May 2019 10:49PM UTC
Files 480
Run time 23s
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

30 May 2019 10:43PM UTC coverage: 55.161%. Remained the same
474.1

push

travis-ci

timothyej
Normalize BTC amounts when doing floating-point arithmetic

JavaScript sometimes lose precision when performing floating-point arithmetic.
The precision loss is insignificant to BTC amounts which has a precision of 8
decimals, but it is a problem when comparing numbers, e.g. 0.7 + 0.1 < 0.8 => true.
It could also become a rounding error when summing up large amounts of values.

To prevent this, always normalize BTC amounts to have a precision of 8 decimals
after a new BTC amount has been produced by floating-point arithmetic.
If the amount has more than 8 decimals, the 8th decimal will be rounded. Since
the precision loss is so low, any errors will be rounded to the desired number.

803 of 1974 branches covered (40.68%)

Branch coverage included in aggregate %.

3798 of 6367 relevant lines covered (59.65%)

6.94 hits per line

Source Files on job 474.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 333
  • Travis Job 474.1
  • 15f6de92 on github
  • Prev Job for on master (#473.1)
  • Next Job for on master (#475.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