exp.3m

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3M 代码 · 共 207 行

3M
207
字号
.\" SCCSID: @(#)exp.3m	6.2	8/30/89.TH exp 3m VAX.SH Nameexp, expm1, log, log10, log1p, pow, sqrt \- exponential, logarithm, power, square root.SH Syntax.nf.B #include <math.h>.PP.B double exp(\fIx\fP).B double \fIx\fP;.PP.B double expm1(\fIx\fP).B double \fIx\fP;.PP.B double log(\fIx\fP).B double \fIx\fP;.PP.B double log10(\fIx\fP).B double \fIx\fP;.PP.B double log1p(\fIx\fP).B double \fIx\fP;.PP.B double pow(\fIx,y\fP).B double \fIx,y\fP;.PP.B double sqrt(\fIx\fP).B double \fIx\fP;.fi.SH Description.NXR "exp subroutine (math)".NXR "expm1 subroutine (math)".NXR "log subroutine (math)".NXR "log10 subroutine (math)".NXR "log1p subroutine (math)".NXR "pow subroutine".NXR "sqrt subroutine (math)".NXR "exp subroutine (math)" "erf subroutine".NXR "exponential function".NXR "logarithm function".NXR "power function".NXR "square root function"The .PN expfunction returns the exponential function of .I x..PPThe.PN expm1 functionreturns exp(\fIx\fP)-1 accurately even for tiny .IR x ..PPThe.PN logfunction returns the natural logarithm of .IR x ;.PN log10returns the base 10 logarithm..PPThe.PN log1pfunction returns log(1+\fIx\fP) accurately even for tiny.IR x ..PPThe.PN powfunction returns.I  xraised to the.I ypower..PPThe.PN sqrtfunction returns the square root of .I x..SH Return ValuesThe.PN expfunction returns HUGE_VAL and sets.I errnoto ERANGE when the correct value would overflow.When the correct value would underflow it returns zero and.I errnois set to ERANGE..PPThe.PN expm1function returns HUGE_VAL and sets.I errnoto ERANGE when the correct value would overflow.When the correct value would underflow it returns \-1..PPThe.PN logand.PN log10functions return \-HUGE_VAL and set.I errnoto EDOM when.I xis less than or equal to zero.When the correct value would overflow flow they return \-HUGE_VAL and.I errnois set to ERANGE..PPThe.PN log1pfunction returns \-HUGE_VAL and sets.I errnoto EDOM when.I xis less than or equal to \-1.When the correct value would overflow flow it returns \-HUGE_VAL and.I errnois set to ERANGE..PPThe.PN powfunction has many special cases.When.I xand.I yare both zero it returns 1.0.When.I xis negative and.I yis not an integer value it returns zero and.I errnois set to EDOM.When.I xis zero and.I yis negative it returns \-HUGE_VAL and.I errnois set to EDOM.When the correct value would overflow HUGE_VAL is returned and.I errnois set to ERANGE.When the correct value would underflow zero is returned and.I errnois set to ERANGE..PPThe.PN sqrtfunction returns zero and sets.I errnoto EDOM when.I xis negative..SH Environment.NXR "exp subroutine (math)" "System V and"When your program is compiled using the System V environment,.PN expreturns HUGE when the correct value would overflow, and sets \fIerrno\fP to ERANGE; .PN expreturns zero when the correct value would underflow, and sets errno to ERANGE..PPThe.PN logand .PN log10functions return HUGE and set \fIerrno\fP to EDOMwhen .I xis nonpositive.  An error message is printed onthe standard error output..PPThe.PN powfunction returns zero and sets \fIerrno\fP to EDOM when .I xis non-positive and y is not an integer, or when.I xand.I yare both zero.  In these cases, a message indicatingDOMAIN error is printed on the standard error output.When the correct value for.PN powwould overflow,.PN powreturns HUGE and sets \fIerrno\fP to ERANGE..PPThe.PN sqrtfunction returns zero and sets \fIerrno\fP to EDOM when .I x is negative.  A message indicating DOMAIN error is printed on the standard error output..PPThese error-handling procedures may be changed with the function.MS matherr 3m ..PP.NTDOMAIN error is only printed in the System V environment..NE.SH See Alsohypot(3m), intro(3m), sinh(3m)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?