Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8847793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:16:33+00:00 2026-06-14T12:16:33+00:00

A while ago I implemented a Polynom approximation for a game I programmed. I

  • 0

A while ago I implemented a Polynom approximation for a game I programmed.

I am using Newton’s pyramide method.
It took me quite a while to figure it out, but my solution requires to calculate the binomial coefficients and I also have to sum up all the coefficients for the final coefficient of each power (since solving this problem is similar to squaring, cubing.. terms and calculating the binomial coefficients)

For example:
pick k out of n of the bionomeal terms and add them
one pick is multiplied
a*(x+b)(x+c)(x+d) ==> a*x^3 + a*x^2*(b+c+d) + a*x(bc+bd+cd) +a*b*c*d
so b*c*d would be one pick b*c and b*d too

My question now is:
Is there a way calculating the Polynominterpolation with the newton scheme without having to calculate all the bionomial coefficients?

My code:
https://github.com/superphil0/Polynominterpolation/blob/master/PolynomInterpolation.java

It works pretty good, although if one gives too many points it will be rather slow
because of the selection of terms which have all be summed up

(I am really bad at explaining this in english, I hope someone can understand what I want to know though)

cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:16:34+00:00Added an answer on June 14, 2026 at 12:16 pm

    Judging from this description, I take it that your “pyramid scheme” generates coefficients ci such that the polynomial p(x) can be written as
    p(x) =
    c0 + (x ‒ x0)(
    c1 + (x ‒ x1)(
    c2 + (x ‒ x2)(
    c3 + (x ‒ x3)(
    … (
    cn-1 + (x ‒ xn‒1)
    cn ) … ))))

    Now you can compute canonical coefficients recursively from the back. Start with
    pn = cn

    In every step, the current polynomial can be written as
    pk =
    ck + (x ‒ xk)pk+1 =
    ck + (x ‒ xk)(b0 +
    b1x + b2x2 + …)
    assuming that the next smaller polynomial has already been turned into canonical coefficients.

    Now you can compute the coefficients ai of pk using those coefficients bi of pk+1. In a strict formal way, I’d have to use indices instead of a and b, but I believe that it’s clearer this way. So what are the canonical coefficients of the next polynomial?

    • a0 = ck − xkb0
    • a1 = b0 − xkb1
    • a2 = b1 − xkb2
    • …

    You can write this in a loop, using and reusing a single array a to hold the coefficients:

    double[] a = new double[n + 1]; // initialized to zeros
    for (int k = n; k >= 0; --k) {
        for (int i = n - k; i > 0; --i)
            a[i] = a[i - 1] - x[k]*a[i];
        a[0] = c[k] - x[k]*a[0];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed that when using something like XNA/C# (game engine) a while ago that
A while ago I wrote an app that relied on XML coming out of
i've started unit testing a while ago and as turned out i did more
My base ViewModel, implemented a couple years ago, provides this extension method for running
I implemented an HTTP Post from my Android application to Wampserver a while ago,
Update I asked this question quite a while ago now, and I was curious
I implemented a C++ equivalent of Python's chain function a while ago thanks to
A while ago I asked myself, when I write something like this: char* first(int
A while ago, i posted a question about a parent div not reacting to
A while ago I did this to ignore changes to a file tracked by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.