Single.From
A value as a single-precision floating-point number (Single.Type).
Group: Values, types and errors. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Single.From(value as any, optional culture as nullable text) as nullable number
| Parameter | Type | Description |
|---|---|---|
value | any | The value to convert: a number, text, a logical, a date, datetime, time or duration; null gives null. |
culture | nullable text optional | The culture text is read in, such as "nb-NO"; the query's culture when left out. |
Returns
nullable number. The number; null for null.
Remarks
- A single keeps about seven significant digits: the answer is the nearest number it can hold, shown with all its digits.
Examples
Text
Single.From("12.25")
12.25
A tenth is not exact
Single.From(0.1)
0.10000000149011612
0.1 has no exact binary form; in single precision the nearest is a little more.