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

doc: reflect current intf32 behaviour #9433

Merged

Conversation

larpon
Copy link
Contributor

@larpon larpon commented Mar 23, 2021

Documentation should reflect current state of affairs.
Current state (with 0c055a1) is precision loss:

mut f := f32(3.2)
i := int(2147483583)
f = i // loss of precision
println('${f:.2f} $i')
// 2147483520.00 2147483583

Closes #8601 Closes #6251

Related #4971 #5155 #5174 #7692 #7801

@medvednikov medvednikov merged commit 35c60cf into vlang:master Mar 23, 2021
@larpon larpon deleted the fix/document-current-int-to-f32-behaviour branch September 27, 2021 07:19
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.

Documentation: clarify automatic promotion from int to f32 Documentation: type promotion
2 participants