diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-07-20 17:50:44 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-07-20 17:50:44 +0000 |
commit | f18acdf1b716a340b6ac041d5576b96cb55f01e1 (patch) | |
tree | 0c2e4c3b71cb969b2fae566f7c10892d251591f2 | |
parent | 3953ba96e1384e297b889bf9cea4fa0d253b1a0e (diff) |
Document complex math library.
-rw-r--r-- | lib/libm/Makefile | 57 | ||||
-rw-r--r-- | lib/libm/man/cacos.3 | 67 | ||||
-rw-r--r-- | lib/libm/man/cacosh.3 | 68 | ||||
-rw-r--r-- | lib/libm/man/carg.3 | 59 | ||||
-rw-r--r-- | lib/libm/man/casin.3 | 67 | ||||
-rw-r--r-- | lib/libm/man/casinh.3 | 68 | ||||
-rw-r--r-- | lib/libm/man/catan.3 | 69 | ||||
-rw-r--r-- | lib/libm/man/catanh.3 | 68 | ||||
-rw-r--r-- | lib/libm/man/ccos.3 | 66 | ||||
-rw-r--r-- | lib/libm/man/ccosh.3 | 66 | ||||
-rw-r--r-- | lib/libm/man/cexp.3 | 66 | ||||
-rw-r--r-- | lib/libm/man/cimag.3 | 26 | ||||
-rw-r--r-- | lib/libm/man/clog.3 | 73 | ||||
-rw-r--r-- | lib/libm/man/conj.3 | 24 | ||||
-rw-r--r-- | lib/libm/man/cpow.3 | 64 | ||||
-rw-r--r-- | lib/libm/man/cproj.3 | 24 | ||||
-rw-r--r-- | lib/libm/man/creal.3 | 58 | ||||
-rw-r--r-- | lib/libm/man/csin.3 | 66 | ||||
-rw-r--r-- | lib/libm/man/csinh.3 | 65 | ||||
-rw-r--r-- | lib/libm/man/csqrt.3 | 72 | ||||
-rw-r--r-- | lib/libm/man/ctan.3 | 72 | ||||
-rw-r--r-- | lib/libm/man/ctanh.3 | 66 |
22 files changed, 1300 insertions, 31 deletions
diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 435a1daf88c..15fca095884 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.94 2011/07/11 11:07:04 martynas Exp $ +# $OpenBSD: Makefile,v 1.95 2011/07/20 17:50:43 martynas Exp $ # $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $ # # @(#)Makefile 5.1beta 93/09/24 @@ -187,13 +187,17 @@ SRCS+= ${LONG_SRCS} .endif MAN+= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \ - cimag.3 conj.3 copysign.3 cos.3 cosh.3 cproj.3 erf.3 exp.3 \ + copysign.3 cos.3 cosh.3 erf.3 exp.3 \ fdim.3 feclearexcept.3 feenableexcept.3 fegetenv.3 \ fegetround.3 floor.3 fmax.3 fmod.3 hypot.3 ilogb.3 j0.3 \ lgamma.3 logb.3 lrint.3 lround.3 nan.3 nextafter.3 \ remainder.3 rint.3 round.3 scalbn.3 sin.3 sinh.3 sqrt.3 \ tan.3 tanh.3 trunc.3 +MAN+= cacos.3 cacosh.3 carg.3 casin.3 casinh.3 catan.3 catanh.3 \ + ccos.3 ccosh.3 cexp.3 cimag.3 clog.3 conj.3 cpow.3 cproj.3 \ + creal.3 csin.3 csinh.3 csqrt.3 ctan.3 ctanh.3 + MLINKS+=erf.3 erfc.3 MLINKS+=exp.3 exp2.3 MLINKS+=exp.3 expm1.3 @@ -234,12 +238,9 @@ MLINKS+=atan.3 atanf.3 MLINKS+=atan2.3 atan2f.3 MLINKS+=atanh.3 atanhf.3 MLINKS+=ceil.3 ceilf.3 -MLINKS+=cimag.3 cimagf.3 -MLINKS+=conj.3 conjf.3 MLINKS+=copysign.3 copysignf.3 MLINKS+=cos.3 cosf.3 MLINKS+=cosh.3 coshf.3 -MLINKS+=cproj.3 cprojf.3 MLINKS+=erf.3 erfcf.3 MLINKS+=erf.3 erff.3 MLINKS+=exp.3 exp2f.3 @@ -292,6 +293,29 @@ MLINKS+=tan.3 tanf.3 MLINKS+=tanh.3 tanhf.3 MLINKS+=trunc.3 truncf.3 +# complex float versions +MLINKS+=cacos.3 cacosf.3 +MLINKS+=cacosh.3 cacoshf.3 +MLINKS+=carg.3 cargf.3 +MLINKS+=casin.3 casinf.3 +MLINKS+=casinh.3 casinhf.3 +MLINKS+=catan.3 catanf.3 +MLINKS+=catanh.3 catanhf.3 +MLINKS+=ccos.3 ccosf.3 +MLINKS+=ccosh.3 ccoshf.3 +MLINKS+=cexp.3 cexpf.3 +MLINKS+=cimag.3 cimagf.3 +MLINKS+=clog.3 clogf.3 +MLINKS+=conj.3 conjf.3 +MLINKS+=cpow.3 cpowf.3 +MLINKS+=cproj.3 cprojf.3 +MLINKS+=creal.3 crealf.3 +MLINKS+=csin.3 csinf.3 +MLINKS+=csinh.3 csinhf.3 +MLINKS+=csqrt.3 csqrtf.3 +MLINKS+=ctan.3 ctanf.3 +MLINKS+=ctanh.3 ctanhf.3 + # long double versions MLINKS+=acos.3 acosl.3 MLINKS+=acosh.3 acoshl.3 @@ -347,4 +371,27 @@ MLINKS+=tan.3 tanl.3 MLINKS+=tanh.3 tanhl.3 MLINKS+=trunc.3 truncl.3 +# complex long double versions +MLINKS+=cacos.3 cacosl.3 +MLINKS+=cacosh.3 cacoshl.3 +MLINKS+=carg.3 cargl.3 +MLINKS+=casin.3 casinl.3 +MLINKS+=casinh.3 casinhl.3 +MLINKS+=catan.3 catanl.3 +MLINKS+=catanh.3 catanhl.3 +MLINKS+=ccos.3 ccosl.3 +MLINKS+=ccosh.3 ccoshl.3 +MLINKS+=cexp.3 cexpl.3 +MLINKS+=cimag.3 cimagl.3 +MLINKS+=clog.3 clogl.3 +MLINKS+=conj.3 conjl.3 +MLINKS+=cpow.3 cpowl.3 +MLINKS+=cproj.3 cprojl.3 +MLINKS+=creal.3 creall.3 +MLINKS+=csin.3 csinl.3 +MLINKS+=csinh.3 csinhl.3 +MLINKS+=csqrt.3 csqrtl.3 +MLINKS+=ctan.3 ctanl.3 +MLINKS+=ctanh.3 ctanhl.3 + .include <bsd.lib.mk> diff --git a/lib/libm/man/cacos.3 b/lib/libm/man/cacos.3 new file mode 100644 index 00000000000..28c44112498 --- /dev/null +++ b/lib/libm/man/cacos.3 @@ -0,0 +1,67 @@ +.\" $OpenBSD: cacos.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CACOS 3 +.Os +.Sh NAME +.Nm cacos , +.Nm cacosf , +.Nm cacosl +.Nd complex circular arc cosine +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn cacos "double complex z" +.Ft float complex +.Fn cacosf "float complex z" +.Ft long double complex +.Fn cacosl "long double complex z" +.Sh DESCRIPTION +The +.Fn cacos , +.Fn cacosf +and +.Fn cacosl +functions compute the complex circular arc cosine of +.Fa z . +.Pp +For all complex floating-point numbers +.Fa z , +.Bd -literal -offset indent +cacos(z) = Pi/2 - casin(z). +.Ed +.Sh RETURN VALUES +The +.Fn cacos , +.Fn cacosf +and +.Fn cacosl +functions return the complex circular arc cosine of +.Fa z +with unbounded imaginary part, and real part in the interval +.Bq 0, Pi . +.Sh SEE ALSO +.Xr casin 3 , +.Xr catan 3 +.Sh STANDARDS +The +.Fn cacos , +.Fn cacosf +and +.Fn cacosl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/cacosh.3 b/lib/libm/man/cacosh.3 new file mode 100644 index 00000000000..decabb2de4c --- /dev/null +++ b/lib/libm/man/cacosh.3 @@ -0,0 +1,68 @@ +.\" $OpenBSD: cacosh.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CACOSH 3 +.Os +.Sh NAME +.Nm cacosh , +.Nm cacoshf , +.Nm cacoshl +.Nd complex inverse hyperbolic cosine +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn cacosh "double complex z" +.Ft float complex +.Fn cacoshf "float complex z" +.Ft long double complex +.Fn cacoshl "long double complex z" +.Sh DESCRIPTION +The +.Fn cacosh , +.Fn cacoshf +and +.Fn cacoshl +functions compute the complex inverse hyperbolic cosine of +.Fa z . +.Pp +For all complex floating-point numbers +.Fa z , +.Bd -literal -offset indent +cacosh(z) = i acos(z). +.Ed +.Sh RETURN VALUES +The +.Fn cacosh , +.Fn cacoshf +and +.Fn cacoshl +functions return the complex inverse hyperbolic cosine of +.Fa z +with imaginary part in the interval +.Bq -Pi, Pi , +and non-negative real part. +.Sh SEE ALSO +.Xr casinh 3 , +.Xr catanh 3 +.Sh STANDARDS +The +.Fn cacosh , +.Fn cacoshf +and +.Fn cacoshl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/carg.3 b/lib/libm/man/carg.3 new file mode 100644 index 00000000000..2a95238b9b4 --- /dev/null +++ b/lib/libm/man/carg.3 @@ -0,0 +1,59 @@ +.\" $OpenBSD: carg.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CARG 3 +.Os +.Sh NAME +.Nm carg , +.Nm cargf , +.Nm cargl +.Nd complex argument functions +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double +.Fn carg "double complex z" +.Ft float +.Fn cargf "float complex z" +.Ft long double +.Fn cargl "long double complex z" +.Sh DESCRIPTION +The +.Fn carg , +.Fn cargf +and +.Fn cargl +functions compute the argument (also called phase angle) of +.Fa z , +with a branch cut on the negative real axis. +.Sh RETURN VALUES +The +.Fn carg , +.Fn cargf +and +.Fn cargl +functions return the argument in the interval +.Bq -Pi, Pi . +.Sh SEE ALSO +.Xr cimag 3 +.Sh STANDARDS +The +.Fn carg , +.Fn cargf +and +.Fn cargl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/casin.3 b/lib/libm/man/casin.3 new file mode 100644 index 00000000000..6967558b2fa --- /dev/null +++ b/lib/libm/man/casin.3 @@ -0,0 +1,67 @@ +.\" $OpenBSD: casin.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CASIN 3 +.Os +.Sh NAME +.Nm casin , +.Nm casinf , +.Nm casinl +.Nd complex circular arc sine +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn casin "double complex z" +.Ft float complex +.Fn casinf "float complex z" +.Ft long double complex +.Fn casinl "long double complex z" +.Sh DESCRIPTION +The +.Fn casin , +.Fn casinf +and +.Fn casinl +functions compute the complex circular arc sine of +.Fa z . +.Pp +For all complex floating-point numbers +.Fa z , +.Bd -literal -offset indent +casin(z) = -i clog(iz + csqrt(1 - z^2)). +.Ed +.Sh RETURN VALUES +The +.Fn casin , +.Fn casinf +and +.Fn casinl +functions return the complex circular arc sine of +.Fa z +with unbounded imaginary part, and real part in the interval +.Bq -Pi/2, Pi/2 . +.Sh SEE ALSO +.Xr cacos 3 , +.Xr catan 3 +.Sh STANDARDS +The +.Fn casin , +.Fn casinf +and +.Fn casinl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/casinh.3 b/lib/libm/man/casinh.3 new file mode 100644 index 00000000000..eb93fa10d06 --- /dev/null +++ b/lib/libm/man/casinh.3 @@ -0,0 +1,68 @@ +.\" $OpenBSD: casinh.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CASINH 3 +.Os +.Sh NAME +.Nm casinh , +.Nm casinhf , +.Nm casinhl +.Nd complex inverse hyperbolic sine +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn casinh "double complex z" +.Ft float complex +.Fn casinhf "float complex z" +.Ft long double complex +.Fn casinhl "long double complex z" +.Sh DESCRIPTION +The +.Fn casinh , +.Fn casinhf +and +.Fn casinhl +functions compute the complex inverse hyperbolic sine of +.Fa z . +.Pp +For all complex floating-point numbers +.Fa z , +.Bd -literal -offset indent +casinh(z) = -i casin(iz). +.Ed +.Sh RETURN VALUES +The +.Fn casinh , +.Fn casinhf +and +.Fn casinhl +functions return the complex inverse hyperbolic sine of +.Fa z +with imaginary part in the interval +.Bq -Pi/2, Pi/2 , +and unbounded real part. +.Sh SEE ALSO +.Xr cacosh 3 , +.Xr catanh 3 +.Sh STANDARDS +The +.Fn casinh , +.Fn casinhf +and +.Fn casinhl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/catan.3 b/lib/libm/man/catan.3 new file mode 100644 index 00000000000..6fd344b37fb --- /dev/null +++ b/lib/libm/man/catan.3 @@ -0,0 +1,69 @@ +.\" $OpenBSD: catan.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CATAN 3 +.Os +.Sh NAME +.Nm catan , +.Nm catanf , +.Nm catanl +.Nd complex circular arc tangent +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn catan "double complex z" +.Ft float complex +.Fn catanf "float complex z" +.Ft long double complex +.Fn catanl "long double complex z" +.Sh DESCRIPTION +The +.Fn catan , +.Fn catanf +and +.Fn catanl +functions compute the complex circular arc tangent of +.Fa z . +.Pp +If +.Fa z += x + iy, then +.Bd -literal -offset indent +Re catan(z) = 1/2 * atan(2x / (1 - x^2 - y^2)) + k Pi. +Im catan(z) = 1/4 * log((x^2 + (y + 1)^2) / (x^2 + (y - 1)^2)). +.Ed +.Sh RETURN VALUES +The +.Fn catan , +.Fn catanf +and +.Fn catanl +functions return the complex circular arc tangent of +.Fa z +with unbounded imaginary part, and real part in the interval +.Bq -Pi/2, Pi/2 . +.Sh SEE ALSO +.Xr cacos 3 , +.Xr casin 3 +.Sh STANDARDS +The +.Fn catan , +.Fn catanf +and +.Fn catanl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/catanh.3 b/lib/libm/man/catanh.3 new file mode 100644 index 00000000000..ba437ee59b6 --- /dev/null +++ b/lib/libm/man/catanh.3 @@ -0,0 +1,68 @@ +.\" $OpenBSD: catanh.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CATANH 3 +.Os +.Sh NAME +.Nm catanh , +.Nm catanhf , +.Nm catanhl +.Nd complex inverse hyperbolic tangent +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn catanh "double complex z" +.Ft float complex +.Fn catanhf "float complex z" +.Ft long double complex +.Fn catanhl "long double complex z" +.Sh DESCRIPTION +The +.Fn catanh , +.Fn catanhf +and +.Fn catanhl +functions compute the complex inverse hyperbolic tangent of +.Fa z . +.Pp +For all complex floating-point numbers +.Fa z , +.Bd -literal -offset indent +catanh(z) = -i catan(iz). +.Ed +.Sh RETURN VALUES +The +.Fn catanh , +.Fn catanhf +and +.Fn catanhl +functions return the complex inverse hyperbolic tangent of +.Fa z +with imaginary part in the interval +.Bq -Pi/2, Pi/2 , +and unbounded real part. +.Sh SEE ALSO +.Xr cacosh 3 , +.Xr casinh 3 +.Sh STANDARDS +The +.Fn catanh , +.Fn catanhf +and +.Fn catanhl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/ccos.3 b/lib/libm/man/ccos.3 new file mode 100644 index 00000000000..a5a5f0c0863 --- /dev/null +++ b/lib/libm/man/ccos.3 @@ -0,0 +1,66 @@ +.\" $OpenBSD: ccos.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CCOS 3 +.Os +.Sh NAME +.Nm ccos , +.Nm ccosf , +.Nm ccosl +.Nd complex circular cosine +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn ccos "double complex z" +.Ft float complex +.Fn ccosf "float complex z" +.Ft long double complex +.Fn ccosl "long double complex z" +.Sh DESCRIPTION +The +.Fn ccos , +.Fn ccosf +and +.Fn ccosl +functions compute the complex circular cosine of +.Fa z . +.Pp +If +.Fa z += x + iy, then +.Bd -literal -offset indent +ccos(z) = cos(x) cosh(y) - i sin(x) sinh(y). +.Ed +.Sh RETURN VALUES +The +.Fn ccos , +.Fn ccosf +and +.Fn ccosl +functions return the complex circular cosine of +.Fa z . +.Sh SEE ALSO +.Xr csin 3 , +.Xr ctan 3 +.Sh STANDARDS +The +.Fn ccos , +.Fn ccosf +and +.Fn ccosl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/ccosh.3 b/lib/libm/man/ccosh.3 new file mode 100644 index 00000000000..909c88030c5 --- /dev/null +++ b/lib/libm/man/ccosh.3 @@ -0,0 +1,66 @@ +.\" $OpenBSD: ccosh.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CCOSH 3 +.Os +.Sh NAME +.Nm ccosh , +.Nm ccoshf , +.Nm ccoshl +.Nd complex hyperbolic cosine +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn ccosh "double complex z" +.Ft float complex +.Fn ccoshf "float complex z" +.Ft long double complex +.Fn ccoshl "long double complex z" +.Sh DESCRIPTION +The +.Fn ccosh , +.Fn ccoshf +and +.Fn ccoshl +functions compute the complex hyperbolic cosine of +.Fa z . +.Pp +If +.Fa z += x + iy, then +.Bd -literal -offset indent +ccosh(z) = cosh(x) cos(y) + i sinh(x) sin(y). +.Ed +.Sh RETURN VALUES +The +.Fn ccosh , +.Fn ccoshf +and +.Fn ccoshl +functions return the complex hyperbolic cosine of +.Fa z . +.Sh SEE ALSO +.Xr csinh 3 , +.Xr ctanh 3 +.Sh STANDARDS +The +.Fn ccosh , +.Fn ccoshf +and +.Fn ccoshl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/cexp.3 b/lib/libm/man/cexp.3 new file mode 100644 index 00000000000..1b2e0f00d3a --- /dev/null +++ b/lib/libm/man/cexp.3 @@ -0,0 +1,66 @@ +.\" $OpenBSD: cexp.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CEXP 3 +.Os +.Sh NAME +.Nm cexp , +.Nm cexpf , +.Nm cexpl +.Nd complex exponential functions +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn cexp "double complex z" +.Ft float complex +.Fn cexpf "float complex z" +.Ft long double complex +.Fn cexpl "long double complex z" +.Sh DESCRIPTION +The +.Fn cexp , +.Fn cexpf +and +.Fn cexpl +functions compute the exponential of +.Fa z . +.Pp +If +.Fa z += x + iy, then +.Bd -literal -offset indent +cexp(z) = exp(x) cos(y) + i exp(x) sin(y). +.Ed +.Sh RETURN VALUES +The +.Fn cexp , +.Fn cexpf +and +.Fn cexpl +functions return the exponential of +.Fa z . +.Sh SEE ALSO +.Xr clog 3 , +.Xr cpow 3 +.Sh STANDARDS +The +.Fn cexp , +.Fn cexpf +and +.Fn cexpl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/cimag.3 b/lib/libm/man/cimag.3 index 4ccc19887a5..9973a7f6bb0 100644 --- a/lib/libm/man/cimag.3 +++ b/lib/libm/man/cimag.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cimag.3,v 1.1 2010/07/19 12:48:23 millert Exp $ +.\" $OpenBSD: cimag.3,v 1.2 2011/07/20 17:50:43 martynas Exp $ .\" .\" Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -14,12 +14,13 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 19 2010 $ +.Dd $Mdocdate: July 20 2011 $ .Dt CIMAG 3 .Os .Sh NAME .Nm cimag , -.Nm cimagf +.Nm cimagf , +.Nm cimagl .Nd compute the imaginary part of a complex number .Sh SYNOPSIS .Fd #include <complex.h> @@ -27,25 +28,32 @@ .Fn cimag "double complex z" .Ft float .Fn cimagf "float complex z" +.Ft long double +.Fn cimagl "long double complex z" .Sh DESCRIPTION The -.Fn cimag -and +.Fn cimag , .Fn cimagf +and +.Fn cimagl functions compute the imaginary part of .Fa z . .Sh RETURN VALUES The -.Fn cimag -and +.Fn cimag , .Fn cimagf +and +.Fn cimagl functions return the imaginary part of the complex number .Fa z as a real number. +.Sh SEE ALSO +.Xr carg 3 .Sh STANDARDS The -.Fn cimag -and +.Fn cimag , .Fn cimagf +and +.Fn cimagl functions conform to .St -isoC-99 . diff --git a/lib/libm/man/clog.3 b/lib/libm/man/clog.3 new file mode 100644 index 00000000000..f7d58bf1d2d --- /dev/null +++ b/lib/libm/man/clog.3 @@ -0,0 +1,73 @@ +.\" $OpenBSD: clog.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CLOG 3 +.Os +.Sh NAME +.Nm clog , +.Nm clogf , +.Nm clogl +.Nd complex natural logarithm +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn clog "double complex z" +.Ft float complex +.Fn clogf "float complex z" +.Ft long double complex +.Fn clogl "long double complex z" +.Sh DESCRIPTION +The +.Fn clog , +.Fn clogf +and +.Fn clogl +functions compute the complex logarithm to the base +.Ms e +(2.718...) of +.Fa z . +.Pp +If +.Fa z += x + iy, then +.Bd -literal -offset indent +clog(z) = log(sqrt(x^2 + y^2)) + i atan(y / x). +.Ed +.Sh RETURN VALUES +The +.Fn clog , +.Fn clogf +and +.Fn clogl +functions return the complex logarithm to the base +.Ms e +of +.Fa z +with imaginary part in the interval +.Bq -Pi, Pi , +and unbounded real part. +.Sh SEE ALSO +.Xr cexp 3 , +.Xr cpow 3 +.Sh STANDARDS +The +.Fn clog , +.Fn clogf +and +.Fn clogl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/conj.3 b/lib/libm/man/conj.3 index eb88f13fb0b..8dd6f98f78b 100644 --- a/lib/libm/man/conj.3 +++ b/lib/libm/man/conj.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: conj.3,v 1.1 2010/07/19 12:48:23 millert Exp $ +.\" $OpenBSD: conj.3,v 1.2 2011/07/20 17:50:43 martynas Exp $ .\" .\" Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -14,12 +14,13 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 19 2010 $ +.Dd $Mdocdate: July 20 2011 $ .Dt CONJ 3 .Os .Sh NAME .Nm conj , -.Nm conjf +.Nm conjf , +.Nm conjl .Nd compute the complex conjugate .Sh SYNOPSIS .Fd #include <complex.h> @@ -27,24 +28,31 @@ .Fn conj "double complex z" .Ft float complex .Fn conjf "float complex z" +.Ft long double complex +.Fn conjl "long double complex z" .Sh DESCRIPTION The -.Fn conj -and +.Fn conj , .Fn conjf +and +.Fn conjl reverse the sign of the imaginary part of .Fa z , producing the complex conjugate. .Sh RETURN VALUES The -.Fn conj -and +.Fn conj , .Fn conjf +and +.Fn conjl functions return the complex conjugate of the complex number .Fa z . +.Sh SEE ALSO +.Xr carg 3 .Sh STANDARDS The -.Fn conj +.Fn conj , +.Fn conjl and .Fn conjf functions conform to diff --git a/lib/libm/man/cpow.3 b/lib/libm/man/cpow.3 new file mode 100644 index 00000000000..5ff99e81b8a --- /dev/null +++ b/lib/libm/man/cpow.3 @@ -0,0 +1,64 @@ +.\" $OpenBSD: cpow.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CPOW 3 +.Os +.Sh NAME +.Nm cpow , +.Nm cpowf , +.Nm cpowl +.Nd complex power functions +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn cpow "double complex x" "double complex z" +.Ft float complex +.Fn cpowf "float complex x" "float complex z" +.Ft long double complex +.Fn cpowl "long double complex x" "long double complex z" +.Sh DESCRIPTION +The +.Fn cpow , +.Fn cpowf +and +.Fn cpowl +functions compute the complex number +.Fa x +raised to the complex power +.Fa z , +with a branch cut along the negative real axis for the first argument. +.Sh RETURN VALUES +The +.Fn cpow , +.Fn cpowf +and +.Fn cpowl +functions return the complex complex number +.Fa x +raised to the complex power +.Fa z . +.Sh SEE ALSO +.Xr cexp 3 , +.Xr clog 3 +.Sh STANDARDS +The +.Fn cpow , +.Fn cpowf +and +.Fn cpowl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/cproj.3 b/lib/libm/man/cproj.3 index 75fb47dcc2e..6170bf32abe 100644 --- a/lib/libm/man/cproj.3 +++ b/lib/libm/man/cproj.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cproj.3,v 1.1 2010/07/19 12:48:23 millert Exp $ +.\" $OpenBSD: cproj.3,v 1.2 2011/07/20 17:50:43 martynas Exp $ .\" .\" Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -14,12 +14,13 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 19 2010 $ +.Dd $Mdocdate: July 20 2011 $ .Dt CPROJ 3 .Os .Sh NAME .Nm cproj , -.Nm cprojf +.Nm cprojf , +.Nm cprojl .Nd compute projection onto Riemann sphere .Sh SYNOPSIS .Fd #include <complex.h> @@ -27,19 +28,23 @@ .Fn cproj "double complex z" .Ft float complex .Fn cprojf "float complex z" +.Ft long double complex +.Fn cprojl "long double complex z" .Sh DESCRIPTION The -.Fn cproj -and +.Fn cproj , .Fn cprojf +and +.Fn cprojl functions compute a projection of .Fa z onto the Riemann sphere. .Sh RETURN VALUES The -.Fn cproj -and +.Fn cproj , .Fn cprojf +and +.Fn cprojl functions return .Fa z for all finite complex numbers. @@ -54,8 +59,9 @@ INFINITY + I * copysign(0.0, cimag(z)) .Xr cimag 3 .Sh STANDARDS The -.Fn cproj -and +.Fn cproj , .Fn cprojf +and +.Fn cprojl functions conform to .St -isoC-99 . diff --git a/lib/libm/man/creal.3 b/lib/libm/man/creal.3 new file mode 100644 index 00000000000..3aedcd47526 --- /dev/null +++ b/lib/libm/man/creal.3 @@ -0,0 +1,58 @@ +.\" $OpenBSD: creal.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CREAL 3 +.Os +.Sh NAME +.Nm creal , +.Nm crealf , +.Nm creall +.Nd complex real functions +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double +.Fn creal "double complex z" +.Ft float +.Fn crealf "float complex z" +.Ft long double +.Fn creall "long double complex z" +.Sh DESCRIPTION +The +.Fn creal , +.Fn crealf +and +.Fn creall +functions compute the real part of +.Fa z . +.Sh RETURN VALUES +The +.Fn creal , +.Fn crealf +and +.Fn creall +functions return the real part of +.Fa z . +.Sh SEE ALSO +.Xr carg 3 +.Sh STANDARDS +The +.Fn creal , +.Fn crealf +and +.Fn creall +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/csin.3 b/lib/libm/man/csin.3 new file mode 100644 index 00000000000..9597220bef1 --- /dev/null +++ b/lib/libm/man/csin.3 @@ -0,0 +1,66 @@ +.\" $OpenBSD: csin.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CSIN 3 +.Os +.Sh NAME +.Nm csin , +.Nm csinf , +.Nm csinl +.Nd complex circular sine +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn csin "double complex z" +.Ft float complex +.Fn csinf "float complex z" +.Ft long double complex +.Fn csinl "long double complex z" +.Sh DESCRIPTION +The +.Fn csin , +.Fn csinf +and +.Fn csinl +functions compute the complex circular sine of +.Fa z . +.Pp +If +.Fa z += x + iy, then +.Bd -literal -offset indent +csin(z) = sin(x) cosh(y) + i cos(x) sinh(y). +.Ed +.Sh RETURN VALUES +The +.Fn csin , +.Fn csinf +and +.Fn csinl +functions return the complex circular sine of +.Fa z . +.Sh SEE ALSO +.Xr ccos 3 , +.Xr ctan 3 +.Sh STANDARDS +The +.Fn csin , +.Fn csinf +and +.Fn csinl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/csinh.3 b/lib/libm/man/csinh.3 new file mode 100644 index 00000000000..56a91616eb1 --- /dev/null +++ b/lib/libm/man/csinh.3 @@ -0,0 +1,65 @@ +.\" $OpenBSD: csinh.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CSINH 3 +.Os +.Sh NAME +.Nm csinh , +.Nm csinhf , +.Nm csinhl +.Nd complex hyperbolic sine +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn csinh "double complex z" +.Ft float complex +.Fn csinhf "float complex z" +.Ft long double complex +.Fn csinhl "long double complex z" +.Sh DESCRIPTION +The +.Fn csinh , +.Fn csinhf +and +.Fn csinhl +functions compute the complex hyperbolic sine of +.Fa z . +.Pp +For all complex floating-point numbers +.Fa z , +.Bd -literal -offset indent +csinh(z) = (cexp(z) - cexp(-z)) / 2. +.Ed +.Sh RETURN VALUES +The +.Fn csinh , +.Fn csinhf +and +.Fn csinhl +functions return the complex hyperbolic sine of +.Fa z . +.Sh SEE ALSO +.Xr ccosh 3 , +.Xr ctanh 3 +.Sh STANDARDS +The +.Fn csinh , +.Fn csinhf +and +.Fn csinhl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/csqrt.3 b/lib/libm/man/csqrt.3 new file mode 100644 index 00000000000..0e12237138f --- /dev/null +++ b/lib/libm/man/csqrt.3 @@ -0,0 +1,72 @@ +.\" $OpenBSD: csqrt.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CSQRT 3 +.Os +.Sh NAME +.Nm csqrt , +.Nm csqrtf , +.Nm csqrtl +.Nd complex square root +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn csqrt "double complex z" +.Ft float complex +.Fn csqrtf "float complex z" +.Ft long double complex +.Fn csqrtl "long double complex z" +.Sh DESCRIPTION +The +.Fn csqrt , +.Fn csqrtf +and +.Fn csqrtl +functions compute the complex square root of +.Fa z . +.Pp +If +.Fa z += x + iy, then +.Bd -literal -offset indent +Re csqrt(z) = [ (|z| + x) / 2 ]^(1/2). +Im csqrt(z) = [ (|z| - x) / 2 ]^(1/2). +.Ed +.Pp +Note that -csqrt(z) is also a square root of +.Fa z . +The root chosen +is always in the right half plane and Im csqrt(z) has the same sign +as y. +.Sh RETURN VALUES +The +.Fn csqrt , +.Fn csqrtf +and +.Fn csqrtl +functions return the complex square root of +.Fa z . +.Sh SEE ALSO +.Xr cpow 3 +.Sh STANDARDS +The +.Fn csqrt , +.Fn csqrtf +and +.Fn csqrtl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/ctan.3 b/lib/libm/man/ctan.3 new file mode 100644 index 00000000000..a01bce752e2 --- /dev/null +++ b/lib/libm/man/ctan.3 @@ -0,0 +1,72 @@ +.\" $OpenBSD: ctan.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CTAN 3 +.Os +.Sh NAME +.Nm ctan , +.Nm ctanf , +.Nm ctanl +.Nd complex circular tangent +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn ctan "double complex z" +.Ft float complex +.Fn ctanf "float complex z" +.Ft long double complex +.Fn ctanl "long double complex z" +.Sh DESCRIPTION +The +.Fn ctan , +.Fn ctanf +and +.Fn ctanl +functions compute the complex circular tangent of +.Fa z . +.Pp +If +.Fa z += x + iy, then +.Bd -literal -offset indent +ctan(z) = (sin(2x) + i sinh(2y)) / (cos(2x) + cosh(2y)). +.Ed +.Pp +On the real axis the denominator is zero at odd multiples of Pi/2. +The denominator is evaluated by its Taylor series near these points. +.Bd -literal -offset indent +ctan(z) = -i ctanh(iz). +.Ed +.Sh RETURN VALUES +The +.Fn ctan , +.Fn ctanf +and +.Fn ctanl +functions return the complex circular tangent of +.Fa z . +.Sh SEE ALSO +.Xr ccos 3 , +.Xr csin 3 +.Sh STANDARDS +The +.Fn ctan , +.Fn ctanf +and +.Fn ctanl +functions conform to +.St -isoC-99 . diff --git a/lib/libm/man/ctanh.3 b/lib/libm/man/ctanh.3 new file mode 100644 index 00000000000..b2878dc3b65 --- /dev/null +++ b/lib/libm/man/ctanh.3 @@ -0,0 +1,66 @@ +.\" $OpenBSD: ctanh.3,v 1.1 2011/07/20 17:50:43 martynas Exp $ +.\" +.\" Copyright (c) 2011 Martynas Venckus <martynas@openbsd.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: July 20 2011 $ +.Dt CTANH 3 +.Os +.Sh NAME +.Nm ctanh , +.Nm ctanhf , +.Nm ctanhl +.Nd complex hyperbolic tangent +.Sh SYNOPSIS +.Fd #include <complex.h> +.Ft double complex +.Fn ctanh "double complex z" +.Ft float complex +.Fn ctanhf "float complex z" +.Ft long double complex +.Fn ctanhl "long double complex z" +.Sh DESCRIPTION +The +.Fn ctanh , +.Fn ctanhf +and +.Fn ctanhl +functions compute the complex hyperbolic tangent of +.Fa z . +.Pp +If +.Fa z += x + iy, then +.Bd -literal -offset indent +ctanh(z) = (sinh(2x) + i sin(2y)) / (cosh(2x) + cos(2y)). +.Ed +.Sh RETURN VALUES +The +.Fn ctanh , +.Fn ctanhf +and +.Fn ctanhl +functions return the complex hyperbolic tangent of +.Fa z . +.Sh SEE ALSO +.Xr ccosh 3 , +.Xr csinh 3 +.Sh STANDARDS +The +.Fn ctanh , +.Fn ctanhf +and +.Fn ctanhl +functions conform to +.St -isoC-99 . |