Re: 1364 issue 140 and negative exponents

From: Kurt Baty (kurt@wsfdb.wsfdb.com)
Date: Mon May 05 2003 - 13:12:02 PDT

  • Next message: Dennis Marsa: "Re: 1364 issue 140 and negative exponents"

    Precedence: bulk

    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?

            kurt



    This archive was generated by hypermail 2.1.4 : Mon May 05 2003 - 13:20:13 PDT and
    sponsored by Boyd Technology, Inc.