For faster navigation, this Iframe is preloading the Wikiwand page for math.h.

math.h

Math.h math.h es un archivo de cabecera de la biblioteca estándar del lenguaje de programación C diseñado para operaciones matemáticas básicas. Muchas de sus funciones incluyen el uso de números en coma flotante. C++ también implementa estas funciones por razones de compatibilidad y las declara en la cabecera cmath.

Una nota importante: si se está programando en C/C++ bajo Gnu/Linux, y se utiliza uno de los compiladores nativos de este sistema operativo (gcc o g++), es necesario incluir, al compilar, la opción -lm, dado que, de lo contrario, el compilador generará un error. Por ejemplo, si tenemos un fichero fuente con funciones de la biblioteca matemática, llamado mi_fich_fuente_math.c, para compilarlo será necesario dar la orden siguiente en la consola de comandos (respectiva al intérprete):

$ gcc mi_fich_fuente_math.c -lm -o <nombre_del_ejecutable>

Esto, asimismo, no es necesario si se programa en C/C++ bajo Windows utilizando la herramienta gráfica MS Visual C++. Ocurre algo similar al compilar nuestro programa bajo gcc en MacOS ya que este está basado en UNIX no necesita el -lm.

Todas las funciones en las que participan ángulos toman y devuelven radianes.

Funciones miembro anteriores

Nombre Descripción
acos arcocoseno
asin arco seno
atan arcotangente
atan2 arcotangente de dos parámetros
floor función suelo
cos coseno
cosh coseno hiperbólico
exp(double x) función exponencial, computa ex
fabs valor entero
ceil menor entero no menor que el parámetro
fmod residuo de la división de flotantes
frexp fracciona y eleva al cuadrado.
ldexp tamaño del exponente de un valor en punto flotante
log logaritmo natural
log10 logaritmo en base 10
modf obtiene un valor en punto flotante íntegro y en partes
pow eleva un valor dado a un exponente, xy
sin seno
sinh seno hiperbólico
sqrt raíz cuadrada
tan tangente
tanh tangente hiperbólica

Véase también

{{bottomLinkPreText}} {{bottomLinkText}}
math.h
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?