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

Functions

template<domain D>
D bool isNegligible (D float32 a)
 
template<domain D>
D bool isNegligible (D float64 a)
 
template<domain D>
D bool isNegligible (D float32[[1]] a)
 
template<domain D>
D bool isNegligible (D float64[[1]] a)
 

Detailed Description

Function for finding if the error is small enough to neglect.

Note
D - any protection domain
Supported types - float32 / float64
Parameters
a- input
Returns
true if the error is small enough to neglect
false if the error is not small enough
Note
isNegligible checks up to the 5th place after the comma
Leakage
None

Function Documentation

◆ isNegligible() [1/4]

D bool isNegligible ( D float32  a)

◆ isNegligible() [2/4]

D bool isNegligible ( D float32[[1]]  a)

◆ isNegligible() [3/4]

D bool isNegligible ( D float64  a)

◆ isNegligible() [4/4]

D bool isNegligible ( D float64[[1]]  a)