summaryrefslogtreecommitdiffstats
path: root/man7/math_error.7
diff options
context:
space:
mode:
Diffstat (limited to 'man7/math_error.7')
-rw-r--r--man7/math_error.738
1 files changed, 19 insertions, 19 deletions
diff --git a/man7/math_error.7 b/man7/math_error.7
index 46e90a06f..b7d65c8e9 100644
--- a/man7/math_error.7
+++ b/man7/math_error.7
@@ -24,12 +24,12 @@ There are two error-reporting mechanisms:
the older one sets
.IR errno ;
the newer one uses the floating-point exception mechanism (the use of
-.BR feclearexcept (3)
+.MR feclearexcept 3
and
-.BR fetestexcept (3),
+.MR fetestexcept 3 ,
as outlined below)
described in
-.BR fenv (3).
+.MR fenv 3 .
.P
A portable program that needs to check for an error from a mathematical
function should set
@@ -47,7 +47,7 @@ before calling a mathematical function.
Upon return from the mathematical function, if
.I errno
is nonzero, or the following call (see
-.BR fenv (3))
+.MR fenv 3 )
returns nonzero
.P
.in +4n
@@ -76,7 +76,7 @@ A
occurs when a mathematical function is supplied with an argument whose
value falls outside the domain for which the function
is defined (e.g., giving a negative argument to
-.BR log (3)).
+.MR log 3 ).
When a domain error occurs,
math functions commonly return a NaN
(though some functions return a different value in this case);
@@ -173,7 +173,7 @@ This identifier is supposed to indicate which of the two
error-notification mechanisms
.RI ( errno ,
exceptions retrievable via
-.BR fetestexcept (3))
+.MR fetestexcept 3 )
is in use.
The standards require that at least one be in use,
but permit both to be available.
@@ -190,13 +190,13 @@ See the individual manual pages for details.
To avoid the complexities of using
.I errno
and
-.BR fetestexcept (3)
+.MR fetestexcept 3
for error checking,
it is often advised that one should instead check for bad argument
values before each call.
.\" http://www.securecoding.cert.org/confluence/display/seccode/FLP32-C.+Prevent+or+detect+domain+and+range+errors+in+math+functions
For example, the following code ensures that
-.BR log (3)'s
+.MR log 3 's
argument is not a NaN and is not zero (a pole error) or
less than zero (a domain error):
.P
@@ -219,7 +219,7 @@ which in general are not required to return errors by C99
and POSIX.1.
.P
The
-.BR gcc (1)
+.MR gcc 1
.I "\-fno\-math\-errno"
option causes the executable to employ implementations of some
mathematical functions that are faster than the standard
@@ -227,20 +227,20 @@ implementations, but do not set
.I errno
on error.
(The
-.BR gcc (1)
+.MR gcc 1
.I "\-ffast\-math"
option also enables
.IR "\-fno\-math\-errno" .)
An error can still be tested for using
-.BR fetestexcept (3).
+.MR fetestexcept 3 .
.SH SEE ALSO
-.BR gcc (1),
-.BR errno (3),
-.BR fenv (3),
-.BR fpclassify (3),
-.BR INFINITY (3),
-.BR isgreater (3),
-.BR matherr (3),
-.BR nan (3)
+.MR gcc 1 ,
+.MR errno 3 ,
+.MR fenv 3 ,
+.MR fpclassify 3 ,
+.MR INFINITY 3 ,
+.MR isgreater 3 ,
+.MR matherr 3 ,
+.MR nan 3
.P
.I "info libc"