Skip to contentSkip to conversation

trig: fix variable use in formulas

PATCH In review Stephen Kitt 2 participants 2 messages Mar 22, 2022 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trig: fix variable use in formulas

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

---
 man3/cacosh.3 | 2 +-
 man3/catan.3  | 2 +-
 man3/catanh.3 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
man3/cacosh.3 +1 -1
index 079a59c5c..2ab7c56b1 100644
@@ -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);
 }
man3/catan.3 +1 -1
index f410dd303..d28f84b20 100644
@@ -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);
 }
man3/catanh.3 +1 -1
index 47d4f17f1..8ef81d998 100644
@@ -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

Signature · 1 line
2.30.2
#1 lore raw

Hi Stephen!

Quoted 5 lines · 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.

Patch applied. I edited the subject line to be:
cacosh.3, catan.3, catanh.3: EXAMPLES: Fix variable use in formulas

Thanks,

Alex

Quoted 47 lines
---
  man3/cacosh.3 | 2 +-
  man3/catan.3  | 2 +-
  man3/catanh.3 | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)
man3/cacosh.3 +1 -1
index 079a59c5c..2ab7c56b1 100644
@@ -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);
  }
man3/catan.3 +1 -1
index f410dd303..d28f84b20 100644
@@ -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);
  }
man3/catanh.3 +1 -1
index 47d4f17f1..8ef81d998 100644
@@ -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

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/