mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Implemented fmin()/fminf(), fmax()/fmaxf(), fdim()/fdimf() for C99.
- Ported acosf(), asinf(), atan2f(), atanf(), ceilf(), expf(), floorf(), fmodf(), frexpf(), ldexpf(), log10f(), logbf(), logf(), modff(), powf(), sqrtf(), scalbn() and scalbnf() for C99. - Ported cbrt(), cbrtf(), erf(), erff(), erfc(), erfcf(), expm1(), expm1f(), ilogb(), ilogbf(), log1p() and log1pf() for C99. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14963 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: math_ldexpf.c,v 1.1 2005-05-29 11:19:01 obarthel Exp $
|
||||
* $Id: math_ldexpf.c,v 1.2 2005-05-29 14:45:32 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -44,8 +44,21 @@
|
||||
float
|
||||
ldexpf(float x,int exp)
|
||||
{
|
||||
/* ZZZ unimplemented */
|
||||
return(0);
|
||||
float result;
|
||||
|
||||
if(isinf(x) || fpclassify(x) == FP_ZERO)
|
||||
{
|
||||
result = x;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = scalbnf(x,exp);
|
||||
|
||||
if(isinf(result) || (result < FLT_MIN || result > -FLT_MIN))
|
||||
__set_errno(ERANGE);
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user