Permalink
Switch branches/tags
android-wear-o-preview-3 android-wear-n-preview-2 android-wear-n-preview-1 android-wear-7.1.1_r1 android-wear-5.1.1_r1 android-wear-5.1.0_r1 android-wear-5.0.0_r1 android-sdk-support_r11 android-sdk-adt_r20 android-sdk-adt_r16.0.1 android-sdk-4.4.2_r1.0.1 android-sdk-4.4.2_r1 android-sdk-4.0.3_r1 android-sdk-4.0.3-tools_r1 android-o-preview-4 android-o-preview-3 android-o-preview-2 android-o-preview-1 android-o-iot-preview-5 android-n-preview-5 android-n-preview-4 android-n-preview-3 android-n-preview-2 android-n-preview-1 android-n-mr2-preview-2 android-n-mr2-preview-1 android-n-mr1-preview-2 android-n-mr1-preview-1 android-n-iot-preview-4 android-n-iot-preview-2 android-m-preview android-m-preview-2 android-m-preview-1 android-l-preview_r2 android-cts-verifier-4.0.3_r1 android-cts-verifier-4.0_r1 android-cts-8.0_r1 android-cts-7.1_r8 android-cts-7.1_r7 android-cts-7.1_r6 android-cts-7.1_r5 android-cts-7.1_r4 android-cts-7.1_r3 android-cts-7.1_r2 android-cts-7.1_r1 android-cts-7.0_r12 android-cts-7.0_r11 android-cts-7.0_r10 android-cts-7.0_r9 android-cts-7.0_r8 android-cts-7.0_r7 android-cts-7.0_r6 android-cts-7.0_r5 android-cts-7.0_r4 android-cts-7.0_r3 android-cts-7.0_r2 android-cts-7.0_r1 android-cts-6.0_r21 android-cts-6.0_r20 android-cts-6.0_r19 android-cts-6.0_r18 android-cts-6.0_r17 android-cts-6.0_r16 android-cts-6.0_r15 android-cts-6.0_r14 android-cts-6.0_r13 android-cts-6.0_r12 android-cts-6.0_r9 android-cts-6.0_r8 android-cts-6.0_r7 android-cts-6.0_r6 android-cts-6.0_r5 android-cts-6.0_r4 android-cts-6.0_r3 android-cts-6.0_r2 android-cts-6.0_r1 android-cts-5.1_r22 android-cts-5.1_r21 android-cts-5.1_r20 android-cts-5.1_r19 android-cts-5.1_r18 android-cts-5.1_r17 android-cts-5.1_r16 android-cts-5.1_r15 android-cts-5.1_r14 android-cts-5.1_r13 android-cts-5.1_r10 android-cts-5.1_r9 android-cts-5.1_r8 android-cts-5.1_r7 android-cts-5.1_r6 android-cts-5.1_r5 android-cts-5.1_r4 android-cts-5.1_r3 android-cts-5.1_r2 android-cts-5.1_r1 android-cts-5.0_r9 android-cts-5.0_r8 android-cts-5.0_r7 android-cts-5.0_r6
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (34 sloc) 904 Bytes
/* @(#)s_logb.c 1.3 95/01/18 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunSoft, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/*
* double ieee_logb(x)
* IEEE 754 logb. Included to pass IEEE test suite. Not recommend.
* Use ilogb instead.
*/
#include "fdlibm.h"
#ifdef __STDC__
double ieee_logb(double x)
#else
double ieee_logb(x)
double x;
#endif
{
int lx,ix;
ix = (__HI(x))&0x7fffffff; /* high |x| */
lx = __LO(x); /* low x */
if((ix|lx)==0) return -1.0/ieee_fabs(x);
if(ix>=0x7ff00000) return x*x;
if((ix>>=20)==0) /* IEEE 754 logb */
return -1022.0;
else
return (double) (ix-1023);
}