 #include "s_gradiant.h"
 #include "debug_macros.h"
 
+#include <math.h>
 #include <stdio.h>
 #include <inttypes.h>
 

                xcoord[bin] = prev + newbin;
                yval[bin]   = -(num*num) / (4.0f * denB) + hist[prev];

                if( yval[bin] > y_max ) {
                    y_max = yval[bin];
                    maxbin = bin;
                }
            }
        }
    }
    float th = ((M_PI2 * xcoord[maxbin]) / ORI_NBINS) - M_PI;

    ext->orientation = th;
}

    float xcoord[ORI_NBINS];
    float yval[ORI_NBINS];

    int   maxbin[3];
    float y_max[3];

    #pragma unroll
    for( int i=0; i<3; i++ ) {
        maxbin[i] = 0;
        y_max[i] = -INFINITY;
    }

    for(int bin = 0; bin < ORI_NBINS; bin++) {
        int prev = bin - 1;
        if( prev < 0 ) prev = ORI_NBINS - 1;
