Sourceware Bugzilla – Attachment 9018 Details for
Bug 19673
clog10 docs appear to be erroneous
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test code
clog10-test.c (text/plain), 655 bytes, created by
Yaakov Selkowitz
on 2016-02-18 21:20:37 UTC
(
hide
)
Description:
test code
Filename:
MIME Type:
Creator:
Yaakov Selkowitz
Created:
2016-02-18 21:20:37 UTC
Size:
655 bytes
patch
obsolete
>#define _GNU_SOURCE >#include <complex.h> >#include <math.h> >#include <stdbool.h> >#include <stdio.h> > >double complex >test_clog10(double complex z, bool manpages) >{ > double r; > > if (manpages) > r = carg(z) / M_LN10; > else > r = carg(z); > return log10(cabs(z)) + r * I; >} > >int >main(void) { > double complex c, r1, r2; > > c = 4 + 5*I; > r1 = clog10(c); > r2 = test_clog10(c, false); > printf("%g + I%g %s %g + I%g\n", > creal(r1), cimag(r1), r1 == r2 ? "==" : "!=", creal(r2), cimag(r2)); > r2 = test_clog10(c, true); > printf("%g + I%g %s %g + I%g\n", > creal(r1), cimag(r1), r1 == r2 ? "==" : "!=", creal(r2), cimag(r2)); > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 19673
: 9018