Index Mathematics Conjectures nbv lettuce Widgets

sqrt_ceil!

Static integer square root of a scalar, rounded up. Integer and field arithmetic

sqrt_ceil! n

Returns ceil(sqrt(n)) for a static scalar n taken as its canonical integer, e.g. the side of the smallest square matrix holding n entries. This is integer arithmetic, unlike the field square root sqrt!.

Arguments

n
Static scalar.

Returns

A static scalar. Expression form only.

Constraints

None.

Example

(let x)
static a = sqrt_ceil! 10
static b = sqrt_ceil! 16
x * [a b]

Notes

Computed in f64, exact for values below 2^52. Errors: input must be static, input must be scalar.

Used in the standard library

bdlop/bdlop_milli_config