Yes, you can get “saturation” of the floating point values. It’s way easier to saturate to 1 than it is to 0: in float64
, z > 36 will do it. In float32
, it’s a lot less, but I forget the number.
You’re right that multiplying by 0 doesn’t help because 0 * \infty is NaN. Here’s a thread which shows some defense mechanisms you can implement.