Talk:Polynomial synthetic division: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Dup?: new section)
 
(→‎Dup?: seems so)
Line 8: Line 8:


Anyways, I think maybe the best approach here would be to merge useful content onto the other page and create a #redirect link so that either page title will get to the content. Does that seem reasonable? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 23:16, 5 June 2015 (UTC)
Anyways, I think maybe the best approach here would be to merge useful content onto the other page and create a #redirect link so that either page title will get to the content. Does that seem reasonable? --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 23:16, 5 June 2015 (UTC)

: Task itself shouldn't need to specify how a polynomial is represented, since growing power in either direction could make sense, so we could just let the code providing the interface choose. I personally would prefer zero-th term in the front because it would make infinite power series possible, but that clearly is not the intended goal here. The real issue is, long division and synthetic division may look different with pen and paper, there doesn't seem to be a meaningful difference in terms of math or computer implementation: one subtracts, the other inverts and adds, that's about it. I agree that this looks like a dup. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 03:12, 6 June 2015 (UTC)

Revision as of 03:12, 6 June 2015

Dup?

I think this task is a duplicate of Polynomial long division

That said, when I use an implementation from that page to divide 1, -12, 0, -42 by 1, -3 I get a result of 2.44444, -4.66667, -14 and a remainder of -1.44444 (or quite similar numbers expressed as fractions with 9 in the denominator if I ask for exact results). This is because that implementation places the constant on the left hand side and powers increase to the right. If I reverse the representation of the polynomials I get an answer similar to that of the current python example here.

But that just illustrates that the task is also underspecified (since the task description says nothing about this issue - though it's true that if I follow the seventh link in the current version of the proposed task page I do find a representation where the constant coefficient is rightmost and powers increase to the left).

Anyways, I think maybe the best approach here would be to merge useful content onto the other page and create a #redirect link so that either page title will get to the content. Does that seem reasonable? --Rdm (talk) 23:16, 5 June 2015 (UTC)

Task itself shouldn't need to specify how a polynomial is represented, since growing power in either direction could make sense, so we could just let the code providing the interface choose. I personally would prefer zero-th term in the front because it would make infinite power series possible, but that clearly is not the intended goal here. The real issue is, long division and synthetic division may look different with pen and paper, there doesn't seem to be a meaningful difference in terms of math or computer implementation: one subtracts, the other inverts and adds, that's about it. I agree that this looks like a dup. --Ledrug (talk) 03:12, 6 June 2015 (UTC)