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