Seems like a pretty nuts use case to have a canvas with a greater height or width than ~2million but I think it's possible.
Maybe this applies in other places too? I think in general most of the web APIs should return floats as they map to JS numbers.