Skip to content

All Operations

The following operations are implemented as CUDA kernels. All operations are correctly-rounded, given the limitations of the precision of the underlying CUDA operation. The tightest interval is always a subset of the computed interval. For most operations, the lower and upper bounds of the basic operations are at most 3 ulps away from the lower and upper bounds of the tightest interval, respectively. The error for a particular operation is given below.

OperationFunction DescriptionError [ulps]
negIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
addIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
subIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
mulIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
divIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
recipIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
sqrIRIR0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}0
sqrtIR0IR0\mathbb{IR}_{\ge \mathbf{0}} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}0
fmaIR3IR\mathbb{IR}^3 \rightarrow \mathbb{IR}0
migIRR\mathbb{IR} \rightarrow \mathbb{R}0
magIRR\mathbb{IR} \rightarrow \mathbb{R}0
radIRR\mathbb{IR} \rightarrow \mathbb{R}0
absIRIR0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}0
minIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
maxIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
cbrtIRIR\mathbb{IR} \rightarrow \mathbb{IR}1
fabsIRIR0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}0
fmaxIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
fminIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
OperationFunction DescriptionError [ulps]
infIRR\mathbb{IR} \rightarrow \mathbb{R}0
supIRR\mathbb{IR} \rightarrow \mathbb{R}0
midIRR\mathbb{IR} \rightarrow \mathbb{R}0
widthIRR0\mathbb{IR} \rightarrow \mathbb{R}_{\ge \mathbf{0}}0
OperationFunction DescriptionError [ulps]
floorIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
ceilIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
truncIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
signIR{1,0,1}\mathbb{IR} \rightarrow \{-1, 0, 1\}0
roundIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
nearbyintIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
rintIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
fdimIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
round_to_nearest_evenIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
round_ties_to_awayIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
OperationFunction DescriptionError [ulps]
intersectionIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
convex_hullIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
hullIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
OperationFunction DescriptionError [ulps]
equalIR2B\mathbb{IR}^2 \rightarrow \mathbb{B}0
subsetIR2B\mathbb{IR}^2 \rightarrow \mathbb{B}0
interiorIR2B\mathbb{IR}^2 \rightarrow \mathbb{B}0
disjointIR2B\mathbb{IR}^2 \rightarrow \mathbb{B}0
lessIR2B\mathbb{IR}^2 \rightarrow \mathbb{B}0
precedesIR2B\mathbb{IR}^2 \rightarrow \mathbb{B}0
emptyIRB\mathbb{IR} \rightarrow \mathbb{B}0
entireIRB\mathbb{IR} \rightarrow \mathbb{B}0
just_zeroIRB\mathbb{IR} \rightarrow \mathbb{B}0
containsIR×RB\mathbb{IR}\times\mathbb{R} \rightarrow \mathbb{B}0
boundedIRB\mathbb{IR} \rightarrow \mathbb{B}0
isfiniteIRB\mathbb{IR} \rightarrow \mathbb{B}0
strict_less_or_both_infR2B\mathbb{R}^2 \rightarrow \mathbb{B}0
strict_lessIR2B\mathbb{IR}^2 \rightarrow \mathbb{B}0
strict_precedesIR2B\mathbb{IR}^2 \rightarrow \mathbb{B}0
isinfIRB\mathbb{IR} \rightarrow \mathbb{B}0
isnaiIRB\mathbb{IR} \rightarrow \mathbb{B}0
is_memberR×IRB\mathbb{R}\times\mathbb{IR} \rightarrow \mathbb{B}0
is_singletonIRB\mathbb{IR} \rightarrow \mathbb{B}0
is_common_intervalIRB\mathbb{IR} \rightarrow \mathbb{B}0
isnormalIRB\mathbb{IR} \rightarrow \mathbb{B}0
is_atomicIRB\mathbb{IR} \rightarrow \mathbb{B}0
OperationFunction DescriptionError [ulps]
expIRIR0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}3
exp2IRIR0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}3
exp10IRIR0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}3
expm1IRIR1\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{-1}}3
logIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
log2IRIR\mathbb{IR} \rightarrow \mathbb{IR}3
log10IRIR\mathbb{IR} \rightarrow \mathbb{IR}3
log1pIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
pownIR×ZIR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}1
powIR×RIR\mathbb{IR}\times\mathbb{R} \rightarrow \mathbb{IR}1
rootnIR×ZIR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}2
ldexpIR×ZIR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}0
scalblnIR×ZIR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}0
scalbnIR×ZIR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}0
logbIRIR\mathbb{IR} \rightarrow \mathbb{IR}0
OperationFunction DescriptionError [ulps]
sinIRIR\mathbb{IR} \rightarrow \mathbb{IR}2
cosIRIR\mathbb{IR} \rightarrow \mathbb{IR}2
tanIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
asinIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
acosIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
atanIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
atan2IR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}3
cotIRIR\mathbb{IR} \rightarrow \mathbb{IR}4
sinpiIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
cospiIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
OperationFunction DescriptionError [ulps]
sinhIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
coshIRIR1\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{1}}2
cothIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
tanhIRIR\mathbb{IR} \rightarrow \mathbb{IR}2
arcsinhIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
arccoshIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
arctanhIRIR\mathbb{IR} \rightarrow \mathbb{IR}3
OperationFunction DescriptionError [ulps]
hypotIR2IR0\mathbb{IR}^2 \rightarrow \mathbb{IR}_{\ge \mathbf{0}}0
erfIRIR\mathbb{IR} \rightarrow \mathbb{IR}2
erfcIRIR0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}5
bisectIR×RR\mathbb{IR}\times\mathbb{R} \rightarrow \mathbb{R}0
minceIR×IR×NR\mathbb{IR}\times\mathbb{IR}\times\mathbb{N} \rightarrow \mathbb{R}0
OperationFunction DescriptionError [ulps]
cancel_minusIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0
cancel_plusIR2IR\mathbb{IR}^2 \rightarrow \mathbb{IR}0