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 DescriptionFP32 Error [ulps]FP64 Error [ulps]
negIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
addIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
subIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
mulIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
divIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
recipIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
sqrIR→IR≥0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}00
sqrtIR≥0→IR≥0\mathbb{IR}_{\ge \mathbf{0}} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}00
fmaIR3→IR\mathbb{IR}^3 \rightarrow \mathbb{IR}00
migIR→R\mathbb{IR} \rightarrow \mathbb{R}00
magIR→R\mathbb{IR} \rightarrow \mathbb{R}00
radIR→R\mathbb{IR} \rightarrow \mathbb{R}00
absIR→IR≥0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}00
minIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
maxIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
cbrtIR→IR\mathbb{IR} \rightarrow \mathbb{IR}11
fabsIR→IR≥0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}00
fmaxIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
fminIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
OperationFunction DescriptionFP32 Error [ulps]FP64 Error [ulps]
infIR→R\mathbb{IR} \rightarrow \mathbb{R}00
supIR→R\mathbb{IR} \rightarrow \mathbb{R}00
midIR→R\mathbb{IR} \rightarrow \mathbb{R}00
widthIR→R≥0\mathbb{IR} \rightarrow \mathbb{R}_{\ge \mathbf{0}}00
OperationFunction DescriptionFP32 Error [ulps]FP64 Error [ulps]
floorIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
ceilIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
truncIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
signIR→{−1,0,1}\mathbb{IR} \rightarrow \{-1, 0, 1\}00
roundIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
nearbyintIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
rintIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
fdimIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
round_to_nearest_evenIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
round_ties_to_awayIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
copysignIR×R→IR\mathbb{IR}\times\mathbb{R} \rightarrow \mathbb{IR}00
OperationFunction DescriptionFP32 Error [ulps]FP64 Error [ulps]
intersectionIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
convex_hullIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
hullIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
OperationFunction DescriptionFP32 Error [ulps]FP64 Error [ulps]
equalIR2→B\mathbb{IR}^2 \rightarrow \mathbb{B}00
subsetIR2→B\mathbb{IR}^2 \rightarrow \mathbb{B}00
interiorIR2→B\mathbb{IR}^2 \rightarrow \mathbb{B}00
disjointIR2→B\mathbb{IR}^2 \rightarrow \mathbb{B}00
lessIR2→B\mathbb{IR}^2 \rightarrow \mathbb{B}00
precedesIR2→B\mathbb{IR}^2 \rightarrow \mathbb{B}00
emptyIR→B\mathbb{IR} \rightarrow \mathbb{B}00
entireIR→B\mathbb{IR} \rightarrow \mathbb{B}00
just_zeroIR→B\mathbb{IR} \rightarrow \mathbb{B}00
containsIR×R→B\mathbb{IR}\times\mathbb{R} \rightarrow \mathbb{B}00
boundedIR→B\mathbb{IR} \rightarrow \mathbb{B}00
isfiniteIR→B\mathbb{IR} \rightarrow \mathbb{B}00
strict_less_or_both_infR2→B\mathbb{R}^2 \rightarrow \mathbb{B}00
strict_lessIR2→B\mathbb{IR}^2 \rightarrow \mathbb{B}00
strict_precedesIR2→B\mathbb{IR}^2 \rightarrow \mathbb{B}00
isinfIR→B\mathbb{IR} \rightarrow \mathbb{B}00
isnaiIR→B\mathbb{IR} \rightarrow \mathbb{B}00
is_memberR×IR→B\mathbb{R}\times\mathbb{IR} \rightarrow \mathbb{B}00
is_singletonIR→B\mathbb{IR} \rightarrow \mathbb{B}00
is_common_intervalIR→B\mathbb{IR} \rightarrow \mathbb{B}00
isnormalIR→B\mathbb{IR} \rightarrow \mathbb{B}00
is_atomicIR→B\mathbb{IR} \rightarrow \mathbb{B}00
isnanIR→B\mathbb{IR} \rightarrow \mathbb{B}00
OperationFunction DescriptionFP32 Error [ulps]FP64 Error [ulps]
expIR→IR≥0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}33
exp2IR→IR≥0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}33
exp10IR→IR≥0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}33
expm1IR→IR≥−1\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{-1}}33
logIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
log2IR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
log10IR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
log1pIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
pownIR×Z→IR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}11
powIR×R→IR\mathbb{IR}\times\mathbb{R} \rightarrow \mathbb{IR}11
rootnIR×Z→IR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}22
ldexpIR×Z→IR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}00
scalblnIR×Z→IR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}00
scalbnIR×Z→IR\mathbb{IR}\times\mathbb{Z} \rightarrow \mathbb{IR}00
logbIR→IR\mathbb{IR} \rightarrow \mathbb{IR}00
OperationFunction DescriptionFP32 Error [ulps]FP64 Error [ulps]
sinIR→IR\mathbb{IR} \rightarrow \mathbb{IR}22
cosIR→IR\mathbb{IR} \rightarrow \mathbb{IR}22
tanIR→IR\mathbb{IR} \rightarrow \mathbb{IR}42
asinIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
acosIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
atanIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
atan2IR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}33
cotIR→IR\mathbb{IR} \rightarrow \mathbb{IR}44
sinpiIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
cospiIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
OperationFunction DescriptionFP32 Error [ulps]FP64 Error [ulps]
sinhIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
coshIR→IR≥1\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{1}}22
cothIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
tanhIR→IR\mathbb{IR} \rightarrow \mathbb{IR}22
arcsinhIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
arccoshIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
arctanhIR→IR\mathbb{IR} \rightarrow \mathbb{IR}33
OperationFunction DescriptionFP32 Error [ulps]FP64 Error [ulps]
hypotIR2→IR≥0\mathbb{IR}^2 \rightarrow \mathbb{IR}_{\ge \mathbf{0}}00
erfIR→IR\mathbb{IR} \rightarrow \mathbb{IR}22
erfcIR→IR≥0\mathbb{IR} \rightarrow \mathbb{IR}_{\ge \mathbf{0}}55
bisectIR×R→R\mathbb{IR}\times\mathbb{R} \rightarrow \mathbb{R}00
minceIR×IR×N→R\mathbb{IR}\times\mathbb{IR}\times\mathbb{N} \rightarrow \mathbb{R}00
OperationFunction DescriptionFP32 Error [ulps]FP64 Error [ulps]
cancel_minusIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00
cancel_plusIR2→IR\mathbb{IR}^2 \rightarrow \mathbb{IR}00