Skip to content

Conversation

@ozgunozerk
Copy link
Collaborator

@ozgunozerk ozgunozerk commented Dec 12, 2025

Documentation Pull Request

Summary

Type of Change

  • New documentation
  • Documentation update/revision
  • Fix typos or grammar
  • Restructure/reorganize content
  • Add examples or tutorials
  • Update API documentation
  • Other: ___________

Related Issues

Fixes #
Relates to #

Checklist

Additional Notes

@ozgunozerk ozgunozerk requested a review from brozorec December 12, 2025 11:36
@ozgunozerk ozgunozerk self-assigned this Dec 12, 2025
@netlify
Copy link

netlify bot commented Dec 12, 2025

Deploy Preview for openzeppelin-docs-v2 ready!

Name Link
🔨 Latest commit 9cb10d2
🔍 Latest deploy log https://app.netlify.com/projects/openzeppelin-docs-v2/deploys/693fbb03aea3be000873651b
😎 Deploy Preview https://deploy-preview-99--openzeppelin-docs-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +29 to +32
**Floating-Point (`f64`, `f32`):**
- Non-deterministic behavior across platforms
- Rounding errors that compound in financial calculations
- Security vulnerabilities from precision loss
Copy link
Collaborator

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

Copy link
Collaborator Author

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

Copy link
Collaborator

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..."

@ozgunozerk ozgunozerk requested a review from brozorec December 15, 2025 07:38
Copy link
Collaborator

@brozorec brozorec left a 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?

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.

3 participants