Polynomial Math is a subset of mathematics dealing with mathematical expressions constructed from variables and constants using only the operations of addition, subtraction, multiplication, and non-negative integer exponents. Any polynomial math question should be programming related.
Questions tagged [polynomial-math]
630 questions
0
votes
4 answers
C++: Mathematical error when adding two polynomials
I'm in the process of writing a Polynomial Class and have overloaded the + operator. I asked a question a few days ago regarding the actual overloading process, and received a great answer. However, my question now is in regards to the actual…

Eric after dark
- 1,768
- 4
- 31
- 79
0
votes
1 answer
using singular value decomposition (svd) in quadratic regression
In order to do a quadratic regression on a rather large data set I would like to solve the following equation using svd(singular value decomposition):
B(nx1)=A(nx3)*X(3x1)
I am thinking to use matlab for that, any tips? the goal is to compute matrix…

C graphics
- 7,308
- 19
- 83
- 134
0
votes
1 answer
overload * operator to multiply 2 polynomials
I'm trying to write multiply 2 polynomials using overloading * operator
This is the overloading * func
Polynomial Polynomial::operator * (const Polynomial &right)
{
Polynomial temp;
temp.setPolynomial(right.maxExp + maxExp + 1);
for (int…

Casper
- 1,663
- 7
- 35
- 62
0
votes
2 answers
Estimate cubic polynomial that maps set x to set y
I have a (sampled) set of uncalibrated values (x) coming from a device and a set of what they should be (y). I'm looking to find/estimate the cubic polynomial y=ax^3 + bx^2 + cx + d that maps any x to y.
So I think what I need to do is Polynomial…

Meirion Hughes
- 24,994
- 12
- 71
- 122
0
votes
1 answer
Recursive FFT Error?
Given below is my java program for FFT. For the input {0,2,3,-1} its returns a false output in complex point representation.
import java.io.*;
public class test{
static double s[]={0,2,3,-1};
static double[][] re=new double[s.length][2];
static…

u2425
- 61
- 9
0
votes
1 answer
Polynomial with modular coefficients library in python
does someone knows a simple library to do
calculations on Polynomial with modular coefficients?
I've seen numpy, but this one seems like it does not support
modular coefficients...
Thanks,
Shai.

buc030
- 425
- 3
- 14
0
votes
2 answers
Color Interpolation
Okay, so I'm looking at a typical color chooser and it looks something like this:
If we deal with only highly saturated colors, the blending pattern behaves like this:
R 255
G 0
B 0
R 255
G 0 -> 255
B 0
R 255
G 255
B 0
R 255 ->…
Scott
0
votes
1 answer
Explaining the terms of a 2nd degree polynomial equation
This is a pretty basic question, but I have never thought about polynomials in this way before. I want to compare different polynomials of the form C0 + C1x + C2x^2 that I have generated from raw data. I am not a mathematician by degree, so I have…

user1871337
- 91
- 1
- 4
0
votes
1 answer
Polynominal multiplication with even #of coefs. in n distinct multiplications
Looking for some help with an upcoming exam, this is a question from the review. Seeing if someone could restate a) so I might be able to better understand what it is asking.
So it wants me to instead of using extra multiplications maybe obtain…
user1311286
0
votes
0 answers
Finding an error in code for divide and conquer polynomial multiplication
I'm trying to implement a simple divide and conquer algorithm for polynomial multiplication using Karatsuba's method, that is using that for p=a+b*x^k, q=c+d*x^k, with p*q=ac+(ad+bc)x^k+bd*x^(2k), ad+bc=ac+bd-(a-b)*(c-d) and recursively computing…

user35359
- 253
- 1
- 6
0
votes
1 answer
Java-Junit: multiplying 2 polynomial expressions
I am creating a method to multiply 2 polynomial expressions together such that:
3x^5 * 2x^3 = 6x^8 -> Where the coefficients are multiplied and the exponents are added together.
My test case for this would look something like the…

germainelol
- 3,231
- 15
- 46
- 82
0
votes
1 answer
Java - Negate a polynomial
I am trying to negate a polynomial expression so that the following tests are correct with my polynomial expressions being defined as Term(coefficient, exponent). So my public Term negate() throws Overflow method passes these tests.
Term(min,2) ->…

germainelol
- 3,231
- 15
- 46
- 82
0
votes
2 answers
Java / JUnit - AssertionError testing a pre-defined polynomial
I have a Term class to define a polynomial:
public class Term
{
final private int coef;
final private int expo;
private static Term zero, unit;
static
{
try
{
zero = new Term(0, 0); // the number…

germainelol
- 3,231
- 15
- 46
- 82
0
votes
2 answers
Laguerre interpolation algorithm, something's wrong with my implementation
This is a problem I have been struggling for a week, coming back just to give up after wasted hours...
I am supposed to find coefficents for the following Laguerre polynomial:
P0(x) = 1
P1(x) = 1 - x
Pn(x) = ((2n - 1 - x) / n) * P(n-1) - ((n - 1)…

Paweł Duda
- 1,713
- 4
- 18
- 36
0
votes
1 answer
THREE.JS calculate floor and ceil polygon
I have some dinamically created walls on the canvas, and I know the start end the end positions for every wall. The positions consist of the X and Z coordinate (y coordinate is constant, because the wall's height is predefined).
So, technically, I…

RobbeR
- 485
- 6
- 23