Factoring Polynomials in C++

This is a discussion on Factoring Polynomials in C++ within the C++ Programming forums, part of the General Programming Boards category; I am attempting to write a program that factors polynomials, but I am in a bit of a jam on ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    3

    Factoring Polynomials in C++

    I am attempting to write a program that factors polynomials, but I am in a bit of a jam on how to do it. So far I have developed some steps, but those are just for binomials, anyways, here is what I have so far.
    ------------------------------------------------------
    Step 1: Check for common monomial factors

    Step 2:Check for Difference of Squares

    Step 3: Check for 3 terms

    Step 4: Check for Perfect Binomial Square
    ------------------------------------------------------
    Thank you very much.

  2. #2
    Registered User moonwalker's Avatar
    Join Date
    Jul 2002
    Posts
    282
    Try synthetic division... i would do it that way (althought it may be a pain to code it that way)

    http://www.purplemath.com/modules/synthdiv.htm


    http://www.google.com/search?hl=en&i...hetic+division
    Last edited by moonwalker; 07-21-2003 at 01:21 PM.

  3. #3
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Keep in mind that factoring is known as a 'hard' problem.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  4. #4
    Registered User
    Join Date
    Jul 2003
    Posts
    3
    Thank you very much moon, the synthetic division looks promising. I don't mind doing lots of code, as I have nothing else to really do anyway. I'll post the finished code after it's done.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Polynomials and ADT's
    By Emeighty in forum C++ Programming
    Replies: 20
    Last Post: 08-19-2008, 08:32 AM
  2. polynomials
    By Emeighty in forum C++ Programming
    Replies: 4
    Last Post: 08-18-2008, 08:52 AM
  3. Multiplying Two Polynomials
    By CaptainMorgan in forum C++ Programming
    Replies: 6
    Last Post: 10-30-2006, 01:34 PM
  4. Polynomials with linked Lists
    By shaheedpak in forum C++ Programming
    Replies: 0
    Last Post: 09-26-2001, 11:10 AM
  5. Generating Polynomials using Linked Lists
    By shaheedpak in forum C++ Programming
    Replies: 0
    Last Post: 09-25-2001, 01:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21