Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc Correct floating-point terminology.



details:   https://anonhg.NetBSD.org/src/rev/6861be4c6bc0
branches:  trunk
changeset: 959512:6861be4c6bc0
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Feb 16 14:44:25 2021 +0000

description:
Correct floating-point terminology.

Might want to harmonize the printf(3) and wprintf(3) descriptions of
`%a'.

diffstat:

 lib/libc/stdio/printf.3  |   8 ++++----
 lib/libc/stdio/wprintf.3 |  10 +++++-----
 lib/libc/stdlib/rand48.3 |   4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

diffs (82 lines):

diff -r b012a153de8d -r 6861be4c6bc0 lib/libc/stdio/printf.3
--- a/lib/libc/stdio/printf.3   Tue Feb 16 10:58:32 2021 +0000
+++ b/lib/libc/stdio/printf.3   Tue Feb 16 14:44:25 2021 +0000
@@ -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 @@
 .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 @@
 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 .
diff -r b012a153de8d -r 6861be4c6bc0 lib/libc/stdio/wprintf.3
--- a/lib/libc/stdio/wprintf.3  Tue Feb 16 10:58:32 2021 +0000
+++ b/lib/libc/stdio/wprintf.3  Tue Feb 16 14:44:25 2021 +0000
@@ -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 @@
 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 @@
 .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
diff -r b012a153de8d -r 6861be4c6bc0 lib/libc/stdlib/rand48.3
--- a/lib/libc/stdlib/rand48.3  Tue Feb 16 10:58:32 2021 +0000
+++ b/lib/libc/stdlib/rand48.3  Tue Feb 16 14:44:25 2021 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index