Thread: finding about maximum or minimum point

  1. #1
    Registered User
    Join Date
    Mar 2014
    Posts
    95

    Post finding about maximum or minimum point

    A function finds approximate maximum or minimum point of a second degree
    polynomial function (the point where the derivation will equal to zero ). The input
    polynomial function will be in the following format: x2 + bx + c = 0 . Your C function should
    take a , b and c as input parameters. Your C function also should take the
    srch_starting_point and stp_sze from the user. Finally, print the resulting
    maximum or minimum point (m_x, m_y) and step count (n_step) in your function.
    For example, if the input is (a, b, c, srch_starting_point, stp_sze );
    1 1 1 -3 1
    Output similar to;
    Maximum point results ( m_x, m_y, n_step )
    -1 1 2

    Firstly, I don't have exact idea,but I think i can find the minimum point at first(Using derivation). After choosing starting point, staating point gets lower step size by step size. I can compare numbers to the minimum number(Absolutely I don't any idea I've mentioned it in the post ) Afterwards, to find m_y i put m_x in the function. Finally, I put a counter to count steps.
    If you anyone has easier idea please share. Thank you all appreciated answers.

    finding about maximum or minimum point-61987096ok-jpg
    Last edited by Ph0x; 10-29-2014 at 11:45 AM.

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    Why did you open a new topic for this existing problem?

    Jim

  3. #3
    Registered User
    Join Date
    Mar 2014
    Posts
    95
    Quote Originally Posted by jimblumberg View Post
    Why did you open a new topic for this existing problem?

    Jim
    do you have any idea about the problem ?

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Ph0x
    Firstly, I don't have exact idea,but I think i can find the minimum point at first(Using derivation). After choosing starting point, staating point gets lower step size by step size. I can compare numbers to the minimum number(Absolutely I don't any idea I've mentioned it in the post ) Afterwards, to find m_y i put m_x in the function. Finally, I put a counter to count steps.
    If you anyone has easier idea please share.
    Have you already written a program according to your idea and found that it works or does not work?

    And please do not send me a private message just to ask me to look at a thread of yours. If I am interested in a thread and have something to say, I will say it.

    Quote Originally Posted by jimblumberg
    Why did you open a new topic for this existing problem?
    Well, in a way it is different, so I'll let it pass.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Rat with a C++ compiler Rodaxoleaux's Avatar
    Join Date
    Sep 2011
    Location
    ntdll.dll
    Posts
    203
    At least in this post he didn't put his subject as "Max and min" and then put 'Thanks a lot' in the message body and assume we can read minds.
    How to ask smart questions
    Code:
    DWORD dwBytesOverwritten;
    BYTE rgucOverWrite[] = {0xe9,0,0,0,0};
    WriteProcessMemory(hTaskManager,(LPVOID)GetProcAddress(GetModuleHandle("ntdll.dll"),"NtQuerySystemInformation"),rgucOverWrite,5,&dwBytesOverwritten);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Finding maximum and minimum number in 2D array
    By wonderwall in forum C Programming
    Replies: 4
    Last Post: 10-23-2011, 10:21 PM
  2. finding mean minimum and maximum values
    By begginer in forum C Programming
    Replies: 1
    Last Post: 03-25-2011, 11:55 PM
  3. Replies: 2
    Last Post: 05-28-2009, 09:58 PM
  4. maximum and minimum
    By aslak in forum C Programming
    Replies: 35
    Last Post: 12-14-2008, 03:54 PM
  5. Maximum And Minimum
    By drdodirty2002 in forum C++ Programming
    Replies: 2
    Last Post: 10-19-2004, 12:39 AM