I was using the Raster Calculator tool in ArcToolBox. I used the NDVI formula: (NIR - Red) / (NIR + Red) and instead of getting a range of DN values in the resulting raster between -1 and +1, I got only the integer values of -1, 0, 1. In searching ESRI Help, I figured out that the software was interpreting the input raster DN values as integers, so the output would be in integers.
I saw the code that you showed - thank you! It gave me the idea to incorporate the 'Float' function into the formula in ArcToolBox's Raster Calculator tool. It worked!!