Function lupnt::round

Function Documentation

Real lupnt::round(Real x, int n)

Round a number to n decimal places.

Round x to n decimal places, preserving x’s autodiff derivative information (only the value is rounded).

Parameters:
  • x – Number to round

  • n – Number of decimal places

  • x – Value to round

  • n – Number of decimal places (default 0)

Returns:

Rounded number

Returns:

Rounded value