tried to make NegLogInt_Fn platform independent

thanks to Yukio Takeuchi for inspiration on this