pow( -INFINITY, 0.5 )

Doug Gwyn (ACISD/MCSB) uunet!BRL.MIL!gwyn
Mon Aug 30 09:28:50 PDT 1993


Unfortunately, pow(x,0.5) isn't an identical function to sqrt(x) for
a couple of reasons.  Theoretically the representation of 0.5 could
have the value 1/2 + epsilon for some near-zero but non-zero epsilon,
in which case pow(.,0.5) has qualitatively different behavior from
sqrt(.); this distinction is particularly evident in the complex
field where sqrt(.) has two "sheets" but pow(.,epslion+1/2) may have
a zillion sheets.  In the real field, pow(x,y) means essentially
exp(log(x)*y), and it's clear that errors can accrue that make this
not the same function as sqrt(.) when y=0.5 even if 0.5 IS represented
exactly.  Therefore I don't think that sqrt() is necessarily a good
model for the behavior of pow(), with regard to special/error cases.
sqrt() is too well-behaved by comparison with pow().



More information about the Numeric-interest mailing list