documentation: Explain how a float will be transformed into a string

`prim_toString` uses `state.coerceToString`, which in turns defers to
`std::to_string` for floats, which 'Converts a floating point value to a
string as if by std::sprintf(buf, "%f", value)'.
Finally, the `%f` specifier 'Converts floating-point number to the
decimal notation in the style [-]ddd.ddd. Precision specifies the exact
number of digits to appear after the decimal point character. The
default precision is 6.'

Closes #747

Change-Id: I42339651005d20f272459cf9f80b274f2076b1e3
This commit is contained in:
Tom Hubrecht
2025-03-18 13:42:25 +01:00
parent 3ed99ad26e
commit a5e2376350
+2
View File
@@ -13,6 +13,8 @@ Convert the expression *e* to a string. *e* can be:
- An integer.
- A floating-point value, it will be converted to the decimal notation in the style `[-]ddd.ddd` with 6 digits appearing after the decimal point.
- A list, in which case the string representations of its elements
are joined with spaces.