.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
.\" <mtk.manpages@gmail.com>
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.TH MATHERR 3 2010-09-10 "Linux" "Linux Programmer's Manual"
.SH NAME
acos(|x|>1) DOMAIN HUGE y EDOM
asin(|x|>1) DOMAIN HUGE y EDOM
atan2(0,0) DOMAIN HUGE y EDOM
-acosh(x<1) DOMAIN NAN y EDOM \" retval is 0.0/0.0
-atanh(|x|>1) DOMAIN NAN y EDOM \" retval is 0.0/0.0
-atanh(|x|==1) SING (x>0.0)? y EDOM \" retval is x/0.0
+acosh(x<1) DOMAIN NAN y EDOM \" retval is 0.0/0.0
+atanh(|x|>1) DOMAIN NAN y EDOM \" retval is 0.0/0.0
+atanh(|x|==1) SING (x>0.0)? y EDOM \" retval is x/0.0
\ \ HUGE_VAL :
\ \ \-HUGE_VAL
cosh(fin) o/f OVERFLOW HUGE n ERANGE
log(0) SING \-HUGE y EDOM
log(x<0) DOMAIN \-HUGE y EDOM
log2(0) SING \-HUGE n EDOM \" different from log()
-log2(x<0) DOMAIN -HUGE n EDOM \" different from log()
+log2(x<0) DOMAIN \-HUGE n EDOM \" different from log()
log10(0) SING \-HUGE y EDOM
log10(x<0) DOMAIN \-HUGE y EDOM
pow(0.0,0.0) DOMAIN 0.0 y EDOM
scalb() u/f UNDERFLOW copysign( n ERANGE
\ \ \ \ 0.0,x)
fmod(x,0) DOMAIN x y EDOM
-remainder(x,0) DOMAIN NAN y EDOM \" retval is 0.0/0.0
+remainder(x,0) DOMAIN NAN y EDOM \" retval is 0.0/0.0
.TE
.SH EXAMPLE
The example program demonstrates the use of
The following example run, where
.BR log (3)
is given an argument of 0.0, does not use
-.BR matherr() :
+.BR matherr ():
.in +4n
.nf
.RB "$" " ./a.out 0.0 0"
matherr SING exception in log() function
args: 0.000000, 0.000000
- retval: -340282346638528859811704183484516925440.000000
+ retval: \-340282346638528859811704183484516925440.000000
log: SING error
errno: Numerical argument out of domain
x=-340282346638528859811704183484516925440.000000
.RB "$" " ./a.out 0.0 1"
matherr SING exception in log() function
args: 0.000000, 0.000000
- retval: -340282346638528859811704183484516925440.000000
+ retval: \-340282346638528859811704183484516925440.000000
x=-340282346638528859811704183484516925440.000000
.fi
.in
.RB "$" " ./a.out 0.0 1 12345.0"
matherr SING exception in log() function
args: 0.000000, 0.000000
- retval: -340282346638528859811704183484516925440.000000
+ retval: \-340282346638528859811704183484516925440.000000
x=12345.000000
.fi
.in
(exc\->type == PLOSS) ? "PLOSS" : "???",
exc\->name);
fprintf(stderr, " args: %f, %f\\n",
- exc\->arg1, exc->arg2);
+ exc\->arg1, exc\->arg2);
fprintf(stderr, " retval: %f\\n", exc\->retval);
if (change_retval)
if (argc < 2) {
fprintf(stderr, "Usage: %s <argval>"
- " [<matherr\-ret> [<new\-func-retval>]]\\n", argv[0]);
+ " [<matherr\-ret> [<new\-func\-retval>]]\\n", argv[0]);
exit(EXIT_FAILURE);
}
.BR fenv (3),
.BR math_error (7),
.BR standards (7)
+.SH COLOPHON
+This page is part of release 3.68 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.