Skip to content

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

@GoogleCodeExporter

Description

@GoogleCodeExporter
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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions