Skip to content

undefined behavior in fast_expf #10

@Dr15Jones

Description

@Dr15Jones

While using VDT while using the gcc undefined behavior compiles flag, we get the report

vdt/exp.h:144:38: runtime error: left shift of negative value -109

Which is
https://github.com/dpiparo/vdt/blob/master/include/exp.h#L144

The happens when calling vdt::fast_expf with the value

vdt::fast_expf (initial_x=-163.483994)

The C++ standard does say that left shifting a negative number is undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions