Literals/Floating point: Difference between revisions
Content added Content deleted
Jazzedpineda (talk | contribs) (Added EasyLang implementation) |
|||
Line 797: | Line 797: | ||
=={{header|Kotlin}}== |
=={{header|Kotlin}}== |
||
There are two floating point types: Double (64 bits) and Float (32 bits). The default floating point type is Double. |
|||
⚫ | |||
⚫ | |||
Double literals must end with a decimal point with at least one digit after it, and/or a scientific notation suffix made with <code>e</code> (or <code>E</code>) followed by an integer literal. |
|||
⚫ | |||
⚫ | |||
A Float literal is made by appending <code>f</code> (or <code>F</code>) to a Double or Int literal (see [[Literals/Integer#Kotlin|integer literals]]). |
|||
⚫ | |||
val d = 1.0 // Double |
|||
⚫ | |||
⚫ | |||
val f2 = 7.28832e5F // Float |
|||
⚫ | |||
=={{header|Lasso}}== |
=={{header|Lasso}}== |