prevent error domain on math.log