From: Monty Date: Sat, 13 Feb 2010 19:26:42 +0000 (+0000) Subject: The rounding can cause a surprising amount of trouble in book creation. X-Git-Tag: v1.3.3~101 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e6f1fbf6fda69be5419b8fe20180f8cad9f6513;p=platform%2Fupstream%2Flibvorbis.git The rounding can cause a surprising amount of trouble in book creation. svn path=/trunk/vorbis/; revision=16897 --- diff --git a/lib/sharedbook.c b/lib/sharedbook.c index 2b0b9ec..7cc96b0 100644 --- a/lib/sharedbook.c +++ b/lib/sharedbook.c @@ -52,7 +52,7 @@ long _float32_pack(float val){ sign=0x80000000; val= -val; } - exp= floor(log(val)/log(2.f)); + exp= floor(log(val)/log(2.f)+.001); //+epsilon mant=rint(ldexp(val,(VQ_FMAN-1)-exp)); exp=(exp+VQ_FEXP_BIAS)<