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

Functions

template<dim N>
int8 abs (int8[[N]] x)
 
template<dim N>
int16 abs (int16[[N]] x)
 
template<dim N>
int32 abs (int32[[N]] x)
 
template<dim N>
int64 abs (int64[[N]] x)
 
template<dim N>
float32 abs (float32[[N]] x)
 
template<dim N>
float64 abs (float64[[N]] x)
 

Detailed Description

Function for finding the absolute value of the input.

Note
Supported types - int8 / int16 / int32 / int / float32 / float64
Parameters
x- input of supported type
Returns
returns the absolute value of the input if it's a scalar or a vector where every element of the input vector is replaced with its absolute value

Function Documentation

◆ abs() [1/6]

float32 abs ( float32[[N]]  x)

◆ abs() [2/6]

float64 abs ( float64[[N]]  x)

◆ abs() [3/6]

int16 abs ( int16[[N]]  x)

◆ abs() [4/6]

int32 abs ( int32[[N]]  x)

◆ abs() [5/6]

int64 abs ( int64[[N]]  x)

◆ abs() [6/6]

int8 abs ( int8[[N]]  x)