SecreC 2 language 2.9.0 (2026.10)
Language and standard library reference
Loading...
Searching...
No Matches
Functions

Functions

template<dim N>
int8 abs (int8 x)
 
template<dim N>
int16 abs (int16 x)
 
template<dim N>
int32 abs (int32 x)
 
template<dim N>
int64 abs (int64 x)
 
template<dim N>
float32 abs (float32 x)
 
template<dim N>
float64 abs (float64 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]

template<dim N>
float32 abs ( float32  x)

◆ abs() [2/6]

template<dim N>
float64 abs ( float64  x)

◆ abs() [3/6]

template<dim N>
int16 abs ( int16  x)

◆ abs() [4/6]

template<dim N>
int32 abs ( int32  x)

◆ abs() [5/6]

template<dim N>
int64 abs ( int64  x)

◆ abs() [6/6]

template<dim N>
int8 abs ( int8  x)