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

tarantool / luajit / 6849941328
93%

Build:
DEFAULT BRANCH: tarantool/master
Ran 13 Nov 2023 12:30PM UTC
Jobs 1
Files 89
Run time 9s
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

13 Nov 2023 12:17PM UTC coverage: 88.466% (-0.01%) from 88.476%
6849941328

push

github

igormunkin
x86/x64: Fix math.ceil(-0.9) result sign.

Reported by minoki.

(cherry-picked from commit 674afcd4e)

The `ceil` (`floor`) math function implementation calculates (|x| +
2^52) - 2^52 for its argument to determine the fractional part of x, so
it will be rounded to the nearest integer and its sign is restored.
After that, if the original value is < (>) than the result, the -1 (1)
is subtracted from it. Take a look at the `ceil()` case. The result of
the operation `-1 - (-1)` is +0 for FP arithmetic, against -0 expected
as a result.

This patch changes the `- (-1)` operation to `+ 1` and restores sign
after it again.

NB: Since in DUALNUM mode on x86/x64 all results are tried to be
converted to integers, the sign of 0 is neglected.

Sergey Kaplun:
* added the description and the test for the problem

Part of tarantool/tarantool#9145

Reviewed-by: Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org>
Signed-off-by: Igor Munkin <imun@tarantool.org>

5360 of 5975 branches covered (0.0%)

Branch coverage included in aggregate %.

20542 of 23304 relevant lines covered (88.15%)

2751219.21 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.11
-2.63% src/lj_vmmath.c
4
75.83
-0.24% src/lj_opt_fold.c
Jobs
ID Job ID Ran Files Coverage
1 6849941328.1 13 Nov 2023 12:30PM UTC 89
88.47
GitHub Action Run
Source Files on build 6849941328
  • Tree
  • List 89
  • Changed 85
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #6849941328
  • 439a3a03 on github
  • Prev Build on tarantool/master (#6848089359)
  • Next Build on tarantool/master (#6851160821)
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

© 2025 Coveralls, Inc