Hacker News new | ask | show | jobs
by sin7 1597 days ago
1*0 = 1 1*1 = 1 1*-1 = 1

2*0 = 1 2*1 = 2 2*-1 = 1/2

When 1 raised to any power equals 1, does the power matter at all? Even if it's unknown, the answer is 1.

1 comments

Good point. Although if NA were complex: 1^1+0i is 1+0i.
There are different NAs for different types of objects. And that's why you get:

    1^NA_complex_   # NA
But:

    1^NA_real_      # 1