usencrypt.sqrt#

usencrypt.sqrt(x)#

Computes the non-negative square-root of \(x\).

Parameters

x (usencrypt.cipher.Float or float) – The input value.

Returns

The non-negative square-root of x.

Return type

usencrypt.cipher.Float

Examples
>>> import usencrypt as ue
>>> a = ue.encrypt(0.75)
>>> a_sqrt = ue.sqrt(a)
>>> a_sqrt
(0x7f845beec850) Float: 0x3f4dd3c60121b894888dfc3568ad8099bdd0cd529558a486c33235cbce37f244
>>> ue.decrypt(a_sqrt)
0.8660254047717899