source: asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/math/logb.c@ 352

Last change on this file since 352 was 352, checked in by coas-nagasima, 6 years ago

arm向けASP3版ECNLを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
File size: 228 bytes
Line 
1#include <math.h>
2
3/*
4special cases:
5 logb(+-0) = -inf, and raise divbyzero
6 logb(+-inf) = +inf
7 logb(nan) = nan
8*/
9
10double logb(double x)
11{
12 if (!isfinite(x))
13 return x * x;
14 if (x == 0)
15 return -1/(x*x);
16 return ilogb(x);
17}
Note: See TracBrowser for help on using the repository browser.