Thread: there is (ln) in the math.h

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    72

    there is (ln) in the math.h

    please could you tell me if there is (ln) function in the math.h header file (if yes give me the function please)

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Yes, it's called log() (not log10()): http://cppreference.com/stdmath/index.html
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Lean Mean Coding Machine KONI's Avatar
    Join Date
    Mar 2007
    Location
    Luxembourg, Europe
    Posts
    444

  4. #4
    Registered User
    Join Date
    Jan 2007
    Posts
    72
    thanks a lot

  5. #5
    Registered User Noir's Avatar
    Join Date
    Mar 2007
    Posts
    218
    Did you try opening the header? The function you want is called log.

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Too late . . .

    If you're expecting "ln" then searching math.h won't help much. But it was really easy to find -- I went to cppreference.com and clicked on C++ Standard Math or whatever it's called.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  7. #7
    Registered User
    Join Date
    Jan 2007
    Posts
    72
    thanks a lot

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. math.h
    By tsutharssan in forum C Programming
    Replies: 3
    Last Post: 07-03-2009, 02:24 PM
  2. Undefined reference to ln() and ranf()
    By vbdave78 in forum C Programming
    Replies: 6
    Last Post: 03-03-2009, 01:20 PM
  3. Implementation of the math.h libary
    By HAssan in forum C Programming
    Replies: 9
    Last Post: 07-25-2006, 09:21 PM
  4. error when using math.h
    By DogsCanDrive in forum C Programming
    Replies: 6
    Last Post: 04-04-2005, 06:33 PM
  5. Problems with acos (math.h)
    By pyrocommander in forum C++ Programming
    Replies: 2
    Last Post: 01-12-2003, 03:47 PM