Since Java's BigDecimal does not support special values, we need to extend the class to handle that. Special values are:
- Positive infinity is encoded as "Infinity".
- Negative infinity is encoded as "-Infinity".
- Quiet not-a-number is encoded as either "NaN" or "-NaN".
- Signaling not-a-number is encoded as either "sNaN" or "-sNaN".
Since Java's BigDecimal does not support special values, we need to extend the class to handle that. Special values are: