Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probably error in log2 functions test for skipping decimal part #27

Open
GoogleCodeExporter opened this issue Oct 20, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

line 132 in fix16_exp.c reads:
    if(x == 0) return (result << 16);

but it probably should be
    if(x == 1) return (result << 16);

If I understand correctly this is to test if x was dividable by 2. In other 
words, do we need to calculate decimal part.

So if x was 2^n then x is 1 after the while loop as 2^0 is 1.

Original issue reported on code.google.com by [email protected] on 19 Dec 2013 at 2:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant