Here is the problem:-Click Here.
.I have been trying it for more time but not getting how to solve the polynomial equation after converting from base 'b' to decimal i.e. my algorithm is:-
size of array = max(A.size(),B.size(),Z.size());
store A in array as int;
add B as int element by element;
subtract Z as int element by element;
now we get cofficients of a polynomial in b i.e x1b^n + x2b^(n-1) + ...... + xn*b^0 = 0;
How to solve it or is there any other method for it??
Thanks in advance.
vikrantiitr
0
Newbie Poster
Recommended Answers
Jump to PostHow do you take the string of characters '1','2','0' and turn them into the integer 120?
By the way 120 can be of any base from 3 to inf.
Yes it could. Ignore that for the moment.
Jump to PostBy the way 120 can be of any base from 3 to inf.
Thats exactly what hes getting at. If you want to convert A2C3 you have to say what base it is in because this could be anything from base 13 to infinity the way you see …
Jump to PostActually the code post is exactly what you wanted for the whole conversion from one base to another. This is just set to hex, if you want to it be general then replace all the 16s with a variable and expand the alphabet to Z.
You can write a check …
All 12 Replies
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
vikrantiitr
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
vikrantiitr
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
sfuo
111
Practically a Master Poster
vikrantiitr
0
Newbie Poster
sfuo
111
Practically a Master Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
vikrantiitr
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
vikrantiitr
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.