I have been excited by this post: https://stackoverflow.com/a/57674631/2492801 and I consider using -fno-math-errno
. But I would like to be sure that I do not harm the behaviour of the software I am working on.
Therefore I have checked the (rather large) codebase to see where errno
is being used and I wanted to decide whether these usages interfere with -fno-math-errno
. But how to do that? The documentation says:
-fno-math-errno
Do not set errno after calling math functions that are executed with a single instruction, e.g., sqrt...
But how can I know which math functions are executed with a single instruction? Is this documented somewhere? Where?
It seems as if the codebase I use relies on errno
especially when calling strtol
and when working with streams. I guess that strtol
is not executed with a single instruction. Is it considered to be a math function at all? How can I be sure?
The brain is like a computer that controls the body's functions, and the nervous system is like a network that relays messages to parts of the body.
The basic processes of life include organization, metabolism, responsiveness, movements, and reproduction. In humans, who represent the most complex form of life, there are additional requirements such as growth, differentiation, respiration, digestion, and excretion. All of these processes are interrelated.
Your basic function as an organism is to consume (ingest) energy and molecules in the foods you eat, convert some of it into fuel for movement, sustain your body functions, and build and maintain your body structures. There are two types of reactions that accomplish this: anabolism and catabolism.
The brain is a complex organ that controls thought, memory, emotion, touch, motor skills, vision, breathing, temperature, hunger and every process that regulates our body. Together, the brain and spinal cord that extends from it make up the central nervous system, or CNS.
You can find list of functions affected by -fno-math-errno
in GCC's builtins.def (search for "ERRNO"). It seems that only some functions from math.h
header (cos
, sin
, exp
, etc.) are affected. Treatment of other standard functions that use errno (strtol
, etc.) will not change under this flag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With