* [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
* Re: [PATCH] trig: fix variable use in formulas
2022-03-21 22:19 [PATCH] trig: fix variable use in formulas Stephen Kitt
@ 2022-03-22 11:54 ` Alejandro Colomar (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar (man-pages) @ 2022-03-22 11:54 UTC (permalink / raw)
To: Stephen Kitt; +Cc: linux-man, Michael Kerrisk
Hi Stephen!
On 3/21/22 23:19, Stephen Kitt wrote:
> 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>
Patch applied. I edited the subject line to be:
cacosh.3, catan.3, catanh.3: EXAMPLES: Fix variable use in formulas
Thanks,
Alex
> ---
> 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
--
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
^ permalink raw reply [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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.