1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Body/f_sinh_.htm
2024-04-01 10:24:07 +02:00

91 lines
8.2 KiB
HTML

<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
<HTML>
<HEAD>
<TITLE>CLHS: Function SINH, COSH, TANH, ASINH...</TITLE>
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
<LINK REL=TOP HREF="../Front/index.htm">
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
<LINK REL=PREV HREF="v_pi.htm">
<LINK REL=UP HREF="c_number.htm">
<LINK REL=NEXT HREF="f_st.htm">
</HEAD>
<BODY>
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="v_pi.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="c_number.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="f_st.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<A NAME="sinh"><A NAME="cosh"><A NAME="tanh"><A NAME="asinh"><A NAME="acosh"><A NAME="atanh"><I>Function</I> <B>SINH, COSH, TANH, ASINH, ACOSH, ATANH</B></A></A></A></A></A></A> <P>
<P><B>Syntax:</B><P>
<P>
<B>sinh</B> <I>number</I> =&gt; <I>result</I><P>
<B>cosh</B> <I>number</I> =&gt; <I>result</I><P>
<B>tanh</B> <I>number</I> =&gt; <I>result</I><P>
<B>asinh</B> <I>number</I> =&gt; <I>result</I><P>
<B>acosh</B> <I>number</I> =&gt; <I>result</I><P>
<B>atanh</B> <I>number</I> =&gt; <I>result</I><P>
<P>
<P><B>Arguments and Values:</B><P>
<P>
<I>number</I>---a <A REL=DEFINITION HREF="26_glo_n.htm#number"><I>number</I></A>. <P>
<I>result</I>---a <A REL=DEFINITION HREF="26_glo_n.htm#number"><I>number</I></A>. <P>
<P><B>Description:</B><P>
<P>
These functions compute the hyperbolic sine, cosine, tangent, arc sine, arc cosine, and arc tangent functions, which are mathematically defined for an argument <I>x</I> as given in the next figure. <P>
<PRE>
Function Definition
Hyperbolic sine (e^x-e^-x)/2
Hyperbolic cosine (e^x+e^-x)/2
Hyperbolic tangent (e^x-e^-x)/(e^x+e^-x)
Hyperbolic arc sine log (x+sqrt(1+x^2))
Hyperbolic arc cosine 2 log (sqrt((x+1)/2) + sqrt((x-1)/2))
Hyperbolic arc tangent (log (1+x) - log (1-x))/2
</PRE>
<P><B>Figure 12-16. Mathematical definitions for hyperbolic functions</B> <P>
The following definition for the inverse hyperbolic cosine determines the range and branch cuts: <P>
<P> <TT>arccosh</TT> z = 2 <TT>log</TT> (<TT>sqrt</TT>((z+1)/2) + <TT>sqrt</TT>((z-1)/2)). <P> <P>
The branch cut for the inverse hyperbolic cosine function lies along the real axis to the left of 1 (inclusive), extending indefinitely along the negative real axis, continuous with quadrant II and (between 0 and 1) with quadrant I. The range is that half-strip of the complex plane containing numbers whose real part is non-negative and whose imaginary part is between -&lt;PI&gt; (exclusive) and &lt;PI&gt; (inclusive). A number with real part zero is in the range if its imaginary part is between zero (inclusive) and &lt;PI&gt; (inclusive). <P>
The following definition for the inverse hyperbolic sine determines the range and branch cuts: <P>
<P> <TT>arcsinh</TT> z = <TT>log</TT> (z+<TT>sqrt</TT>(1+z^2)). <P> <P>
The branch cut for the inverse hyperbolic sine function is in two pieces: one along the positive imaginary axis above i (inclusive), continuous with quadrant I, and one along the negative imaginary axis below -i (inclusive), continuous with quadrant III. The range is that strip of the complex plane containing numbers whose imaginary part is between -&lt;PI&gt;/2 and &lt;PI&gt;/2. A number with imaginary part equal to -&lt;PI&gt;/2 is in the range if and only if its real part is non-positive; a number with imaginary part equal to &lt;PI&gt;/2 is in the range if and only if its imaginary part is non-negative. <P>
The following definition for the inverse hyperbolic tangent determines the range and branch cuts: <P>
<P> <TT>arctanh</TT> z = <TT>log</TT> (1+z) - <TT>log</TT> (1-z)/2. <P> <P>
Note that: <P>
<P> i <TT>arctan</TT> z = <TT>arctanh</TT> iz. <P> <P>
The branch cut for the inverse hyperbolic tangent function is in two pieces: one along the negative real axis to the left of -1 (inclusive), continuous with quadrant III, and one along the positive real axis to the right of 1 (inclusive), continuous with quadrant I. The points -1 and 1 are excluded from the domain. The range is that strip of the complex plane containing numbers whose imaginary part is between -&lt;PI&gt;/2 and &lt;PI&gt;/2. A number with imaginary part equal to -&lt;PI&gt;/2 is in the range if and only if its real part is strictly negative; a number with imaginary part equal to &lt;PI&gt;/2 is in the range if and only if its imaginary part is strictly positive. Thus the range of the inverse hyperbolic tangent function is identical to that of the inverse hyperbolic sine function with the points -&lt;PI&gt;i/2 and &lt;PI&gt;i/2 excluded. <P>
<P><B>Examples:</B><P>
<P>
<PRE>
(sinh 0) =&gt; 0.0
(cosh (complex 0 -1)) =&gt; #C(0.540302 -0.0)
</PRE>
</TT> <P>
<P><B>Side Effects:</B> None.
<P>
<P><B>Affected By:</B> None.
<P>
<P><B>Exceptional Situations:</B><P>
<P>
Should signal an error of <A REL=DEFINITION HREF="26_glo_t.htm#type"><I>type</I></A> <A REL=DEFINITION HREF="e_tp_err.htm#type-error"><B>type-error</B></A> if <I>number</I> is not a <A REL=DEFINITION HREF="26_glo_n.htm#number"><I>number</I></A>. Might signal <A REL=DEFINITION HREF="e_arithm.htm#arithmetic-error"><B>arithmetic-error</B></A>. <P>
<P><B>See Also:</B><P>
<P>
<A REL=DEFINITION HREF="f_log.htm#log"><B>log</B></A>, <A REL=DEFINITION HREF="f_sqrt_.htm#sqrt"><B>sqrt</B></A>, <A REL=CHILD HREF="12_acc.htm">Section 12.1.3.3 (Rule of Float Substitutability)</A> <P>
<P><B>Notes:</B><P>
<P>
The result of <A REL=DEFINITION HREF="#acosh"><B>acosh</B></A> may be a <A REL=DEFINITION HREF="26_glo_c.htm#complex"><I>complex</I></A> even if <I>number</I> is not a <A REL=DEFINITION HREF="26_glo_c.htm#complex"><I>complex</I></A>; this occurs when <I>number</I> is less than one. Also, the result of <A REL=DEFINITION HREF="#atanh"><B>atanh</B></A> may be a <A REL=DEFINITION HREF="26_glo_c.htm#complex"><I>complex</I></A> even if <I>number</I> is not a <A REL=DEFINITION HREF="26_glo_c.htm#complex"><I>complex</I></A>; this occurs when the absolute value of <I>number</I> is greater than one. <P>
The branch cut formulae are mathematically correct, assuming completely accurate computation. Implementors should consult a good text on numerical analysis. The formulae given above are not necessarily the simplest ones for real-valued computations; they are chosen to define the branch cuts in desirable ways for the complex case. <P>
<P><HR>The following <A REL=META HREF="../Front/X3J13Iss.htm">X3J13 cleanup issue</A>, <I>not part of the specification</I>, applies to this section:<P><UL><LI> <A REL=CHILD HREF="../Issues/iss070.htm">COMPLEX-ATANH-BOGUS-FORMULA:TWEAK-MORE</A><P></UL><HR>
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
</BODY>
</HTML>