Learn R Programming

lazyNumbers (version 1.2.1)

intervals: Intervals for lazy numbers

Description

For each lazy number in a lazyVector object or a lazyMatrix object, this function computes an interval containing this lazy number.

Usage

intervals(x)

Value

A named list ("inf" and "sup") containing: two numeric vectors if x is a lazy vector, two numeric matrices if x is a lazy matrix.

Arguments

x

a lazyVector object or a lazyMatrix object

Examples

Run this code
library(lazyNumbers)
x <- lazynb(22) / lazynb(7)
itrv <- intervals(x)
print(itrv, digits = 17L)
x_dbl <- as.double(x)
itrv$inf <= x_dbl & x_dbl <= itrv$sup

Run the code above in your browser using DataLab