1.3.7.1 DIVAS_SquareRoot Function

C

uint32_t DIVAS_SquareRoot(uint32_t number)

Summary

This function uses the DIVAS peripheral to perform a square root operation.

Description

This function uses the DIVAS peripheral to perform a square root operation. The function will return the square root of the 32-bit unsigned input number.

Precondition

The peripheral should have been initialized by calling the DIVAS_Initialize() function once.

Parameters

Param Description
number unsigned number whose square root needs to be obtained

Returns

The function returns the square root of the value contained in the number parameter.

Example

int32_t number;
uint32_t squareroot;   
    
number = 144;
squareroot = DIVAS_SquareRoot(number);

Remarks

None.