OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libm/] [mathfp/] [s_cosh.c] - Diff between revs 148 and 158

Only display areas with differences | Details | Blame | View Log

Rev 148 Rev 158
 
 
/* @(#)z_cosh.c 1.0 98/08/13 */
/* @(#)z_cosh.c 1.0 98/08/13 */
 
 
/*
/*
 
 
FUNCTION
FUNCTION
        <<cosh>>, <<coshf>>---hyperbolic cosine
        <<cosh>>, <<coshf>>---hyperbolic cosine
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
        #include <math.h>
        #include <math.h>
        double cosh(double <[x]>);
        double cosh(double <[x]>);
        float coshf(float <[x]>)
        float coshf(float <[x]>)
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
        #include <math.h>
        #include <math.h>
        double cosh(<[x]>)
        double cosh(<[x]>)
        double <[x]>;
        double <[x]>;
 
 
        float coshf(<[x]>)
        float coshf(<[x]>)
        float <[x]>;
        float <[x]>;
 
 
DESCRIPTION
DESCRIPTION
 
 
        <<cosh>> computes the hyperbolic cosine of the argument <[x]>.
        <<cosh>> computes the hyperbolic cosine of the argument <[x]>.
        <<cosh(<[x]>)>> is defined as
        <<cosh(<[x]>)>> is defined as
        @ifnottex
        @ifnottex
        . (exp(x) + exp(-x))/2
        . (exp(x) + exp(-x))/2
        @end ifnottex
        @end ifnottex
        @tex
        @tex
        $${(e^x + e^{-x})} \over 2$$
        $${(e^x + e^{-x})} \over 2$$
        @end tex
        @end tex
 
 
        Angles are specified in radians.
        Angles are specified in radians.
 
 
        <<coshf>> is identical, save that it takes and returns <<float>>.
        <<coshf>> is identical, save that it takes and returns <<float>>.
 
 
RETURNS
RETURNS
        The computed value is returned.  When the correct value would create
        The computed value is returned.  When the correct value would create
        an overflow,  <<cosh>> returns the value <<HUGE_VAL>> with the
        an overflow,  <<cosh>> returns the value <<HUGE_VAL>> with the
        appropriate sign, and the global value <<errno>> is set to <<ERANGE>>.
        appropriate sign, and the global value <<errno>> is set to <<ERANGE>>.
 
 
        You can modify error handling for these functions using the
        You can modify error handling for these functions using the
        function <<matherr>>.
        function <<matherr>>.
 
 
PORTABILITY
PORTABILITY
        <<cosh>> is ANSI.
        <<cosh>> is ANSI.
        <<coshf>> is an extension.
        <<coshf>> is an extension.
 
 
QUICKREF
QUICKREF
        cosh ansi pure
        cosh ansi pure
        coshf - pure
        coshf - pure
*/
*/
 
 
/******************************************************************
/******************************************************************
 * Hyperbolic Cosine
 * Hyperbolic Cosine
 *
 *
 * Input:
 * Input:
 *   x - floating point value
 *   x - floating point value
 *
 *
 * Output:
 * Output:
 *   hyperbolic cosine of x
 *   hyperbolic cosine of x
 *
 *
 * Description:
 * Description:
 *   This routine returns the hyperbolic cosine of x.
 *   This routine returns the hyperbolic cosine of x.
 *
 *
 *****************************************************************/
 *****************************************************************/
 
 
#include "fdlibm.h"
#include "fdlibm.h"
#include "zmath.h"
#include "zmath.h"
 
 
#ifndef _DOUBLE_IS_32BITS
#ifndef _DOUBLE_IS_32BITS
 
 
double
double
_DEFUN (cosh, (double),
_DEFUN (cosh, (double),
        double x)
        double x)
{
{
  return (sineh (x, 1));
  return (sineh (x, 1));
}
}
 
 
#endif /* _DOUBLE_IS_32BITS */
#endif /* _DOUBLE_IS_32BITS */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.