sum: sum

sumR Documentation

sum

Description

Sums any combination of float/numeric vector(s)/matri[x|ces].

Usage

## S4 method for signature 'float32'
sum(x, ..., na.rm = FALSE)

Arguments

x

A float matrix.

...

Additional elements (numeric/float vectors/matrices) to sum.

na.rm

should NA's be removed?

Details

If there are any elements in ..., all elements in the list will first be summed in their native precision, then converted to double precision so they can be combined with base::sum(). The final result will be cast to single precision if ... contains only integer and/or float objects. Otherwise, the return will be double precision.

Value

A single value.

Examples

library(float)
x = flrunif(10, 3)

sum(x)
sum(x, 1)


float documentation built on May 29, 2024, 8:13 a.m.