Post Reply 
Coding Challenge for Vieta's Formulas
07-13-2018, 03:34 AM
Post: #2
RE: Coding Challenge for Vieta's Foummulas
.
Hi, Namir|

5:30 am here so just a couple quick observations:

(07-12-2018 11:15 PM)Namir Wrote:  F(X,a) = (LHS1 - RHS1)^2 + (LHS2 - RHS2)^2 + ... + (LHSn - RHSn)^2

Where:

LHS1 = sum(X(i)) for i = 1 to n
RHS1 = - a(n-1)/a(n)
....
LHSn = product(X(i)) for i = 1 to n
RHSn = (-1)^2 * a(0)/a(n)

1) without loss of generality you can consider a(n) to be 1. If it's not, simply divide all other coefficients by it before doing anything else.

2) there's a typo in your RHSn, (-1)^2 is obviously wrong.

Regards.
V.
.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Coding Challenge for Vieta's Foummulas - Valentin Albillo - 07-13-2018 03:34 AM



User(s) browsing this thread: 1 Guest(s)