use double instead of float, remove constant factor from tight loop
replace malloc with calloc for array allocation
try to build with pypy