# The Intrinsic Library (intrinsics)

Collection of intrinsic Rel definitions.

## Int

View source
``Int(x)``

Holds if `x` is a 64-bit signed integer type.

Examples

Integrity constraint that tests whether `x` is an Int.

``````def R = 6

ic int_type_check(x in R) {
Int(x)
}``````

Schema defined in a relation using `Int`:

``````def my_relation(x in String, y in Int) {
x = "abc" and y = 123
}

def output = my_relation``````

## Int32

View source
``Int32(x)``

Holds if `x` is a 32-bit signed integer type.

## Int64

View source
``Int64(x)``

Holds if `x` is a 64-bit signed integer type.

## Int128

View source
``Int128(x)``

Holds if `x` is a 128-bit signed integer type.

## UInt

View source
``UInt(x)``

Holds if `x` is a 64-bit unsigned integer type.

Examples

Integrity constraint that tests whether `x` is a 64-bit unsigned integer:

``````def R = uint64[2]

ic uint_type_check(x in R) {
UInt(x)
}``````

## UInt32

View source
``UInt32(x)``

Holds if `x` is a 32-bit unsigned integer type.

## UInt64

View source
``UInt64(x)``

Holds if `x` is a 64-bit unsigned integer type.

## UInt128

View source
``UInt128(x)``

Holds if `x` is a 128-bit unsigned integer type.

## Float

View source
``Float(x)``

Holds if `x` is a 64-bit floating point number type.

Example

Integrity constraint that tests whether `x` is a 64-bit floating point number.

``````def R = Float[2.0]

ic float_type_check(x in R) {
Float(x)
}``````

## Float32

View source
``Float32(x)``

Holds if `x` is a 32-bit floating point number type.

## Float64

View source
``Float64(x)``

Holds if `x` is a 64-bit floating point number type.