Digital thermometer with high accuracy