intervals: Intervals for lazy numbers

View source: R/lazyNumbers.R

intervalsR Documentation

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)

Arguments

x

a lazyVector object or a lazyMatrix object

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.

Examples

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

lazyNumbers documentation built on Nov. 22, 2022, 1:05 a.m.