Find the answer to your Linux question:
Results 1 to 3 of 3
hi all, i'm new at programming in linux in C and i have 3 questions: 1-how is the math library available with the file system? 2-what are the names of ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    1

    Math library

    hi all, i'm new at programming in linux in C and i have 3 questions:
    1-how is the math library available with the file system?
    2-what are the names of the files that correspond to the math library?
    3-what are the possible way for linking against the math library?

    plz help..thnx for ur concern

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Hi,

    In this thread you can find some explainations about the use of math library:

    http://www.linuxforums.org/forum/lin...n-problem.html

    Regards
    Last edited by Franklin52; 10-28-2007 at 02:59 PM. Reason: Replace wrong url

  3. #3
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    how is the math library available with the file system?
    I don't know what you mean by "with the file system", but you use functions from the math library as follows:
    1. Find the names of functions you can use here.
    2. For each one, get its man page by doing something line:
      Code:
      man fabs
    3. In your source code, use #include <math.h> so you get the declarations for these functions.
    4. When you link, put this option on the gcc command line:
      Code:
      -lm     (that's ell, em)

    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...