4 Comments
Feb 10Liked by Avi Chawla

I'm doing 3rd year engineering where I'm studying data science... I'm learning things here that they would never teach in college... Daily dose of Data Science is awesome ❤️

Expand full comment
Feb 11Liked by Avi Chawla

What about underflow? Could exp(-1000) be too small to represent?

Expand full comment
author

I have never experienced problems due to such cases, to be very honest.

Considering the range of exponent (0, inf), it's bounded on the lower side so libraries automatically consider the output to be zero when the input is too small. However, since there's no upper bound, that's where it gets problematic.

For instance, try doing:

- math.exp(-10000) -> 0

- math.exp(10000) -> overflow.

Expand full comment
Feb 10Liked by Avi Chawla

Very easy to understand and superb explanation!

Expand full comment