mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
nixos/doc/option-types: add precision loss warning for floats
This commit is contained in:
parent
5480f45f63
commit
52bbbaeb09
@ -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 New Issue
Block a user