At 4:10 PM -0400 6/15/01, Tim Endres wrote:
>I accidentally clipped off the beginning of the section that I posted,
>so here is the complete section.
>tim.
Thanks.
Okay, so it's nice and detailed, and pedantic to boot.
What do you conclude from it, in relationship to the
current discussion? Looks like a lotta "implementation-
defined" in there.
>
>------------------
>
>4.4 Numbers
>
> A number is either an exact numeric value or an approximate numeric
> value. Any two numbers are mutually comparable to each other.
>
> A numeric data type is described by a numeric data type descriptor.
> A numeric data type descriptor contains:
>
> - the name of the specific numeric data type (NUMERIC, DECIMAL,
> INTEGER, SMALLINT, FLOAT, REAL, or DOUBLE PRECISION);
>
> - the precision of the numeric data type;
>
> - the scale of the numeric data type, if it is an exact numeric
> data type; and
>
> - an indication of whether the precision (and scale) are expressed
> in decimal or binary terms.
>
> 4.4.1 Characteristics of numbers
>
> An exact numeric value has a precision and a scale. The precision
> is a positive integer that determines the number of significant
> digits in a particular radix (binary or decimal). The scale is a
> non-negative integer. A scale of 0 indicates that the number is an
> integer. For a scale of S, the exact numeric value is the integer
> value of the significant digits multiplied by 10-S.
>
> An approximate numeric value consists of a mantissa and an expo-
> nent. 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 posi-
> tive integer that specifies the number of significant binary digits
> in the mantissa. The value of an approximate numeric value is the
> mantissa multiplied by 10exponent.
>
> Whenever an exact or approximate numeric value is assigned to a
> data item or parameter representing an exact numeric value, an
> approximation of its value that preserves leading significant dig-
> its after rounding or truncating is represented in the data 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 numerical value N
> for an <exact numeric type> T is a value V representable in T such
> that N is not closer to zero than the numerical value of V and such
> that the absolute value of the difference between N and the numer-
> ical value of V is less than the absolute value of the difference
> between two successive numerical values representable in T.
>
> An approximation obtained by rounding of a numerical value N for
> an <exact numeric type> T is a value V representable in T such
> that the absolute value of the difference between N and the nu-
> merical value of V is not greater than half the absolute value
> of the difference between two successive numerical values repre-
> sentable in T. If there are more than one such values V, then it is
> implementation-defined which one is taken.
>
> All numerical values between the smallest and the largest value,
> inclusive, representable in a given exact numeric type have an
> approximation obtained by rounding or truncation for that type; it
> is implementation-defined which other numerical values have such
> approximations.
>
> An approximation obtained by truncation or rounding of a numerical
> value N for an <approximate numeric type> T is a value V repre-
> sentable in T such that there is no numerical value representable
> in T and distinct from that of V that lies between the numerical
> value of V and N, inclusive.
>
> If there are more than one such values V then it is implementation-
> defined which one is taken. It is implementation-defined which
> numerical values have approximations obtained by rounding or trun-
> cation for a given approximate numeric type.
>
> Whenever an exact or approximate numeric value is assigned to a
> data item or parameter representing an approximate numeric value,
> an approximation of its value is represented in the data 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 implementation-defined limits, except as
> provided for in Subclause 6.12, "<numeric value expression>".
>
> 4.4.2 Operations involving numbers
>
> As well as the usual arithmetic operators, plus, minus, times,
> divide, unary plus, and unary minus, there are the following func-
> tions that return numbers:
>
> - <position expression> (see Subclause 4.2.2, "Operations involv-
> ing character strings", and Subclause 4.3.2, "Operations involv-
> ing bit strings") takes two strings as arguments and returns an
> integer;
>
> - <length expression> (see Subclause 4.2.2, "Operations involving
> character strings", and Subclause 4.3.2, "Operations involv-
> ing bit strings") operates on a string argument and returns an
> integer;
>
> - <extract expression> (see Subclause 4.5.3, "Operations involving
> datetimes and intervals") operates on a datetime or interval
> argument and returns an integer.
>
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail win32-thread6498@stripped
>
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail win32-unsubscribe@stripped instead.
--
Paul DuBois, paul@stripped