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

Cast function should convert scientific notation to correct decimal value #844

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

harveyyue
Copy link
Contributor

Which issue does this PR close?

Closes #843 .

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

}

fn scientific_to_string(s: &str) -> String {
match s.parse::<f64>() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a precision loss when casting via floating point numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, should use bigdecimal to handle it?

@harveyyue harveyyue force-pushed the fix_scientific branch 3 times, most recently from 589eed7 to fc324e4 Compare February 26, 2025 08:11
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.

Cast function should convert scientific notation to correct decimal value
2 participants