bug#73561: Couple of typos in the documentation

zvavybir via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <et57fcynaYnDDqeECDNwtC-s5SkFPNXeqErTlLQ_UTzBOIu1Vba6PQdZKpaHrR5kgLHMQqOsHDyf1p9k61HMxIEOxplEeHrZPha2AD8_F0c=@zvavybir.eu>
Package: guile
Version: 3.0.10
Severity: minor
Tags: patch

There are a couple typos of missing brackets/parentheses in the documentation (for example in the PDF on page 127 under integer-expt or in the first code block of page 601).

As I don't know texinfo (only (La)TeX), I don't know if this patch is correct, but at least it should be trivial for someone who knows what they're doing to write a correct one based on it:

From 60f0c00557603bbfbc018c9ae37b55754d5d2c3e Mon Sep 17 00:00:00 2001
From: Matthias Kaak <[email protected]>
Date: Sun, 29 Sep 2024 21:01:00 +0000
Subject: [PATCH] Fixed a couple of typos in the documentation

* doc/ref/api-data.texi: Added missing brackets of exponents in math
  mode
* doc/ref/api-io.texi: Added missing brackets of exponents in math mode
* doc/ref/srfi-modules.texi: Added missing closing parenthesis

Signed-off-by: Matthias Kaak <[email protected]>
---
 doc/ref/api-data.texi     | 8 ++++----
 doc/ref/api-io.texi       | 2 +-
 doc/ref/srfi-modules.texi | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index b2473d1f9..d089b355a 100644
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -214,8 +214,8 @@ rational is also real, and every real number is also a complex number
 In addition to the classification into integers, rationals, reals and
 complex numbers, Scheme also distinguishes between whether a number is
 represented exactly or not.  For example, the result of
-@m{2\sin(\pi/4),2*sin(pi/4)} is exactly @m{\sqrt{2},2^(1/2)}, but Guile
-can represent neither @m{\pi/4,pi/4} nor @m{\sqrt{2},2^(1/2)} exactly.
+@m{2\sin(\pi/4),2*sin(pi/4)} is exactly @m{\sqrt{2},2^{1/2}}, but Guile
+can represent neither @m{\pi/4,pi/4} nor @m{\sqrt{2},2^{1/2}} exactly.
 Instead, it stores an inexact approximation, using the C type
 @code{double}.
 
@@ -1721,7 +1721,7 @@ when @var{count} is negative.  This is an ``arithmetic'' shift.
 
 @deffn {Scheme Procedure} round-ash n count
 @deffnx {C Function} scm_round_ash (n, count)
-Return @math{round(n * 2^count)}.
+Return @math{round(n * 2^{count})}.
 @var{n} and @var{count} must be exact integers.
 
 With @var{n} viewed as an infinite-precision twos-complement
@@ -1781,7 +1781,7 @@ zero bit in twos complement form.
 Return @var{n} raised to the power @var{k}.  @var{k} must be an exact
 integer, @var{n} can be any number.
 
-Negative @var{k} is supported, and results in @m{1/n^|k|, 1/n^abs(k)}
+Negative @var{k} is supported, and results in @m{1/n^{|k|}, 1/n^{abs(k)}}
 in the usual way.  @math{@var{n}^0} is 1, as usual, and that includes
 @math{0^0} is 1.
 
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 79bc9e9d6..a53e1555f 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -1096,7 +1096,7 @@ See also @ref{Ports and File Descriptors, open}, for an interface
 to the Unix @code{open} system call.
 
 All file access uses the ``LFS'' large file support functions when
-available, so files bigger than 2 gibibytes (@math{2^31} bytes) can be
+available, so files bigger than 2 gibibytes (@math{2^{31}} bytes) can be
 read and written on a 32-bit system.
 
 Most systems have limits on how many files can be open, so it's
diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi
index 02da3e2f2..6d4d233b7 100644
--- a/doc/ref/srfi-modules.texi
+++ b/doc/ref/srfi-modules.texi
@@ -550,7 +550,7 @@ following shows a list reversal and the calls it makes,
 
 (cons 1 '())
 (cons 2 '(1))
-(cons 3 '(2 1)
+(cons 3 '(2 1))
 @result{} (3 2 1)
 @end example
 
-- 
2.45.2


(PS: The bug-reporting documentation under https://debbugs.gnu.org/Reporting.html and https://www.gnu.org/software/guile/contribute/ contradict each other about which e-mail address this report should be sent to.  I hope I choose the/a correct one.)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.