Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 3
    \$\begingroup\$ When using FP numbers that have an integer part of 0, you can omit the leading zero as well; .0, .5 are both valid \$\endgroup\$ Commented Jun 6, 2023 at 20:33
  • \$\begingroup\$ @Starwort: Can you? If I try to do this in modernish Rust, say, using .024 instead of 0.024, I get "error: float literals must have an integer part", and tells me I need to change .024 to 0.024. Might have changed over editions? \$\endgroup\$ Commented Oct 17 at 0:20