sapdev logo background
sapdev logo sapdev logo
Comments

SAP FLOATING POINT CLASS documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

Operations with Floating Point Numbers
Class CL_ABAP_MATH contains methods and constants for operations with floating point numbers.

Rounding binary floating point numbers
Method ROUND_F_TO_15_DECS rounds a
binary floating point number arithmethically to 15 decimal places.

Operations with decimal floating point numbers
  • Method GET_SCALE gets the scaling of a decimal floating point number .

  • Method GET_NUMBER_OF_DIGITS gets the

  • precision of a decimal floating point number
    .
  • The method NORMALIZE gets a normalized floating point number. This means that the scaling and precision of an input value are changed so that the mantissa has no trailing zeros.

  • Method GET_SCALE_NORMALIZED returns the

  • scaling of a decimal floating point number
    . If the input value has decimal places, the return code is the number of decimal places without trailing zeros.
  • The method GET_MAX_DB_VALUE returns the maximum value of a number of the type DF16_DEC or DF34_DEC on the database.

  • The method GET_DB_LENGTH_DECS returns the length and number of decimal places of a number of the type DF16_DEC or DF34_DEC

  • on the database.

    Note
    The rounding functions round
    and rescale can be used to round and rescale decimal floating point numbers.
    Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




    FLOATING_POINT_ARITH_GLOSRY
    FLOATING_POINT_FUNCTIONS




    comments powered by Disqus