Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Dec 2022 00:46:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 268421] ATAN2(3) manpage contains UTF8 character codes
Message-ID:  <bug-268421-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268421

            Bug ID: 268421
           Summary: ATAN2(3) manpage contains UTF8 character codes
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Manual Pages
          Assignee: bugs@FreeBSD.org
          Reporter: dclarke@blastwave.org
                CC: doc@FreeBSD.org

Looking at the manpage for ATAN2(3) where I see the strange usage of
some UTF8 characters where a trivial asterisk '*' would be fine. This
page does not render on my XTerm with a whole collection of fonts
available.=20

$ uname -apKU=20
FreeBSD callisto 13.1-RELEASE-p3 FreeBSD 13.1-RELEASE-p3 GENERIC amd64 amd64
1301000 1301000

$ man atan2 | grep 'satisfy' | hdump -Ax -t x1 -v
     0:  20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
    10:  73 61 74 69 73 66 79 20 78 20 3d 20 72 e2 88 97
    20:  63 6f 73 20 74 68 65 74 61 20 61 6e 64 20 79 20
    30:  3d 20 72 e2 88 97 73 69 6e 20 74 68 65 74 61 2e
    40:  20 20 54 68 65 73 65 20 65 71 75 61 74 69 6f 6e
    50:  73 0a
    52:=20
$

There we see the strange UTF-8 char byte sequence "e2 88 97".


On NetBSD 9.3 I see :=20

NOTES
     The function atan2() defines "if x > 0," atan2(0, 0) =3D 0 on a VAX de=
spite
     that previously atan2(0, 0) may have generated an error message.  The
     reasons for assigning a value to atan2(0, 0) are these:

           1.   Programs that test arguments to avoid computing atan2(0, 0)
                must be indifferent to its value.  Programs that require it=
 to
                be invalid are vulnerable to diverse reactions to that
                invalidity on diverse computer systems.

           2.   The atan2() function is used mostly to convert from
                rectangular (x,y) to polar (r,theta) coordinates that must
                satisfy x =3D r*cos theta and y =3D r*sin theta.  These equ=
ations
                are satisfied when (x=3D0,y=3D0) is mapped to (r=3D0,theta=
=3D0) on a
                VAX.  In general, conversions to polar coordinates should be
                computed thus:

                      r    :=3D hypot(x,y);  ... :=3D sqrt(x*x+y*y)
                      theta     :=3D atan2(y,x).

           3.   The foregoing formulas need not be altered to cope in a
                reasonable way with signed zeros and infinities on a machine
                that conforms to IEEE 754; the versions of hypot(3) and
                atan2() provided for such a machine are designed to handle =
all
                cases.  That is why atan2(+-0, -0) =3D +-pi for instance.  =
In
                general the formulas above are equivalent to these:

                      r :=3D sqrt(x*x+y*y); if r =3D 0 then x :=3D copysign=
(1,x);



Those are trivial asterisk chars 0x2A ASCII and they work everywhere.


--=20
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268421-227>