Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8DE03EA13 for ; Mon, 25 Feb 2013 15:32:31 +0000 (UTC) Received: (qmail 29786 invoked by uid 500); 25 Feb 2013 15:32:31 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 29640 invoked by uid 500); 25 Feb 2013 15:32:27 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 29622 invoked by uid 99); 25 Feb 2013 15:32:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 15:32:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 15:32:22 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 479D823888E7; Mon, 25 Feb 2013 15:32:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1449749 - in /db/derby/docs/trunk/src/ref: rreffuncasin.dita rreffuncatan.dita rrefnumericlimits.dita rrefsqlj14122.dita rrefsqlj20204.dita rrefsqljdoubleprecision.dita Date: Mon, 25 Feb 2013 15:32:01 -0000 To: derby-commits@db.apache.org From: chaase3@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130225153202.479D823888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: chaase3 Date: Mon Feb 25 15:32:01 2013 New Revision: 1449749 URL: http://svn.apache.org/r1449749 Log: DERBY-6083 Update minimum/maximum floating-point values to align with DERBY-3398 fixes Modified 6 Reference Manual topics. Patch: DERBY-6083-2.diff Modified: db/derby/docs/trunk/src/ref/rreffuncasin.dita db/derby/docs/trunk/src/ref/rreffuncatan.dita db/derby/docs/trunk/src/ref/rrefnumericlimits.dita db/derby/docs/trunk/src/ref/rrefsqlj14122.dita db/derby/docs/trunk/src/ref/rrefsqlj20204.dita db/derby/docs/trunk/src/ref/rrefsqljdoubleprecision.dita Modified: db/derby/docs/trunk/src/ref/rreffuncasin.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rreffuncasin.dita?rev=1449749&r1=1449748&r2=1449749&view=diff ============================================================================== --- db/derby/docs/trunk/src/ref/rreffuncasin.dita (original) +++ db/derby/docs/trunk/src/ref/rreffuncasin.dita Mon Feb 25 15:32:01 2013 @@ -30,8 +30,7 @@ limitations under the License. you want. The specified number must be a DOUBLE PRECISION number.
  • If the specified number is NULL, the result of this function is NULL.
  • -
  • If the specified number is zero (0), the result of this function is zero -with the same sign as the specified number.
  • +
  • If the specified number is zero (0), the result of this function is zero.
  • If the absolute value of the specified number is greater than 1, an exception is returned that indicates that the value is out of range (SQL state 22003).

The returned value, in radians, is in the range -pi/2 Modified: db/derby/docs/trunk/src/ref/rreffuncatan.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rreffuncatan.dita?rev=1449749&r1=1449748&r2=1449749&view=diff ============================================================================== --- db/derby/docs/trunk/src/ref/rreffuncatan.dita (original) +++ db/derby/docs/trunk/src/ref/rreffuncatan.dita Mon Feb 25 15:32:01 2013 @@ -30,8 +30,7 @@ limitations under the License. that you want. The specified number must be a DOUBLE PRECISION number.

  • If the specified number is NULL, the result of this function is NULL.
  • -
  • If the specified number is zero (0), the result of this function is zero -with the same sign as the specified number.
  • +
  • If the specified number is zero (0), the result of this function is zero.

The returned value, in radians, is in the range -pi/2 to pi/2. The data type of the returned value is a DOUBLE PRECISION number.

