-
Notifications
You must be signed in to change notification settings - Fork 8
stellar-wad #99
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
base: main
Are you sure you want to change the base?
stellar-wad #99
Conversation
✅ Deploy Preview for openzeppelin-docs-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| **Floating-Point (`f64`, `f32`):** | ||
| - Non-deterministic behavior across platforms | ||
| - Rounding errors that compound in financial calculations | ||
| - Security vulnerabilities from precision loss |
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.
floating points numbers are not part of the Soroban types system, so I see no value of mentioning them
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.
I disagree, the reason they do not exist in Soroban types are the ones above. So for anyone looking for alternatives, these reasons will convince them to not implement floating points in Soroban
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.
I find this formulation confusing. Here's how I read the whole section "Problems with Alternatives": we can use integers and floating points, but they are not good for the reasons that are listed, i.e. that implies they exist in Soroban.
I like you want to provide a more general perspective that's not Soroban-related, but I think this should be more explicit, smth like "in a non-blockchain env those aren't optimal for this and that reason, and in more restraint env such as blockchains it becomes inevitable we need a better representation because we only have integers..."
brozorec
left a comment
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.
LGTM 👍
This PR might need some more changes after the audit completion so for the moment, just commenting. Are you fine with this?
Documentation Pull Request
Summary
Type of Change
Related Issues
Fixes #
Relates to #
Checklist
pnpm run buildpnpm run checkAdditional Notes