Thread: Help need log base 4

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    1

    Exclamation Help need log base 4

    I am making a program for my programming class and I dont know how to get log base 4. can anyone help me?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    #include <math.h> and use log() or log10() with a little mathematics.
    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

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  2. base 2 log of X
    By Mario F. in forum C++ Programming
    Replies: 8
    Last Post: 06-26-2007, 09:21 AM
  3. is there a log base 2 function?
    By qubit67 in forum C Programming
    Replies: 3
    Last Post: 05-02-2007, 01:08 AM
  4. Calculate log base e by recursion function.
    By alice in forum C Programming
    Replies: 0
    Last Post: 04-23-2004, 11:51 PM
  5. How to change number data from base 256 to base 16?
    By ooosawaddee3 in forum C++ Programming
    Replies: 2
    Last Post: 11-05-2002, 12:19 AM