Topher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Eduardo Sanz-Garcia wrote:
>   
>> If math.h is part of the C standard library why I need to use the 
>> corresponding library to compile:
>> gcc -*lm* codethatusemathfunctions.c
>>     
>
> I don't believe that you do.  Do you have an example?
>   
The math function is floor()

/*================
   Include file
================*/
#include <math.h>
#include <stdio.h>
#include <unistd.h>


int main()
{
  float real_number=9.9;
  int real_rounded_to_int;

  real_rounded_to_int = (int) floor(real_number);

  return real_rounded_to_int;
}
> - --
> Topher Fischer
> GnuPG Fingerprint: 3597 1B8D C7A5 C5AF 2E19  EFF5 2FC3 BE99 D123 6674
> [EMAIL PROTECTED] | http://www.thetopher.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFGeHf8L8O+mdEjZnQRAjlAAJ0cB1dJ4i6JszTlN5VAfGBwWcKArACfdfLt
> SeEHh+2CAkS/Funp4bj4UBs=
> =GkUO
> -----END PGP SIGNATURE-----
> --------------------
> BYU Unix Users Group 
> http://uug.byu.edu/ 
>
> The opinions expressed in this message are the responsibility of their
> author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
> ___________________________________________________________________
> List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
>
>   
--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to