diff --git a/nixos/doc/manual/development/option-types.section.md b/nixos/doc/manual/development/option-types.section.md index 7864b62605c2..40b4d78b250e 100644 --- a/nixos/doc/manual/development/option-types.section.md +++ b/nixos/doc/manual/development/option-types.section.md @@ -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 diff --git a/nixos/doc/manual/from_md/development/option-types.section.xml b/nixos/doc/manual/from_md/development/option-types.section.xml index e207b97a46f8..4036bc0ba743 100644 --- a/nixos/doc/manual/from_md/development/option-types.section.xml +++ b/nixos/doc/manual/from_md/development/option-types.section.xml @@ -256,6 +256,15 @@ A floating point number. + + + Converting a floating point number to a string with + toString or toJSON + may result in + precision + loss. + +