Thread: Data type problem

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    135

    Data type problem

    I have the following code which calculates Legende's polynomials.

    Code:
    ((2*n-1)*x*leg(n-1, x) - (n-1)*leg(n-2, x))/n
    The problem is that the function doesn't work when I input negative parameters. Is there something I'm missing?

    EDIT: Okay, I'm an idiot. n is not supposed to be a negative.
    Last edited by 843; 03-19-2011 at 09:32 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Packet Container Class
    By ChaoticXSinZ in forum C++ Programming
    Replies: 2
    Last Post: 11-01-2010, 12:07 AM
  2. Memory Leak in AppWizard-Generated Code
    By jrohde in forum Windows Programming
    Replies: 4
    Last Post: 05-19-2010, 04:24 PM
  3. data type problem
    By td4nos in forum C Programming
    Replies: 3
    Last Post: 06-02-2009, 09:49 AM
  4. Reading a file with Courier New characters
    By Noam in forum C Programming
    Replies: 3
    Last Post: 07-07-2006, 09:29 AM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM