Because it is implemented as antilog((1/3)*log(-4))
most likely using base 2 for the log/antilog functions. "Gregory Ryslik" <rsa...@comcast.net> wrote: >Hi, > >This might be me missing something painfully obvious but why does the >cube root of the following produce an NaN? > >> (-4)^(1/3) >[1] NaN >> > >As we can see: > >> (-1.587401)^3 >[1] -4 > >Thanks! > >Greg >______________________________________________ >R-help@r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.