[ 
https://issues.apache.org/jira/browse/NUMBERS-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16443987#comment-16443987
 ] 

Eric Barnhill commented on NUMBERS-65:
--------------------------------------

I understand the polar notation of Complex.nthRoot perfectly clearly.

I'm embarassed to say, the trig identities behind RootsOfUnity are lost in the 
mists of time for me.

I popped over to Rosetta Code, every approach I saw there uses a 
polar-coordinate type of approach (e.g. 
[https://rosettacode.org/wiki/Roots_of_unity#Java] ). I think this is the one 
to use. I agree it should be expanded to handle a negative integer as going the 
other direction.

> "RootsOfUnity" vs "nthRoot"
> ---------------------------
>
>                 Key: NUMBERS-65
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-65
>             Project: Commons Numbers
>          Issue Type: Task
>          Components: complex
>            Reporter: Gilles
>            Priority: Major
>              Labels: API, delete, gsoc2018
>             Fix For: 1.0
>
>
> There is partial overlap of functionality between class {{RootsOfUnity}} and 
> method {{nthRoot}} (in class {{Complex}}).
> The latter is more general (any complex number) but the former allows a 
> negative argument (to specify clockwise ordering).
> Also, the implementations are different; it should be checked which is more 
> accurate (and then account for possible performance trade-offs).
> API-wise, I think that we should keep {{nthRoot}} (and delete 
> {{RootsOfUnity}}).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to