#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:57+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages/man7/math_error.7:26 #, no-wrap msgid "MATH_ERROR" msgstr "" #. type: TH #: man-pages/man7/math_error.7:26 #, no-wrap msgid "2008-08-11" msgstr "" #. type: TH #: man-pages/man7/math_error.7:26 #, no-wrap msgid "Linux" msgstr "" #. type: TH #: man-pages/man7/math_error.7:26 #, no-wrap msgid "Linux Programmer's Manual" msgstr "" #. type: SH #: man-pages/man7/math_error.7:27 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:29 msgid "math_error - detecting errors from mathematical functions" msgstr "" #. type: SH #: man-pages/man7/math_error.7:29 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:34 #, no-wrap msgid "" "B<#include Emath.hE>\n" "B<#include Eerrno.hE>\n" "B<#include Efenv.hE>\n" msgstr "" #. type: SH #: man-pages/man7/math_error.7:35 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:53 msgid "" "When an error occurs, most library functions indicate this fact by returning " "a special value (e.g., -1 or NULL). Because they typically return a " "floating-point number, the mathematical functions declared in Imath." "hE> indicate an error using other mechanisms. There are two error-" "reporting mechanisms: the older one sets I; the newer one uses the " "floating-point exception mechanism (the use of B(3) and " "B(3), as outlined below) described in B(3)." msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:58 msgid "" "A portable program that needs to check for an error from a mathematical " "function should set I to zero, and make the following call" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:62 #, no-wrap msgid "feclearexcept(FE_ALL_EXCEPT);\n" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:66 msgid "before calling a mathematical function." msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:72 msgid "" "Upon return from the mathematical function, if I is nonzero, or the " "following call (see B(3)) returns nonzero" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:77 #, no-wrap msgid "" "fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW |\n" " FE_UNDERFLOW);\n" msgstr "" #. enum #. { #. FE_INVALID = 0x01, #. __FE_DENORM = 0x02, #. FE_DIVBYZERO = 0x04, #. FE_OVERFLOW = 0x08, #. FE_UNDERFLOW = 0x10, #. FE_INEXACT = 0x20 #. }; #. type: Plain text #: man-pages/man7/math_error.7:90 msgid "then an error occurred in the mathematical function." msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:93 msgid "" "The error conditions that can occur for mathematical functions are described " "below." msgstr "" #. type: SS #: man-pages/man7/math_error.7:93 #, no-wrap msgid "Domain error" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:109 msgid "" "A I 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 B(3)). When a domain " "error occurs, math functions commonly return a NaN (though some functions " "return a different value in this case); I is set to B, and an " "\"invalid\" (B) floating-point exception is raised." msgstr "" #. type: SS #: man-pages/man7/math_error.7:109 #, no-wrap msgid "Pole error" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:133 msgid "" "A I occurs when the mathematical result of a function is an " "exact infinity (e.g., the logarithm of 0 is negative infinity). When a pole " "error occurs, the function returns the (signed) value B, " "B, or B, depending on whether the function result type " "is I, I, or I. The sign of the result is that " "which is mathematically correct for the function. I is set to " "B, and a \"divide-by-zero\" (B) floating-point " "exception is raised." msgstr "" #. type: SS #: man-pages/man7/math_error.7:133 #, no-wrap msgid "Range error" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:140 msgid "" "A I occurs when the magnitude of the function result means that " "it cannot be represented in the result type of the function. The return " "value of the function depends on whether the range error was an overflow or " "an underflow." msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:162 msgid "" "A floating result I if the result is finite, but is too large to " "represented in the result type. When an overflow occurs, the function " "returns the value B, B, or B, depending on " "whether the function result type is I, I, or I. " "I is set to B, and an \"overflow\" (B) floating-" "point exception is raised." msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:177 msgid "" "A floating result I if the result is too small to be represented " "in the result type. If an underflow occurs, a mathematical function " "typically returns 0.0 (C99 says a function shall return \"an implementation-" "defined value whose magnitude is no greater than the smallest normalized " "positive number in the specified type\"). I may be set to B, " "and an \"overflow\" (B) floating-point exception may be " "raised." msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:187 msgid "" "Some functions deliver a range error if the supplied argument value, or the " "correct function result, would be I. A subnormal value is one " "that is nonzero, but with a magnitude that is so small that it can't be " "presented in normalized form (i.e., with a 1 in the most significant bit of " "the significand). The representation of a subnormal number will contain one " "or more leading zeros in the significand." msgstr "" #. type: SH #: man-pages/man7/math_error.7:187 #, no-wrap msgid "NOTES" msgstr "" #. See CONFORMANCE in the glibc 2.8 (and earlier) source. #. type: Plain text #: man-pages/man7/math_error.7:209 msgid "" "The I identifier specified by C99 and POSIX.1-2001 is not " "supported by glibc. This identifier is supposed to indicate which of the " "two error-notification mechanisms (I, exceptions retrievable via " "B(3)) is in use. The standards require that at least one be " "in use, but permit both to be available. The current (version 2.8) " "situation under glibc is messy. Most (but not all) functions raise " "exceptions on errors. Some also set I. A few functions set " "I, but don't raise an exception. A very few functions do neither. " "See the individual manual pages for details." msgstr "" #. http://www.securecoding.cert.org/confluence/display/seccode/FLP32-C.+Prevent+or+detect+domain+and+range+errors+in+math+functions #. type: Plain text #: man-pages/man7/math_error.7:222 msgid "" "To avoid the complexities of using I and B(3) for " "error checking, it is often advised that one should instead check for bad " "argument values before each call. For example, the following code ensures " "that B(3)'s argument is not a NaN and is not zero (a pole error) or " "less than zero (a domain error):" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:226 #, no-wrap msgid "double x, r;\n" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:230 #, no-wrap msgid "" "if (isnan(x) || islessequal(x, 0)) {\n" " /* Deal with NaN / pole error / domain error */\n" "}\n" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:232 #, no-wrap msgid "r = log(x);\n" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:240 msgid "" "The discussion on this page does not apply to the complex mathematical " "functions (i.e., those declared by Icomplex.hE>), which in general " "are not required to return errors by C99 and POSIX.1-2001." msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:256 msgid "" "The B(1) I<-fno-math-errno> option causes the executable to employ " "implementations of some mathematical functions that are faster than the " "standard implementations, but do not set I on error. (The B(1) " "I<-ffast-math> option also enables I<-fno-math-errno>.) An error can still " "be tested for using B(3)." msgstr "" #. type: SH #: man-pages/man7/math_error.7:256 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:265 msgid "" "B(1), B(3), B(3), B(3), B(3), " "B(3), B(3), B(3)" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:267 msgid "I" msgstr "" #. type: SH #: man-pages/man7/math_error.7:267 #, no-wrap msgid "COLOPHON" msgstr "" #. type: Plain text #: man-pages/man7/math_error.7:275 msgid "" "This page is part of release 3.70 of the Linux I 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/" "." msgstr ""