From 1263658867260726317
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,9a5d91576ea14293
X-Google-Attributes: gid109fba,public
X-Google-Thread: f78e5,42ca30940288d269
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1992-03-07 06:56:39 PST
Xref: sparky comp.lang.c++:5632 comp.std.c++:281
Path: sparky!uunet!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!sobeco!philmtl!vedge!hendrik
From: hendrik@vedge.UUCP (Hendrik Boom)
Newsgroups: comp.lang.c++,comp.std.c++
Subject: Re: X to the Y power, how?
Message-ID: <28541@vedge.UUCP>
Date: 5 Mar 92 16:33:57 GMT
References: <50175@hydra.gatech.EDU> <1992Feb27.135250.25403@ux1.cso.uiuc.edu> <1992Feb27.223558.276@rice.edu> <22292@alice.att.com> <omci1INN8np@agate.berkeley.edu>
Reply-To: hendrik@vedge.UUCP (Hendrik Boom,,,)
Organization: Visual Edge Software, St. Laurent, PQ
Lines: 29

In article <omci1INN8np@agate.berkeley.edu> jbuck@forney.berkeley.edu (Joe Buck) writes:
. Group 2:
. long double operator@(long double,long int);
. long double operator@(long double,unsigned int);
. long double operator@(long double,int);
. double operator@(double,long int);
. double operator@(double,unsigned int);
. double operator@(double,int);
. float operator@(float,long int);
. float operator@(float,unsigned int);
. float operator@(float,int);
.

. is negative the result is undefined.  For group 2 (floating base
. raised to integral power), the first may be negative as long as
. the second argument is zero or positive.  If both arguments are
. negative the result is undefined.  For group 3, the result of a
. negative second argument is undefined.

You goofed on group 2; negative float to negative integer power is
perfectly well-defined, and even returns a float.
x * (- i) = 1/ ( x * i) as long as x is nonzero.

By the way, 0 @ 0 is usually defined to be 1 when the zeros are
integers; usually undefined when real or coimplex.
-- 
Try one or more of the following addresses to reply.
	hendrik@vedge.uucp
	iros1!vedge!hendrik


