Module Name: src
Committed By: riastradh
Date: Tue Feb 16 14:44:26 UTC 2021
Modified Files:
src/lib/libc/stdio: printf.3 wprintf.3
src/lib/libc/stdlib: rand48.3
Log Message:
Correct floating-point terminology.
Might want to harmonize the printf(3) and wprintf(3) descriptions of
`%a'.
To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/lib/libc/stdio/printf.3
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/stdio/wprintf.3
cvs rdiff -u -r1.13 -r1.14 src/lib/libc/stdlib/rand48.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/stdio/printf.3
diff -u src/lib/libc/stdio/printf.3:1.68 src/lib/libc/stdio/printf.3:1.69
--- src/lib/libc/stdio/printf.3:1.68 Sun Dec 31 07:22:55 2017
+++ src/lib/libc/stdio/printf.3 Tue Feb 16 14:44:25 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: printf.3,v 1.68 2017/12/31 07:22:55 dholland Exp $
+.\" $NetBSD: printf.3,v 1.69 2021/02/16 14:44:25 riastradh Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -619,7 +619,7 @@ to represent the hex digits, and the let
.Ql P
(rather than
.Ql p )
-to separate the mantissa and exponent.
+to separate the significand and exponent.
.Pp
Note that there may be multiple valid ways to represent floating-point
numbers in this hexadecimal format.
@@ -630,8 +630,8 @@ and
are all equivalent.
The format chosen depends on the internal representation of the
number, but the implementation guarantees that the length of the
-mantissa will be minimized.
-Zeroes are always represented with a mantissa of 0 (preceded by a
+significand will be minimized.
+Zeroes are always represented with a significand of 0 (preceded by a
.Ql -
if appropriate) and an exponent of
.Li +0 .
Index: src/lib/libc/stdio/wprintf.3
diff -u src/lib/libc/stdio/wprintf.3:1.8 src/lib/libc/stdio/wprintf.3:1.9
--- src/lib/libc/stdio/wprintf.3:1.8 Thu Dec 16 17:42:27 2010
+++ src/lib/libc/stdio/wprintf.3 Tue Feb 16 14:44:25 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: wprintf.3,v 1.8 2010/12/16 17:42:27 wiz Exp $
+.\" $NetBSD: wprintf.3,v 1.9 2021/02/16 14:44:25 riastradh Exp $
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -459,13 +459,13 @@ is equal to the precision specification.
If the precision is missing, it is taken as enough to exactly
represent the floating-point number; if the precision is
explicitly zero, no hexadecimal-point character appears.
-This is an exact conversion of the mantissa+exponent internal
+This is an exact conversion of the significand+exponent internal
floating point representation; the
.Sm off
.Oo \- Oc Li 0x Ar h Li \&. Ar hhh
.Sm on
-portion represents exactly the mantissa; only denormalized
-mantissas have a zero value to the left of the hexadecimal
+portion represents exactly the significand; only in subnormal numbers do
+significands have a zero value to the left of the hexadecimal
point.
The
.Cm p
@@ -488,7 +488,7 @@ to represent the hex digits, and the let
.Ql P
(rather than
.Ql p )
-to separate the mantissa and exponent.
+to separate the significand and exponent.
.It Cm C
Treated as
.Cm c
Index: src/lib/libc/stdlib/rand48.3
diff -u src/lib/libc/stdlib/rand48.3:1.13 src/lib/libc/stdlib/rand48.3:1.14
--- src/lib/libc/stdlib/rand48.3:1.13 Sat Feb 22 13:20:21 2020
+++ src/lib/libc/stdlib/rand48.3 Tue Feb 16 14:44:25 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: rand48.3,v 1.13 2020/02/22 13:20:21 kamil Exp $
+.\" $NetBSD: rand48.3,v 1.14 2021/02/16 14:44:25 riastradh Exp $
.\"
.\" Copyright (c) 1993 Martin Birgmeier
.\" All rights reserved.
@@ -67,7 +67,7 @@ computational step is to perform a singl
and
.Fn erand48
return values of type double.
-The full 48 bits of r(n+1) are loaded into the mantissa of the
+The full 48 bits of r(n+1) are loaded into the significand of the
returned value, with the exponent set such that the values produced
lie in the interval [0.0, 1.0).
.Pp