Modified: db/derby/docs/trunk/src/ref/rrefnumericlimits.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefnumericlimits.dita?rev=1449749&r1=1449748&r2=1449749&view=diff ============================================================================== --- db/derby/docs/trunk/src/ref/rrefnumericlimits.dita (original) +++ db/derby/docs/trunk/src/ref/rrefnumericlimits.dita Mon Feb 25 15:32:01 2013 @@ -42,27 +42,27 @@ limitations under the License. -Smallest INTEGER +Largest negative INTEGER -2,147,483,648 -Largest INTEGER +Largest positive INTEGER 2,147,483,647 -Smallest BIGINT +Largest negative BIGINT -9,223,372,036,854,775,808 -Largest BIGINT +Largest positive BIGINT 9,223,372,036,854,775,807 -Smallest SMALLINT +Largest negative SMALLINT -32,768 -Largest SMALLINT +Largest positive SMALLINT 32,767 @@ -70,36 +70,52 @@ limitations under the License. 31 -Smallest DOUBLE --1.79769E+308 +Largest negative DOUBLE +-1.7976931348623157E+308 -Largest DOUBLE -1.79769E+308 +Largest positive DOUBLE +1.7976931348623157E+308 -Smallest positive DOUBLE -2.225E-307 +Smallest negative normalized DOUBLE +-2.2250738585072014E-308 -Largest negative DOUBLE --2.225E-307 +Smallest positive normalized DOUBLE +2.2250738585072014E-308 + + +Smallest negative denormalized DOUBLE +-4.9E-324 -Smallest REAL --3.402E+38 +Smallest positive denormalized DOUBLE +4.9E-324 -Largest REAL -3.402E+38 +Largest negative REAL +-3.4028235E+38 -Smallest positive REAL -1.175E-37 +Largest positive REAL +3.4028235E+38 -Largest negative REAL --1.175E-37 +Smallest negative normalized REAL +-1.17549435E-38 + + +Smallest positive normalized REAL +1.17549435E-38 + + +Smallest negative denormalized REAL +-1.4E-45 + + +Smallest positive denormalized REAL +1.4E-45 Modified: db/derby/docs/trunk/src/ref/rrefsqlj14122.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj14122.dita?rev=1449749&r1=1449748&r2=1449749&view=diff ============================================================================== --- db/derby/docs/trunk/src/ref/rrefsqlj14122.dita (original) +++ db/derby/docs/trunk/src/ref/rrefsqlj14122.dita Mon Feb 25 15:32:01 2013 @@ -30,16 +30,26 @@ IEEE floating-point notation.

Corresponding compile-time Java type

java.lang.Float

JDBC metadata type (java.sql.Types)

REAL

Limitations

REAL value ranges:

    -
  • Smallest REAL value: -3.402E+38
  • -
  • Largest REAL value: 3.402E+38
  • -
  • Smallest positive REAL value: 1.175E-37
  • -
  • Largest negative REAL value: -1.175E-37
  • -

