Weird exponent behavior in R 4.1.2?

Viewed 37

I'm finding a very weird issue that I can't figure out if it is a Bug or a Feature:

c(-1333.47,-1333.47)^0.41
[1] NaN NaN

When the behavior should be:

c(-1333.47^0.41,-1333.47^0.41)
[1] -19.10923 -19.10923

Am I missing something here? Is this documented somewhere?

0 Answers
Related