Re: MAD 0.15 Accuracy

Rob Leslie <[email protected]>
Newsgroups gmane.comp.audio.mad.devel
Message-ID <[email protected]>
On Dec 2, 2003, at 11:00 PM, Grigory A. wrote:
> I tested my implementation of some math function for MAD 0.15 library.
> And I have found this:
>
> function
> mad_fixed_t III_requantize(unsigned int value, signed int exp)
> in layer3.c file
>
> input
> value=8
> exp=-23;
>
> that means
> 8^(4/3)*2(-5.75)
> correct?

Yes.

> result obtained by
> mad_f_todouble(requantized)is
>
> 0.297241
>
> but calculator says
>>> 8^(4/3)*2^(-5.75)
> ans = 0.29730177875068

Which fixed-point math (FPM_* define) and optimization (OPT_*) settings 
are you using?

For FPM_INTEL with default optimization, I find III_requantize(8, -23) 
returns 0x04c1bf82 (0.29730177670717239).

-- 
Rob Leslie
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.