diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
commit | fc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch) | |
tree | ce1e3bce06471410239a6f41282e328770aa404a /upstream/opensuse-leap-15-6/man3/sincos.3 | |
parent | Initial commit. (diff) | |
download | manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip |
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-leap-15-6/man3/sincos.3')
-rw-r--r-- | upstream/opensuse-leap-15-6/man3/sincos.3 | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/upstream/opensuse-leap-15-6/man3/sincos.3 b/upstream/opensuse-leap-15-6/man3/sincos.3 new file mode 100644 index 00000000..547bd5a8 --- /dev/null +++ b/upstream/opensuse-leap-15-6/man3/sincos.3 @@ -0,0 +1,115 @@ +'\" t +.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) +.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk +.\" <mtk.manpages@gmail.com> +.\" +.\" SPDX-License-Identifier: GPL-1.0-or-later +.\" +.TH sincos 3 2023-03-30 "Linux man-pages 6.04" +.SH NAME +sincos, sincosf, sincosl \- calculate sin and cos simultaneously +.SH LIBRARY +Math library +.RI ( libm ", " \-lm ) +.SH SYNOPSIS +.nf +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include <math.h> +.PP +.BI "void sincos(double " x ", double *" sin ", double *" cos ); +.BI "void sincosf(float " x ", float *" sin ", float *" cos ); +.BI "void sincosl(long double " x ", long double *" sin ", long double *" cos ); +.fi +.SH DESCRIPTION +Several applications need sine and cosine of the same angle +.IR x . +These functions compute both at the same time, and store the results in +.I *sin +and +.IR *cos . +Using this function can be more efficient than two separate calls to +.BR sin (3) +and +.BR cos (3). +.PP +If +.I x +is a NaN, +a NaN is returned in +.I *sin +and +.IR *cos . +.PP +If +.I x +is positive infinity or negative infinity, +a domain error occurs, and +a NaN is returned in +.I *sin +and +.IR *cos . +.SH RETURN VALUE +These functions return +.IR void . +.SH ERRORS +See +.BR math_error (7) +for information on how to determine whether an error has occurred +when calling these functions. +.PP +The following errors can occur: +.TP +Domain error: \fIx\fP is an infinity +.I errno +is set to +.B EDOM +(but see BUGS). +An invalid floating-point exception +.RB ( FE_INVALID ) +is raised. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.ad l +.nh +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.BR sincos (), +.BR sincosf (), +.BR sincosl () +T} Thread safety MT-Safe +.TE +.hy +.ad +.sp 1 +.SH STANDARDS +GNU. +.SH HISTORY +glibc 2.1. +.SH NOTES +To see the performance advantage of +.BR sincos (), +it may be necessary to disable +.BR gcc (1) +built-in optimizations, using flags such as: +.PP +.in +4n +.EX +cc \-O \-lm \-fno\-builtin prog.c +.EE +.in +.SH BUGS +Before glibc 2.22, the glibc implementation did not set +.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=15467 +.I errno +to +.B EDOM +when a domain error occurred. +.SH SEE ALSO +.BR cos (3), +.BR sin (3), +.BR tan (3) |