Re: errata/140: negative exponents

From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Thu May 08 2003 - 02:40:02 PDT

  • Next message: Shalom Bresticker: "Re: errata/190: PROPOSAL - 9.5.1: Extra zero in Example 1"

    Precedence: bulk

    The following reply was made to PR errata/140; it has been noted by GNATS.

    From: Shalom Bresticker <Shalom.Bresticker@motorola.com>
    To: Kurt Baty <kurt@wsfdb.wsfdb.com>
    Cc: etf-bugs@boyd.com
    Subject: Re: errata/140: negative exponents
    Date: Thu, 08 May 2003 12:38:23 +0300

     This is a multi-part message in MIME format.
     --------------480D76C05C8459E635332507
     Content-Type: text/plain; charset=us-ascii
     Content-Transfer-Encoding: 7bit
     
     Kurt,
     
     I ran your code through VCS 6.2 and got the attached results.
     
     Shalom
     
     
    > x ** y where x, y are integers:
    >
    > x is positive zero negative
    > ---------------------------------------------------
    > y is
    >
    > positive x ** y 0 x ** y
    >
    > zero 1 0 1
    >
    > negative x = 1 -> 1 0 x = -1 and
    > x = 2 and y is odd -> -1
    > y = -1 -> 1 x = -1 and
    > else 0 y is even -> 1
    > x = -2 and
    > y = -1 -> -1
    > else 0
    >
    > maybe someone could run the same thing in C,
    > and maybe VCS also?
     
     --
     Shalom Bresticker Shalom.Bresticker@motorola.com
     Design & Reuse Methodology Tel: +972 9 9522268
     Motorola Semiconductor Israel, Ltd. Fax: +972 9 9522890
     POB 2208, Herzlia 46120, ISRAEL Cell: +972 50 441478
     
     
     
     --------------480D76C05C8459E635332507
     Content-Type: text/plain; charset=us-ascii;
      name="vcs.log"
     Content-Transfer-Encoding: 7bit
     Content-Disposition: inline;
      filename="vcs.log"
     
     Chronologic VCS simulator copyright 1991-2002
     Contains Synopsys proprietary information.
     Compiler version 6.2R10; Runtime version 6.2R10; May 8 12:29 2003
     
     x = 1 = x_real =0.5
     
     4 ** 4 = 256 = 256
     3 ** 4 = 81 = 81
     2 ** 4 = 16 = 16
     1 ** 4 = 1 = 1
     0 ** 4 = 0 = 0
     -1 ** 4 = 1 = 1
     -2 ** 4 = 16 = 16
     -3 ** 4 = 81 = 81
     -4 ** 4 = 256 = 256
     4 ** 3 = 64 = 64
     3 ** 3 = 27 = 27
     2 ** 3 = 8 = 8
     1 ** 3 = 1 = 1
     0 ** 3 = 0 = 0
     -1 ** 3 = -1 = -1
     -2 ** 3 = -8 = -8
     -3 ** 3 = -27 = -27
     -4 ** 3 = -64 = -64
     4 ** 2 = 16 = 16
     3 ** 2 = 9 = 9
     2 ** 2 = 4 = 4
     1 ** 2 = 1 = 1
     0 ** 2 = 0 = 0
     -1 ** 2 = 1 = 1
     -2 ** 2 = 4 = 4
     -3 ** 2 = 9 = 9
     -4 ** 2 = 16 = 16
     4 ** 1 = 4 = 4
     3 ** 1 = 3 = 3
     2 ** 1 = 2 = 2
     1 ** 1 = 1 = 1
     0 ** 1 = 0 = 0
     -1 ** 1 = -1 = -1
     -2 ** 1 = -2 = -2
     -3 ** 1 = -3 = -3
     -4 ** 1 = -4 = -4
     4 ** 0 = 1 = 1
     3 ** 0 = 1 = 1
     2 ** 0 = 1 = 1
     1 ** 0 = 1 = 1
     0 ** 0 = 0 = 0
     -1 ** 0 = 1 = 1
     -2 ** 0 = 1 = 1
     -3 ** 0 = 1 = 1
     -4 ** 0 = 1 = 1
     4 ** -1 = 0 = Inf
     3 ** -1 = 0 = Inf
     2 ** -1 = 0 = Inf
     1 ** -1 = 1 = 1
     0 ** -1 = 0 = 0
     -1 ** -1 = 0 = NaN
     -2 ** -1 = 0 = NaN
     -3 ** -1 = 0 = NaN
     -4 ** -1 = 0 = NaN
     4 ** -2 = 0 = Inf
     3 ** -2 = 0 = Inf
     2 ** -2 = 0 = Inf
     1 ** -2 = 1 = 1
     0 ** -2 = 0 = 0
     -1 ** -2 = 0 = NaN
     -2 ** -2 = 0 = NaN
     -3 ** -2 = 0 = NaN
     -4 ** -2 = 0 = NaN
     4 ** -3 = 0 = Inf
     3 ** -3 = 0 = Inf
     2 ** -3 = 0 = Inf
     1 ** -3 = 1 = 1
     0 ** -3 = 0 = 0
     -1 ** -3 = 0 = NaN
     -2 ** -3 = 0 = NaN
     -3 ** -3 = 0 = NaN
     -4 ** -3 = 0 = NaN
     4 ** -4 = 0 = Inf
     3 ** -4 = 0 = Inf
     2 ** -4 = 0 = Inf
     1 ** -4 = 1 = 1
     0 ** -4 = 0 = 0
     -1 ** -4 = 0 = NaN
     -2 ** -4 = 0 = NaN
     -3 ** -4 = 0 = NaN
     -4 ** -4 = 0 = NaN
                V C S S i m u l a t i o n R e p o r t
     Time: 0
     CPU Time: 0.040 seconds; Data structure size: 0.0Mb
     Thu May 8 12:29:43 2003
     
     --------------480D76C05C8459E635332507--
     



    This archive was generated by hypermail 2.1.4 : Thu May 08 2003 - 02:41:07 PDT and
    sponsored by Boyd Technology, Inc.