blob: 60be0e65c26c1ba481f4b5bd0d19570c6bf89337 [file] [log] [blame]
<html lang=en>
<head>
<meta name="Generated by Rational Rose model" content="C:\Aurora_Oct20\RSM\eclipse\workspace-cascadeplus\org.eclipse.wst.rdb.models.dbdefinition\src\model\DatabaseDefinitionModel.mdl">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Description" content="4.4 Numbers A number is either an exact numeric value or an approximate numeric value. Any two numbers are comparable. A numeric type is described by a numeric type descriptor. A numeric type descriptor contains: - The name of the specific numeric type (NUMERIC , DECIMAL , SMALLINT , INTEGER , BIGINT , FLOAT , REAL , or DOUBLE PRECISION). - The precision of the numeric type. - The scale of the numeric type, if it is an exact numeric type. - An indication of whether the precision (and scale) are expressed in decimal or binary terms. An SQL-implementation is permitted to regard certain exact numeric type s as equivalent, if they have the same precision, scale, and radix, as permitted by the Syntax Rules of Subclause 6.1, data type . When two or more exact numeric type s are equivalent, the SQL-implementation chooses one of these equivalent exact numeric type s as the normal form representing that equivalence class of exact numeric type s. The normal form determines the name of the exact numeric type in the numeric type descriptor. Similarly, an SQL-implementation is permitted to regard certain approximate numeric type s as equivalent, as permitted the Syntax Rules of Subclause 6.1, data type , in which case the SQL-implementation chooses a normal form to represent each equivalence class of approximate numeric type and the normal form determines the name of the approximate numeric type. For every numeric type, the least value is less than zero and the greatest value is greater than zero. 4.4.1 Characteristics of numbers An exact numeric type has a precision P and a scale S. P is a positive integer that determines the number of significant digits in a particular radix R, where R is either 2 or 10. S is a non-negative integer. Every value of an exact numeric type of scale S is of the form n x 10-S, where n is an integer such that -RP = n RP. NOTE 13 - Not every value in that range is necessarily a value of the type in question. An approximate numeric value consists of a mantissa and an exponent. The mantissa is a signed numeric value, and the exponent is a signed integer that specifies the magnitude of the mantissa. An approximate numeric value has a precision. The precision is a positive integer that specifies the number of significant binary digits in the mantissa. The value of an approximate numeric value is the mantissa multiplied by a factor determined by the exponent. An approximate numeric literal ANL consists of an exact numeric literal (called the mantissa ), the letter 'E' or 'e', and a signed integer (called the exponent ). If M is the value of the mantissa and E is the value of the exponent , then M * 10E is the apparent value of ANL. The actual value of ANL is approximately the apparent value of ANL, according to implementation-defined rules. A number is assignable only to sites of numeric type. If an assignment of some number would result in a loss of its most significant digit, an exception condition is raised. If least significant digits are lost, implementationdefined rounding or truncating occurs, with no exception condition being raised. The rules for arithmetic are specified in Subclause 6.26, numeric value expression . Whenever an exact or approximate numeric value is assigned to an exact numeric value site, an approximation of its value that preserves leading significant digits after rounding or truncating is represented in the declared type of the target. The value is converted to have the precision and scale of the target. The choice of whether to truncate or round is implementation-defined. An approximation obtained by truncation of a numeric value N for an exact numeric type T is a value V in T such that N is not closer to zero than is V and there is no value in T between V and N. An approximation obtained by rounding of a numeric value N for an exact numeric type T is a value V in T such that the absolute value of the difference between N and the numeric value of V is not greater than half the absolute value of the difference between two successive numeric values in T. If there is more than one such value V, then it is implementation-defined which one is taken. All numeric values between the smallest and the largest value, inclusive, in a given exact numeric type have an approximation obtained by rounding or truncation for that type; it is implementation-defined which other numeric values have such approximations. An approximation obtained by truncation or rounding of a numeric value N for an approximate numeric type T is a value V in T such that there is no numeric value in T and distinct from that of V that lies between the numeric value of V and N, inclusive. If there is more than one such value V then it is implementation-defined which one is taken. It is implementationdefined which numeric values have approximations obtained by rounding or truncation for a given approximate numeric type. Whenever an exact or approximate numeric value is assigned to an approximate numeric value site, an approximation of its value is represented in the declared type of the target. The value is converted to have the precision of the target. Operations on numbers are performed according to the normal rules of arithmetic, within implementationdefined limits, except as provided for in Subclause 6.26, numeric value expression .">
<meta name="KeyWords" content="NumberTypes,Class Diagram NumberTypes,DatabaseDefinitionModel,model DatabaseDefinitionModel,">
<a href="../../../root.html" target=_top><IMG SRC="../../../webviewer/home.gif"BORDER=0></a>
</head>
<body bgcolor = "#FFFFFF">
<p><font FACE="Arial, Geneva" SIZE=3><b>Class&nbsp;Diagram:&nbsp;DataTypes&nbsp;/&nbsp;NumberTypes</b></font></p>
<MAP NAME="mymap">
<AREA Shape="Polygon" coords = "405,159,405,216,560,216,560,159" HREF="class3f2693990310.htm">
<AREA Shape="Polygon" coords = "112,510,112,550,294,550,294,510" HREF="class3f54f5e9003c.htm">
<AREA Shape="Polygon" coords = "377,33,377,90,588,90,588,33" HREF="class3edf9e550371.htm">
<AREA Shape="Polygon" coords = "480,158,480,90,487,90,487,158" HREF="inh3f2693f9022b.htm">
<AREA Shape="Polygon" coords = "248,367,248,425,424,425,424,367" HREF="class411aab3a02cb.htm">
<AREA Shape="Polygon" coords = "333,367,333,309,340,309,340,367" HREF="inh411aadfe0323.htm">
<AREA Shape="Polygon" coords = "593,395,593,435,816,435,816,395" HREF="class411aab530227.htm">
<AREA Shape="Polygon" coords = "698,395,698,309,705,309,705,395" HREF="inh411aaec70368.htm">
<AREA Shape="Polygon" coords = "382,513,382,553,515,553,515,513" HREF="class411aab6e00c7.htm">
<AREA Shape="Polygon" coords = "226,510,226,476,234,476,234,510" HREF="inh411aaed70389.htm">
<AREA Shape="Polygon" coords = "445,513,445,476,452,476,452,513" HREF="inh411aaedf018c.htm">
</MAP>
<IMG SRC="dgm3f26940b0307.png" USEMAP="#mymap" BORDER=0>
</body>
</html>