Rounding: Rounding functions

18-RoundR Documentation

Rounding functions

Description

Rounding functions.

Usage

## S4 method for signature 'Rcpp_MPCR'
ceiling(x)

## S4 method for signature 'Rcpp_MPCR'
floor(x)

## S4 method for signature 'Rcpp_MPCR'
trunc(x)

## S4 method for signature 'Rcpp_MPCR'
round(x, digits = 0)

Arguments

x

An MPCR object.

digits

The number of digits to use in rounding.

Value

An MPCR object of the same dimensions as the input.

Examples

  
  library(MPCR)

  input <- runif(20,-1,1)
  x <- as.MPCR(input,precision="double")
  floor(x)
  

MPCR documentation built on April 13, 2025, 5:08 p.m.

Related to Rounding in MPCR...