mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
nixos/doc/option-types: add precision loss warning for floats
This commit is contained in:
parent
5480f45f63
commit
52bbbaeb09
2 changed files with 14 additions and 0 deletions
|
@ -140,6 +140,11 @@ merging is handled.
|
|||
|
||||
: A floating point number.
|
||||
|
||||
::: {.warning}
|
||||
Converting a floating point number to a string with `toString` or `toJSON`
|
||||
may result in [precision loss](https://github.com/NixOS/nix/issues/5733).
|
||||
:::
|
||||
|
||||
`types.number`
|
||||
|
||||
: Either a signed integer or a floating point number. No implicit conversion
|
||||
|
|
|
@ -256,6 +256,15 @@
|
|||
<para>
|
||||
A floating point number.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
Converting a floating point number to a string with
|
||||
<literal>toString</literal> or <literal>toJSON</literal>
|
||||
may result in
|
||||
<link xlink:href="https://github.com/NixOS/nix/issues/5733">precision
|
||||
loss</link>.
|
||||
</para>
|
||||
</warning>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
|
Loading…
Reference in a new issue