Product Documentation

c-treeDB API API for C

Previous Topic

Next Topic

ctdbNumberRound

Round a number to a scale.

Declaration

CTDBRET ctdbNumberRound(pCTNUMBER num, NINT scale)

Description

ctdbNumberRound() rounds a number to a certain number of decimal digits.

  • num [in] pointer to the number to be rounded.
  • scale [out] the number of decimal digits.

Returns

ctdbNumberRound() returns CTDBRET_OK on success, or c-treeDB API error on failure.

The possible errors associated with ctdbNumberRound() are:

  • CTDBRET_NULARG (4007): Null argument not valid in any operand
  • CTDBRET_OVERFLOW (4038): Operation caused overflow

See also

ctdbNumberAdd(), ctdbNumberSub(), ctdbNumberMul(), ctdbNumberDiv(), ctdbNumberAbs(), ctdbNumberCmp(), ctdbNumberZero(), ctdbNumberCopy(), ctdbNumberGetDecimal(), ctdbNumberCopy(), ctdbNumberGetDecimal()

TOCIndex