X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fisaac%2Fisaac.c;h=e27a1890eb537cce7a5a4d7cf0211449f152221b;hb=cf86c1e30648c9b482b92444c39ea6ea0ff936a8;hp=88a1d0d5dadc62506356da6f2b9e7eec3b8ea789;hpb=556b131c38e62d09313c89b0fb70fad3386cdb90;p=ccan diff --git a/ccan/isaac/isaac.c b/ccan/isaac/isaac.c index 88a1d0d5..e27a1890 100644 --- a/ccan/isaac/isaac.c +++ b/ccan/isaac/isaac.c @@ -1,4 +1,5 @@ -/*Written by Timothy B. Terriberry (tterribe@xiph.org) 1999-2009 public domain. +/*Written by Timothy B. Terriberry (tterribe@xiph.org) 1999-2009. + CC0 (Public domain) - see LICENSE file for details Based on the public domain implementation by Robert J. Jenkins Jr.*/ #include #include @@ -170,7 +171,7 @@ static float isaac_float_bits(isaac_ctx *_ctx,uint32_t _bits,int _base){ FLT_MANT_DIG+1 consecutive one bits. Even the fallback C implementation of ILOGNZ_32() yields an implementation 25% faster than the frexp() method.*/ - nbits_needed=FLT_MANT_DIG-ILOGNZ_32(_bits); + nbits_needed=FLT_MANT_DIG-ilog32_nz(_bits); #if FLT_MANT_DIG>32 ret=ldexpf((float)_bits,_base); # if FLT_MANT_DIG>65 @@ -221,7 +222,7 @@ static double isaac_double_bits(isaac_ctx *_ctx,uint32_t _bits,int _base){ _base-=32; _bits=isaac_next_uint32(_ctx); } - nbits_needed=DBL_MANT_DIG-ILOGNZ_32(_bits); + nbits_needed=DBL_MANT_DIG-ilog32_nz(_bits); #if DBL_MANT_DIG>32 ret=ldexp((double)_bits,_base); # if DBL_MANT_DIG>65