And more Mathematics (logarithms)

This is a discussion on And more Mathematics (logarithms) within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I was just wondering if someone can check my work on this problem. Code: (1/4)^x=75 //original equation x log (1/4) ...

  1. #1
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589

    And more Mathematics (logarithms)

    I was just wondering if someone can check my work on this problem.
    Code:
     
    (1/4)^x=75		//original equation
    x log (1/4) = log 75	//take log of each side
    x= log 75 / log (1/4)   //divide by log (1/4)
    x = -3.1144		//solve
    I attempted to put the resulting x value back into the following equation as a check
    -75+(1/4)^x=0
    and got the following answer on my check 2.14e-10
    Last edited by xviddivxoggmp3; 11-19-2004 at 12:41 AM.
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  2. #2
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Yep, the work is right. And the value you got back checking is easily accounted for by rounding/truncating errors (10^-10 is negligible compared to the other quantities involved).
    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.

  3. #3
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    You work is correct. The different of 2.14e-10 is small enough to account for the rounding you did when you took x out of its exact form.

  4. #4
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    thanks for the confirmation.
    slowly but surely i'm learning more skills for the code.
    ;0)
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

Popular pages Recent additions subscribe to a feed

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