Add isinf and isnan
Add log function