The float that measures the gas level is not centered on your gas tank. Its in the rear passenger corner of your tank. This means, if your on a upward slope that leans to the left of the car, your tank will show much higher than it really is. The gas light flickering on and off is basically adjusting to your cars general position in the X,Y and Z axis.
With a quarter tank you can get the gas light to go on if your on a downward hill that leans the car over to the right. Of course, the more level and steady you are, the more accurate the meter reads.
If that light stays on continuously no matter what position your car is in, you have a roughly 2 gallons left. Our light warns us early. My light comes on when I have about 4 gallons of gas left. Thats 100 miles of steady highway driving!!!