Solutions
MATH-C08-C-001
A value that is too large for the format causes overflow. Enter 1.
MATH-C08-C-002
The maximum of [4, 10, 7] is 10, so subtract 10.
MATH-C08-C-003
The maximum of [-2, 3, 1] is 3, so m = 3.
MATH-C08-C-004
MATH-C08-C-005
The denominator is:
So:
MATH-C08-C-006
No. Floating-point arithmetic uses finite approximations and rounded intermediate results. It is useful and fast, but it is not the same as exact real-number arithmetic.
MATH-C08-C-007
Yes. Epsilon prevents some numerical failures, but it changes the expression. If it is too large, it can dominate the quantity it was meant to protect.
MATH-C08-C-008
Output B shows stronger sensitivity. The input error changes output A by only
0.02, but changes output B by 20.
MATH-C08-C-009
The gradients tend to vanish. Repeated multiplication by factors below 1
shrinks the scale.
MATH-C08-C-010
Finite-difference gradients are too slow for normal training in large neural
networks. Checking each parameter requires separate perturbations, while
backpropagation reuses the computation graph efficiently. Enter 1.
MATH-C08-C-011
Floating-point arithmetic stores finite approximations and rounds intermediate values.
Two mathematically equivalent computations can take different rounded paths, so their stored results may differ slightly. A tolerance checks whether they are close enough.
MATH-C08-C-012
Stable softmax subtracts the same maximum from every logit before exponentiating.
That changes the intermediate exponentials, but the common factor cancels from the numerator and denominator, so the final probabilities stay the same.
MATH-C08-C-013
Finite-difference checks depend on h.
If h is too large, the estimate is no longer local. If h is too small,
rounding error can dominate the subtraction.
MATH-C08-C-014
Epsilon is useful when there is a known numerical danger, such as division by
zero or log(0).
It should not be added everywhere by habit because it changes the computation.