diff options
Diffstat (limited to 'man3/catanh.3')
-rw-r--r-- | man3/catanh.3 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/man3/catanh.3 b/man3/catanh.3 index c936cc5e2..b0134546d 100644 --- a/man3/catanh.3 +++ b/man3/catanh.3 @@ -61,30 +61,30 @@ C99, POSIX.1-2001. .\" SRC BEGIN (catanh.c) .EX /* Link with "\-lm" */ - +\& #include <complex.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> - +\& int main(int argc, char *argv[]) { double complex z, c, f; - +\& if (argc != 3) { fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]); exit(EXIT_FAILURE); } - +\& z = atof(argv[1]) + atof(argv[2]) * I; - +\& c = catanh(z); 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(f), cimag(f)); - +\& exit(EXIT_SUCCESS); } .EE |