-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use mathutil for ticket calculations #580
Conversation
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
f62d9e1
to
9bb6034
Compare
var minTicket float64 = math.Inf(1) | ||
var minTicket *big.Float | ||
|
||
const precision = 257 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the upstream example. I assume there's a reason they use the extra precision bit.
c = 256 - c | ||
ticketF := big.NewFloat(0).SetPrec(precision).SetInt(m) | ||
ticketF.SetMantExp(ticketF, -precision) | ||
ticketF.Add(ticketF, big.NewFloat(float64(c))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. Do we need more precision for this (+8 bits)?
9bb6034
to
cdb6762
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## test/deny-quality2 #580 +/- ##
======================================================
- Coverage 79.75% 79.41% -0.35%
======================================================
Files 50 50
Lines 4525 4532 +7
======================================================
- Hits 3609 3599 -10
- Misses 563 574 +11
- Partials 353 359 +6
|
06a26eb
to
7297962
Compare
Superceeded by #578 |
No description provided.