These limits are different from the java.lang.Float Java +

  • Largest negative REAL value: -3.4028235E+38
  • +
  • Largest positive REAL value: 3.4028235E+38
  • +
  • Smallest negative normalized REAL value: -1.17549435E-38
  • +
  • Smallest positive normalized REAL value: 1.17549435E-38
  • +
  • Smallest negative denormalized REAL value: -1.4E-45
  • +
  • Smallest positive denormalized REAL value: 1.4E-45
  • +

    These limits are the same as the java.lang.Float Java type limits.

    An exception is thrown when any double value is calculated or entered that is outside of these value ranges. Arithmetic operations do not round their resulting values to zero. If the values are too small, you will receive an exception. The arithmetic operations take place with double -arithmetic in order to detect under flows.

    Numeric floating point constants +arithmetic in order to detect underflows.

    +

    normalizes -0.0 to +positive 0.0.

    +

    throws an exception +if an operation calculates or tries to store a value of NaN, positive infinity, +or negative infinity, as defined by the IEEE 754 Standard for Binary +Floating-Point Arithmetic and as represented with named constants in the +Java programming language (for example, Double.NaN).

    +

    Numeric floating-point constants are limited to a length of 30 characters. -- this example will fail because the constant is too long: values 01234567890123456789012345678901e0;

    When mixed with other data types in expressions, the resulting data type follows Modified: db/derby/docs/trunk/src/ref/rrefsqlj20204.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqlj20204.dita?rev=1449749&r1=1449748&r2=1449749&view=diff ============================================================================== --- db/derby/docs/trunk/src/ref/rrefsqlj20204.dita (original) +++ db/derby/docs/trunk/src/ref/rrefsqlj20204.dita Mon Feb 25 15:32:01 2013 @@ -24,31 +24,33 @@ data type

    An attempt to put a floating-point type of a larger storage size into a location of a smaller size fails only if the value cannot be stored -in the smaller-size location. For example: create table mytable (r REAL, d DOUBLE PRECISION); +in the smaller-size location. For example: +create table mytable (r REAL, d DOUBLE PRECISION, i INTEGER, de DECIMAL); 0 rows inserted/updated/deleted INSERT INTO mytable (r, d) values (3.4028236E38, 3.4028235E38); -ERROR X0X41: The number '3.4028236E38' is outside the range for -the data type REAL.

    +ERROR 22003: The resulting value is outside the range for the +data type REAL.

    You can store a floating point type in an INTEGER column; the -fractional part of the number is truncated. For example: INSERT INTO mytable(integer_column) values (1.09e0); +fractional part of the number is truncated. For example: +INSERT INTO mytable (i) VALUES (1.09e0); 1 row inserted/updated/deleted -SELECT integer_column -FROM mytable; +SELECT i FROM mytable; I --------------- -1

    +1

    Integer types can always be placed successfully in approximate numeric values, although with the possible loss of some precision.

    Integers can be stored in decimals if the DECIMAL precision is -large enough for the value. For example: ij> insert into mytable (decimal_column) -VALUES (55555555556666666666); -ERROR X0Y21: The number '55555555556666666666' is outside the -range of the target DECIMAL/NUMERIC(5,2) datatype.

    +large enough for the value. For example: +INSERT INTO mytable (de) VALUES (55555555556666666666); +ERROR 22003: The resulting value is outside the range for the +data type DECIMAL/NUMERIC(5,2).

    An attempt to put an integer value of a larger storage size into a location of a smaller size fails if the value cannot be stored in the smaller-size -location. For example: INSERT INTO mytable (int_column) values 2147483648; +location. For example: +INSERT INTO mytable (i) VALUES 2147483648; ERROR 22003: The resulting value is outside the range for the -data type INTEGER.

    +data type INTEGER.

    When truncating trailing digits from a NUMERIC value, rounds down.
    Modified: db/derby/docs/trunk/src/ref/rrefsqljdoubleprecision.dita URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/src/ref/rrefsqljdoubleprecision.dita?rev=1449749&r1=1449748&r2=1449749&view=diff ============================================================================== --- db/derby/docs/trunk/src/ref/rrefsqljdoubleprecision.dita (original) +++ db/derby/docs/trunk/src/ref/rrefsqljdoubleprecision.dita Mon Feb 25 15:32:01 2013 @@ -30,15 +30,25 @@ using IEEE floating-point notation.

    alternately

    DOUBLE

    DOUBLE can be used synonymously with DOUBLE PRECISION.

    Limitations

    DOUBLE value ranges:

      -
    • Smallest DOUBLE value: -1.79769E+308
    • -
    • Largest DOUBLE value: 1.79769E+308
    • -
    • Smallest positive DOUBLE value: 2.225E-307
    • -
    • Largest negative DOUBLE value: -2.225E-307
    • -

    These limits are different from the java.lang.DoubleJava +

  • Largest negative DOUBLE value: -1.7976931348623157E+308
  • +
  • Largest positive DOUBLE value: 1.7976931348623157E+308
  • +
  • Smallest negative normalized DOUBLE value: -2.2250738585072014E-308
  • +
  • Smallest positive normalized DOUBLE value: 2.2250738585072014E-308
  • +
  • Smallest negative denormalized DOUBLE value: -4.9E-324
  • +
  • Smallest positive denormalized DOUBLE value: 4.9E-324
  • +

    These limits are the same as the java.lang.Double Java type limits.

    An exception is thrown when any double value is calculated or entered that is outside of these value ranges. Arithmetic operations do not round their resulting values to zero. If the values are too small, -you will receive an exception.

    Numeric floating point constants are +you will receive an exception.

    +

    normalizes -0.0 to +positive 0.0.

    +

    throws an exception +if an operation calculates or tries to store a value of NaN, positive infinity, +or negative infinity, as defined by the IEEE 754 Standard for Binary +Floating-Point Arithmetic and as represented with named constants in the +Java programming language (for example, Double.NaN).

    +

    Numeric floating-point constants are limited to a length of 30 characters. -- this example will fail because the constant is too long: values 01234567890123456789012345678901e0;

    Corresponding compile-time Java type

    java.lang.Double