numerical stable var & std