public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Kitt <steve@sk2.org>
To: Alejandro Colomar <alx.manpages@gmail.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>
Cc: linux-man@vger.kernel.org, Stephen Kitt <steve@sk2.org>
Subject: [PATCH] trig: fix variable use in formulas
Date: Mon, 21 Mar 2022 23:19:35 +0100	[thread overview]
Message-ID: <20220321221935.177256-1-steve@sk2.org> (raw)

The cacosh, catan, and catanh man pages include examples using a
non-existant f2 variable. Replacing the f2 references with f fixes the
examples.

Signed-off-by: Stephen Kitt <steve@sk2.org>
---
 man3/cacosh.3 | 2 +-
 man3/catan.3  | 2 +-
 man3/catanh.3 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/man3/cacosh.3 b/man3/cacosh.3
index 079a59c5c..2ab7c56b1 100644
--- a/man3/cacosh.3
+++ b/man3/cacosh.3
@@ -81,7 +81,7 @@ main(int argc, char *argv[])
     printf("cacosh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
 
     f = 2 * clog(csqrt((z + 1)/2) + csqrt((z \- 1)/2));
-    printf("formula  = %6.3f %6.3f*i\en", creal(f2), cimag(f2));
+    printf("formula  = %6.3f %6.3f*i\en", creal(f), cimag(f));
 
     exit(EXIT_SUCCESS);
 }
diff --git a/man3/catan.3 b/man3/catan.3
index f410dd303..d28f84b20 100644
--- a/man3/catan.3
+++ b/man3/catan.3
@@ -79,7 +79,7 @@ main(int argc, char *argv[])
     printf("catan() = %6.3f %6.3f*i\en", creal(c), cimag(c));
 
     f = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i);
-    printf("formula = %6.3f %6.3f*i\en", creal(f2), cimag(f2));
+    printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f));
 
     exit(EXIT_SUCCESS);
 }
diff --git a/man3/catanh.3 b/man3/catanh.3
index 47d4f17f1..8ef81d998 100644
--- a/man3/catanh.3
+++ b/man3/catanh.3
@@ -80,7 +80,7 @@ main(int argc, char *argv[])
     printf("catanh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
 
     f = 0.5 * (clog(1 + z) \- clog(1 \- z));
-    printf("formula  = %6.3f %6.3f*i\en", creal(f2), cimag(f2));
+    printf("formula  = %6.3f %6.3f*i\en", creal(f), cimag(f));
 
     exit(EXIT_SUCCESS);
 }

base-commit: b7c97d642a4ea5629412a9542d1bef351dc2571d
-- 
2.30.2


             reply	other threads:[~2022-03-22 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 22:19 Stephen Kitt [this message]
2022-03-22 11:54 ` [PATCH] trig: fix variable use in formulas Alejandro Colomar (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220321221935.177256-1-steve@sk2.org \
    --to=steve@sk2.org \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox