Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

Stebalien
Copy link
Member

No description provided.

Kubuxu added 4 commits August 22, 2024 15:39
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>
@Stebalien Stebalien force-pushed the steb/min-ticket-mathutil branch from f62d9e1 to 9bb6034 Compare August 22, 2024 19:52
var minTicket float64 = math.Inf(1)
var minTicket *big.Float

const precision = 257
Copy link
Member Author

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)))
Copy link
Member Author

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)?

@Stebalien Stebalien force-pushed the steb/min-ticket-mathutil branch from 9bb6034 to cdb6762 Compare August 22, 2024 21:06
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.41%. Comparing base (e96ace0) to head (cdb6762).
Report is 9 commits behind head on test/deny-quality2.

Additional details and impacted files

Impacted file tree graph

@@                  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     
Files Coverage Δ
gpbft/gpbft.go 88.58% <100.00%> (+0.11%) ⬆️

... and 6 files with indirect coverage changes

@Kubuxu Kubuxu force-pushed the test/deny-quality2 branch from 06a26eb to 7297962 Compare August 23, 2024 20:39
@Kubuxu
Copy link
Contributor

Kubuxu commented Aug 24, 2024

Superceeded by #578

@Kubuxu Kubuxu closed this Aug 24, 2024
@Stebalien Stebalien deleted the steb/min-ticket-mathutil branch October 28, 2024 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants