logoalt Hacker News

ttoinoutoday at 7:12 AM3 repliesview on HN

Even better : did you know (-1)^x draws the unit circle in the complex plane ? No need for complex exp and i*pi


Replies

WCSTombstoday at 9:47 AM

You do in fact need the complex exponential to define this correctly because the function a^x for nonintegers x is only unambiguously defined when a is a positive real number. For example, your function could be either e^(pi i x) or e^(-pi i x), which trace the circle in opposite directions as x varies over the reals. (They happen to agree when x is an integer.)

sreantoday at 7:17 AM

That's because

   a^b = exp (b ln  a)
That's equivalent to saying, no need for -1 because we have exp.

One can change based of the exponentiation operation. Exp happens to be a convenient base.

fphtoday at 8:14 AM

If you plot it over which domain?

show 1 reply