I know what you mean ran out of gas once in the 22 years I am driving and it was in Manhattan during rush hour just off 5th Ave. It was murder, my gas gauge was broke.
The miles to empty thing beeps at 50 miles to go. I normally gas up shortly after that. Being in NYC I am not really in a situation where I would have to go a long distance to find a gas station. I do most of my driving in Queens, which is outside of Manhattan. Its one of the "outer boroughs". We are no where near a shortage on gas stations.
{For those who do not know NYC it is made up of 5 Boroughs Manhattan being the most famous. Then there is Queens, Brooklyn, the Bronx and Staten Island. To get the real feel for NYC you have to visit the outer boroughs especially Queens and Brooklyn. Just stay out of the bad neighborhoods.}