public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trig: fix variable use in formulas
@ 2022-03-21 22:19 Stephen Kitt
  2022-03-22 11:54 ` Alejandro Colomar (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Kitt @ 2022-03-21 22:19 UTC (permalink / raw)
  To: Alejandro Colomar, Michael Kerrisk; +Cc: linux-man, Stephen Kitt

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-22 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-21 22:19 [PATCH] trig: fix variable use in formulas Stephen Kitt
2022-03-22 11:54 ` Alejandro Colomar (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox