SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions

Functions

template<domain D :shared3p , dim N>
D uint8 abs (D int8[[N]] x)
 
template<domain D :shared3p , dim N>
D uint16 abs (D int16[[N]] x)
 
template<domain D :shared3p , dim N>
D uint32 abs (D int32[[N]] x)
 
template<domain D :shared3p , dim N>
D uint abs (D int[[N]] x)
 
template<domain D :shared3p , dim N>
D float32 abs (D float32[[N]] value)
 
template<domain D :shared3p , dim N>
D float64 abs (D float64[[N]] value)
 
template<domain D :shared3p , dim N>
D fix32 abs (D fix32[[N]] value)
 
template<domain D :shared3p , dim N>
D fix64 abs (D fix64[[N]] value)
 

Detailed Description

Function for finding absolute values.

Note
D - shared3p protection domain
Supported types - int8 / int16 / int32 / int / float32 / float64 / fix32 / fix64
Parameters
x- an array of any dimension
Returns
returns an array of equal shape, size and dimension, where all values are the absolute values of the input array at that position
Leakage
None

Function Documentation

◆ abs() [1/8]

D fix32 abs ( D fix32[[N]]  value)

◆ abs() [2/8]

D fix64 abs ( D fix64[[N]]  value)

◆ abs() [3/8]

D float32 abs ( D float32[[N]]  value)

◆ abs() [4/8]

D float64 abs ( D float64[[N]]  value)

◆ abs() [5/8]

D uint16 abs ( D int16[[N]]  x)

◆ abs() [6/8]

D uint32 abs ( D int32[[N]]  x)

◆ abs() [7/8]

D uint8 abs ( D int8[[N]]  x)

◆ abs() [8/8]

D uint abs ( D int[[N]]  x)