You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey - just looking at this. thank you for submitting the pull request.
I did have one question, I'm not familiar with what trim/decNumberTrim does. I realize you switched to reduce, which makes sense, but is there an independent function of trim that we possibly want to offer for its own reasons?
potentially? the C code has a comment describing decNumberTrim as "remove insignificant zeros", while the comment for decNumberReduce is "remove trailing zeros". I don't understand how these are different in terms of functionality, and would like to for the purposes of assessing whether the Rust api should also provide a trim method on d128.
Frankly, I don't know. decNumberTrim is a utility function as it's called internally, I'm not sure it should be part of the API. Anyway, I don't think this decision should be made as part of this PR.
@jonathanstrong is there a concern regarding usage of decNumberReduce()?
This file contains hidden or 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
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.
The idea is to use
decQuadReduce()function that eliminates insignificant zeroes from the number before hashing.