switch to log base e for windows compatibility
replace bzero with memset