Literals/Floating point: Difference between revisions

Content added Content deleted
(Kotlin entry)
(→‎{{header|Rust}}: Added rust)
Line 998: Line 998:
Underscores can be used for clarity:
Underscores can be used for clarity:
1_000_000_000.01
1_000_000_000.01

=={{header|Rust}}==
<lang rust>2.3 // Normal floating point literal
3. // Equivalent to 3.0 (3 would be interpreted as an integer)
2f64 // The type (in this case f64, a 64-bit floating point number) may be appended to the value
1_000.2_f32 // Underscores may appear anywhere in the number for clarity.<lang rust>


=={{header|Scala}}==
=={{header|Scala}}==