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
Although other decimal crates also claim to be fixed-point, they all bind the scale to each decimal instance, which changes during operations. They're more like decimal floating point. See the comparisonfor details.
While this primitive_fixed_point_decimal crate binds the scale to decimal type. The decimal types keep their scale for their whole lifetime instead of changing their scale during operations. It is real fixed-point decimal.
Although fixed-point is not suitable for this kind of mathematical calculations, it is still worth measuring the performance.
Does this refer to the number of significant figures or the number of fraction places? This primitive_fixed_point_decimal type supports 38 significant figures, while the number of fraction places is specified by the app. For example, in this BBP algorithm, the intermediate results can exceed 100, so I allocated 3 of the 38 significant figures to the integer part and 35 to the fraction part. Judging by the name "Sig. Figs.", it should be significant figures, so it should be 38.
Does this refer to the "capability of the crate" or the "the correct Pi digits(as you just said)"? If it's the latter, then big_decimal should be 1000, but not "arbitrary".
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.
Although other decimal crates also claim to be fixed-point, they all bind the scale to each decimal instance, which changes during operations. They're more like decimal floating point. See the comparisonfor details.
While this
primitive_fixed_point_decimalcrate binds the scale to decimal type. The decimal types keep their scale for their whole lifetime instead of changing their scale during operations. It is real fixed-point decimal.Although fixed-point is not suitable for this kind of mathematical calculations, it is still worth measuring the performance.