Make numerical computation trustworthy
Check whether a calculation stays reliable when the numbers get large, even if the formula looks correct.
- Starting information
Two large scores: 1000 and 1001
- Relationship or operation
Subtract their maximum before exponentiating
- Consequence
Exponentials of −1 and 0
Shifting all scores by the same amount preserves softmax probabilities while avoiding unnecessary overflow. Finite precision still has limits.
Your learning goal
Add the same number to every score and inspect the result. Choose a calculation that stays reliable, and recognize when a numerical check cannot decide.