signifz {UNF}R Documentation

round values to specified number of significant digits

Description

Rounds the value to a specified number of significant digits, using IEEE 754 rounding towards zero rounding mode

Usage

        signifz (x, digits=6)

Arguments

x A numeric vector.
digits integer indicating the precision to be used

Details

`signifz' rounds the values in its first argument to the specified number of significant digits, using IEC 60559/IEEE 754 ``round towards zero'' mode.

Rounding toward zero assures that signifz(signifz(x,digits=m),digits=n) = signifz(x,digits=n) for $m>n$, an important property for creating approximate fingerprints. It can, however, produce more rounding error than rounding toward nearest. The maximum log relative error (LRE) for the former is (digits-1) while the maximum LRE for the latter is `digits'. Hence, you may wish to use one more significant digit with signifz than with signif.

Author(s)

Micah Altman Micah_Altman@harvard.edu

http://thedata.org/index.php/Main/UNF

See Also

signif, unf

Examples

# note the difference
signif(pi,digits=5)
signifz(pi,digits=5) 

[Package UNF version 1.16 Index]