add hypot function that works on all types