![]() |
integer number to polynomial
how can i convert an integer number to a polynomial? (i'm using c++)
|
Neglecting the language, do you know how to convert an integer to a polynomial, otherwise? If not, the language is of no consequence.
|
How would one convert an integer to a polynomial anyway? An integer is just a number, a polynomial is a multi-termed expression, or am I wrong?
|
You are correct.
|
x^2 + 3*x - 7 = ???
there are limitless possibilities |
42, obviously... (x ~= 5.65)
|
well you can integrate integers in to polynomials.
for example, let say you have two integers (3 and 4). polynomial would be. int result = (3 * x) + (4 *y); now you might want to obviously define those variables if you want to. But since polynomials are there mathematically to solve for a variable, you might want to solve for one of those two x and y variables, if you already have a value of one those two (in terms of algebra). will be able to code it. might have to actually recognize those as a string or char arrays to fiddle around like soliving algebraic problems. char and integer or string and integer conversions could be used as well, I'm sure there are many other ways too. |
Quote:
Quote:
BRACCCCCCCCKKKKKKKKKKKKKKK!!!!!!!!!!! Bad answer, bad answer!!! |
Let me take a dig at that...
An integer can be represented as a polynomial. Just put an X^0 next to it. |
Quote:
Given that X=1: x^2 = X x^2-1 = X - 1 (X-1)(X+1) = (X-1) X+1 = 1 2 = 1 :p Found this on a site, found it quite intresting. |
| All times are GMT -5. The time now is 5:10 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC