EDOM

V

Victor Bazarov

Web Developer said:
I came across the term EDOM in a code. What does it mean?

It's a value of 'errno' variable. Indicates floating point
error -- argument is out of acceptable range (IIRC). For
example, acos(1.5) should produce errno == EDOM.

Victor
 
S

Stephen Howe

It's a value of 'errno' variable.
Both 'EDOM' and 'errno' are macros, Bazarov.

Not according to C99. EDOM is a macro but errno need not be.

Stephen Howe
 
S

Stephen Howe

C99 says that "It is unspecified whether errno is a macro or
an identifier declared with external linkage. If a macro
definition is suppressed in order to access an actual object,
or a program defines an identifier with the name errno, the
behavior is undefined". Now, as for C++, see tables 26 and 95.

'errno' is a standard macro in C++. End of story.

You are not reading that right.
What if an implementation provides

"an identifier declared with external linkage."

that is not a macro? That is compliant. Did you see the word "OR"?
That means the 2nd possibility is okay.

Stephen
 
A

Alexander Terekhov

Attila Feher said:
Alexander Terekhov wrote:
[SNIP]
'errno' is a standard macro in C++. End of story.

Unfortunately it is (19.3/Table 26, Annex C/Table 95 both says MARCO).

Really? Well, I'm now ~2000 miles away from my pdfs,
so I can't check it.
Fortunately it is a macro (on my Solaris) compiling (well, precompiled) into
a thread-safe function call. :)

Ahem. ;-)

regards,
alexander.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,356
Latest member
Tommyhotly

Latest Threads

Top