correct_rounded: Readjust the vector to it's original norm after rounding

Description Usage Arguments Value Examples

View source: R/basic_functions.R

Description

After use of the function round_precision the norm of the input vector may have been altered by the rounding procedure. This function restores the norm by altering only the largest entry in the rounded vector (in order to create the least possible relative error).

Usage

1
correct_rounded(x, in_interval = c(0, 1))

Arguments

x

vector to be rounded

in_interval

Interval

Value

The adapted form of the input vector x.

Examples

1

slw287r/yapsa documentation built on June 7, 2020, 12:46 a.m.