Update formatFloat* docs to reflect limitation w/ large floats

This commit is contained in:
Mason Remaley 2023-12-30 07:14:54 -05:00 committed by GitHub
parent 27d4bf7534
commit 19ea7ca63c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1009,8 +1009,10 @@ pub fn formatBuf(
}
/// Print a float in scientific notation to the specified precision. Null uses full precision.
/// It should be the case that every full precision, printed value can be re-parsed back to the
/// same type unambiguously.
/// For floats with less than 64 bits, it should be the case that every full precision, printed
/// value can be re-parsed back to the same type unambiguously.
///
/// Floats with more than 64 are currently rounded, see https://github.com/ziglang/zig/issues/1181
pub fn formatFloatScientific(
value: anytype,
options: FormatOptions,
@ -1213,6 +1215,8 @@ pub fn formatFloatHexadecimal(
/// Print a float of the format x.yyyyy where the number of y is specified by the precision argument.
/// By default floats are printed at full precision (no rounding).
///
/// Floats with more than 64 bits are not yet supported, see https://github.com/ziglang/zig/issues/1181
pub fn formatFloatDecimal(
value: anytype,
options: FormatOptions,