Capy-Bearer Documentation

sqrt

lib call

Capy

function sqrt(value : f32) f32
function sqrt(value : f64) f64

Description

sqrt() is the IEEE square root, correctly rounded.

Parameters

value : a floating-point number

Return Values

The square root of value, in the same type. A negative input yields NaN.

Example

Capy

print(sqrt(16.0), " ", is_nan(sqrt(-1.0)), "\n")

Output

4 true