Hi,
The attachment is the proposal patch for function numeric_exp in src/backend/utils/adt/numeric.c.
Young