-
Notifications
You must be signed in to change notification settings - Fork 49
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
String conversion from decimal (#108) #122
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
bb5f382
relaxed marshaling, slow base 10 parsing
fb12295
update version
6866965
add control to benchmark
55f7ffc
make the ci thing less angry
5689315
make the ci even less angy
3c7131f
add fuzz tests
elee1766 5a106b0
change map
elee1766 b296df7
magic
elee1766 cb2c910
clear z on SetFrombig, even if b is nil
elee1766 df6b926
Update conversion.go
elee1766 bd117d9
Update conversion.go
Tjudice 048efc0
Merge pull request #1 from Tjudice/patch-1
elee1766 9a76ab7
base10: minor api change, added docs
holiman 42313ad
ci, go.mod: require go 1.18+
holiman 7e0467a
squashme: circle fixes
holiman 7f61ee9
properly cgheck for overflow in fuzz
elee1766 1d8f726
number overflow test
elee1766 f4e6c19
added comments to explain fromBase10Long
elee1766 84510f7
Update base10.go
elee1766 6e4f914
Update base10.go
elee1766 e25ce45
lift up
elee1766 8420f46
change cutLength to local constant
elee1766 3fc5f08
better doc
elee1766 d6f32f6
base10: modify algorithm + fixup tests a bit
holiman 8c858a1
base10: fuzzing found some bugs, which were fixed
holiman 078a8e6
fuzzing: some improvements to the fuzzer
holiman 2413444
add oss-fuzz fuzzer, rename base10 to decimal
holiman 2e6c49f
decimal: fix conversion on base 0, fallback to big.Int
holiman 765b02b
decimal: move some unused constants
holiman 3430ee5
more failing tests
holiman cbdcdcb
decimal: remove SetString method
holiman 38d53f3
decimal: simplify tests
holiman ca9a5ea
rm unused constants, fix benchmarks
holiman 9518831
Update decimal.go
elee1766 ad5ba70
Update conversion.go
elee1766 301af32
change sql valuer
elee1766 b5a4906
remove extra struct def
elee1766 fb7ceef
testing: try to get 100% coverage again
holiman 4ef03d7
lintfix
holiman 5587dd6
fuzzing: fix up fuzzer for string conversion
holiman 7ff0d8f
circle: try to get circleci fuzzing going
holiman 5019647
conversion: more coverage + fix in Scan
holiman 2f0b0b7
decimal_test: more coverage
holiman dcd75fd
go.mod: fuzzing dep
holiman 0472e9b
conversion: consistent use of ptr receiver
holiman d55274d
circle: make use of restored corpus
holiman 82fd325
properly parse scientific notation
elee1766 35d62f2
add some overflow cases for scan, and error on overflow
elee1766 88226a1
conversion minor nitpicks
holiman 5ff06b0
conversion: fix test
holiman 091c3f9
conversion_test: bring coverage back to 100
holiman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
1e0
should be1
, not0
... ?Not sure what
0e0
is defined as, need to check that.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.
isn't that what this will return? assume
X = splt[0], Y = splt[1]
I think XeY woudl be
X * 10 ^ Y
so0e0
should be0 * 10^0 = 0
In the previous lines, i do
dst.SetFromDecimal(X)
then if
Y == 0
, then i should just return, sinceX*10^0=X
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.
My bad, yes you're right