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

implement Log10 and CmpUint64 #134

Closed
wants to merge 2 commits into from
Closed

implement Log10 and CmpUint64 #134

wants to merge 2 commits into from

Conversation

holiman
Copy link
Owner

@holiman holiman commented Mar 28, 2023

Work in progress

Adds the following methods

// CmpUint64 compares z and x and returns:
//
//	-1 if z <  x
//	 0 if z == x
//	+1 if z >  x
func (z *Int) CmpUint64(n uint64) int 

// Log10 returns the log in base 10, floored to nearest integer.
// **OBS** This method returns '0' for '0', not `-Inf`.
func (z *Int) Log10() uint

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #134 (f93e900) into master (71f8c05) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #134   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines         1615      1671   +56     
=========================================
+ Hits          1615      1671   +56     

uint256.go Outdated Show resolved Hide resolved
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.

1 participant