{"id":6342,"date":"2026-01-27T11:05:45","date_gmt":"2026-01-27T10:05:45","guid":{"rendered":"https:\/\/workboot.fr\/ciela\/?page_id=6342"},"modified":"2026-01-28T10:55:18","modified_gmt":"2026-01-28T09:55:18","slug":"math-h","status":"publish","type":"page","link":"https:\/\/workboot.fr\/ciela\/math-h\/","title":{"rendered":"math.h"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>man 3 math.h <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Le fichier header du syst\u00e8me:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><a href=\"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2026\/01\/Cercle_trigo_3.svg_.png\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"381\" src=\"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2026\/01\/Cercle_trigo_3.svg_.png\" alt=\"\" class=\"wp-image-6346\" style=\"width:291px;height:auto\" srcset=\"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2026\/01\/Cercle_trigo_3.svg_.png 500w, https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2026\/01\/Cercle_trigo_3.svg_-300x229.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">\/usr\/include\/math.h <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Le fichier du code de la librairie statique <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/lib\/x86_64-linux-gnu\/libm.a<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Le fichier du code de la librairie dynamique <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/lib\/x86_64-linux-gnu\/libm.so<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">code exemple : math.c<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"1\" data-enlighter-title=\"\" data-enlighter-group=\"\">#include &lt;stdio.h>\n#include &lt;stdlib.h>\n#include &lt;math.h>\n\nint main() {\n    \/* Affichage de M_PI et M_PI\/2 *\/\n    printf(\"M_PI = %.15f\\n\", M_PI);\n    printf(\"M_PI\/2 = %.15f\\n\", M_PI\/2);\n    \n    \/* Valeurs trigonom\u00e9triques avec M_PI *\/\n    printf(\"\\n--- Valeurs de base ---\\n\");\n    printf(\"sin(0) = %.15f\\n\", sin(0.0));\n    printf(\"sin(M_PI\/2) = %.15f\\n\", sin(M_PI\/2));\n    printf(\"sin(M_PI) = %.15f\\n\", sin(M_PI));\n    \n    printf(\"\\ncos(0) = %.15f\\n\", cos(0.0));\n    printf(\"cos(M_PI\/2) = %.15f\\n\", cos(M_PI\/2));\n    printf(\"cos(M_PI) = %.15f\\n\", cos(M_PI));\n    \n    \/* Attention : tan(M_PI\/2) n'est pas d\u00e9finie math\u00e9matiquement *\/\n    \/* En C, elle peut donner une tr\u00e8s grande valeur ou inf *\/\n    printf(\"\\n--- Tangente ---\\n\");\n    printf(\"tan(0) = %.15f\\n\", tan(0.0));\n    \n    \/* Pour tan(M_PI\/2), on s'approche de l'asymptote *\/\n    double angle = M_PI\/2;\n    printf(\"tan(M_PI\/2 - 0.0000001) = %.15f\\n\", tan(angle - 0.0000001));\n    printf(\"tan(M_PI\/2 + 0.0000001) = %.15f\\n\", tan(angle + 0.0000001));\n    \n    \/* Fonctions r\u00e9ciproques *\/\n    printf(\"\\n--- Fonctions r\u00e9ciproques ---\\n\");\n    printf(\"asin(1) = %.15f (devrait \u00eatre M_PI\/2)\\n\", asin(1.0));\n    printf(\"acos(0) = %.15f (devrait \u00eatre M_PI\/2)\\n\", acos(0.0));\n    printf(\"atan(1) = %.15f (devrait \u00eatre M_PI\/4)\\n\", atan(1.0));\n    printf(\"atan(M_PI\/2) = %.15f\\n\", atan(M_PI\/2));\n    \n    \/* Conversions degr\u00e9s \u2194 radians *\/\n    printf(\"\\n--- Conversions ---\\n\");\n    printf(\"M_PI radians = 180 degres\\n\");\n    printf(\"M_PI\/2 radians = %.15f degres\\n\", (M_PI\/2) * 180.0 \/ M_PI);\n    printf(\"45 degres = %.15f radians\\n\", 45.0 * M_PI \/ 180.0);\n    \n    return EXIT_SUCCESS;\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Compilation dynamique, toujours faire un lien avec l&rsquo;option -l    suivi du m de libm (libm.a ou libm.so)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bruno@debian13:~\/Works\/langage_C\/Math$ gcc math.c -o math <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">-lm<\/mark> -g\nbruno@debian13:~\/Works\/langage_C\/Math$ ls -lh\ntotal 24K\n-rwxrwxr-x 1 bruno bruno  18K 27 janv. 19:21 math\n-rw-rw-r-- 1 bruno bruno 1,7K 27 janv. 19:21 math.c\nbruno@debian13:~\/Works\/langage_C\/Math$ ldd math\n\tlinux-vdso.so.1 (0x00007f3b91e7c000)\n\tlibm.so.6 =&gt; \/lib\/x86_64-linux-gnu\/libm.so.6 (0x00007f3b91d61000)\n\tlibc.so.6 =&gt; \/lib\/x86_64-linux-gnu\/libc.so.6 (0x00007f3b91b6c000)\n\t\/lib64\/ld-linux-x86-64.so.2 (0x00007f3b91e7e000)\nbruno@debian13:~\/Works\/langage_C\/Math$ \n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Compilation statique<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bruno@debian13:~\/Works\/langage_C\/Math$ gcc math.c -o math <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">-lm<\/mark> -static -g\nbruno@debian13:~\/Works\/langage_C\/Math$ ls -lh\ntotal 780K\n-rwxrwxr-x 1 bruno bruno <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">775K<\/mark> 27 janv. 19:24 math\n-rw-rw-r-- 1 bruno bruno 1,7K 27 janv. 19:21 math.c\nbruno@debian13:~\/Works\/langage_C\/Math$ ldd math\n\tn'est pas un ex\u00e9cutable dynamique\nbruno@debian13:~\/Works\/langage_C\/Math$ \n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-orange-color\">#math_s   est le code avec l'option -static !<\/mark>\nbruno@debian13:~\/Works\/langage_C\/Math$ time .\/math_s \nM_PI = 3.141592653589793\nM_PI\/2 = 1.570796326794897\n\n--- Valeurs de base ---\nsin(0) = 0.000000000000000\nsin(M_PI\/2) = 1.000000000000000\nsin(M_PI) = 0.000000000000000\n\ncos(0) = 1.000000000000000\ncos(M_PI\/2) = 0.000000000000000\ncos(M_PI) = -1.000000000000000\n\n--- Tangente ---\ntan(0) = 0.000000000000000\ntan(M_PI\/2 - 0.0000001) = 9999999.988038061186671\ntan(M_PI\/2 + 0.0000001) = -10000000.000284528359771\n\n--- Fonctions r\u00e9ciproques ---\nasin(1) = 1.570796326794897 (devrait \u00eatre M_PI\/2)\nacos(0) = 1.570796326794897 (devrait \u00eatre M_PI\/2)\natan(1) = 0.785398163397448 (devrait \u00eatre M_PI\/4)\natan(M_PI\/2) = 1.003884821853887\n\n--- Conversions ---\nM_PI radians = 180 degres\nM_PI\/2 radians = 90.000000000000000 degres\n45 degres = 0.785398163397448 radians\n\nreal\t0m0,001s\nuser\t0m0,001s\nsys\t0m0,000s\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-luminous-vivid-orange-color\">#math_d  compilation dynamique<\/mark> \nbruno@debian13:~\/Works\/langage_C\/Math$ time .\/math_d \nM_PI = 3.141592653589793\nM_PI\/2 = 1.570796326794897\n\n--- Valeurs de base ---\nsin(0) = 0.000000000000000\nsin(M_PI\/2) = 1.000000000000000\nsin(M_PI) = 0.000000000000000\n\ncos(0) = 1.000000000000000\ncos(M_PI\/2) = 0.000000000000000\ncos(M_PI) = -1.000000000000000\n\n--- Tangente ---\ntan(0) = 0.000000000000000\ntan(M_PI\/2 - 0.0000001) = 9999999.988038061186671\ntan(M_PI\/2 + 0.0000001) = -10000000.000284528359771\n\n--- Fonctions r\u00e9ciproques ---\nasin(1) = 1.570796326794897 (devrait \u00eatre M_PI\/2)\nacos(0) = 1.570796326794897 (devrait \u00eatre M_PI\/2)\natan(1) = 0.785398163397448 (devrait \u00eatre M_PI\/4)\natan(M_PI\/2) = 1.003884821853887\n\n--- Conversions ---\nM_PI radians = 180 degres\nM_PI\/2 radians = 90.000000000000000 degres\n45 degres = 0.785398163397448 radians\n\nreal\t0m0,002s\nuser\t0m0,000s\nsys\t0m0,002s\nbruno@debian13:~\/Works\/langage_C\/Math$ \n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">on notera ici que le code statique est plus rapide que le dynamique!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Le fichier header du syst\u00e8me: \/usr\/include\/math.h Le fichier du code de la librairie statique Le fichier du code de la librairie dynamique code exemple : math.c Compilation dynamique, toujours faire [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","_uag_custom_page_level_css":"","footnotes":""},"class_list":["post-6342","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>math.h - workboot<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/workboot.fr\/ciela\/math-h\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"math.h - workboot\" \/>\n<meta property=\"og:description\" content=\"Le fichier header du syst\u00e8me: \/usr\/include\/math.h Le fichier du code de la librairie statique Le fichier du code de la librairie dynamique code exemple : math.c Compilation dynamique, toujours faire [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/workboot.fr\/ciela\/math-h\/\" \/>\n<meta property=\"og:site_name\" content=\"workboot\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-28T09:55:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2026\/01\/Cercle_trigo_3.svg_.png\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"381\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/math-h\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/math-h\\\/\",\"name\":\"math.h - workboot\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/math-h\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/math-h\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/Cercle_trigo_3.svg_.png\",\"datePublished\":\"2026-01-27T10:05:45+00:00\",\"dateModified\":\"2026-01-28T09:55:18+00:00\",\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/workboot.fr\\\/ciela\\\/math-h\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/math-h\\\/#primaryimage\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/Cercle_trigo_3.svg_.png\",\"contentUrl\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/Cercle_trigo_3.svg_.png\",\"width\":500,\"height\":381},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#website\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"name\":\"workboot\",\"description\":\"Open Source, Open Minds \",\"publisher\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#organization\",\"name\":\"workboot\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"contentUrl\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/logo_ciel-dorian-1.png\",\"width\":1024,\"height\":950,\"caption\":\"workboot\"},\"image\":{\"@id\":\"https:\\\/\\\/workboot.fr\\\/ciela\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"math.h - workboot","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/workboot.fr\/ciela\/math-h\/","og_locale":"fr_FR","og_type":"article","og_title":"math.h - workboot","og_description":"Le fichier header du syst\u00e8me: \/usr\/include\/math.h Le fichier du code de la librairie statique Le fichier du code de la librairie dynamique code exemple : math.c Compilation dynamique, toujours faire [&hellip;]","og_url":"https:\/\/workboot.fr\/ciela\/math-h\/","og_site_name":"workboot","article_modified_time":"2026-01-28T09:55:18+00:00","og_image":[{"width":500,"height":381,"url":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2026\/01\/Cercle_trigo_3.svg_.png","type":"image\/png"}],"twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/workboot.fr\/ciela\/math-h\/","url":"https:\/\/workboot.fr\/ciela\/math-h\/","name":"math.h - workboot","isPartOf":{"@id":"https:\/\/workboot.fr\/ciela\/#website"},"primaryImageOfPage":{"@id":"https:\/\/workboot.fr\/ciela\/math-h\/#primaryimage"},"image":{"@id":"https:\/\/workboot.fr\/ciela\/math-h\/#primaryimage"},"thumbnailUrl":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2026\/01\/Cercle_trigo_3.svg_.png","datePublished":"2026-01-27T10:05:45+00:00","dateModified":"2026-01-28T09:55:18+00:00","inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/workboot.fr\/ciela\/math-h\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/workboot.fr\/ciela\/math-h\/#primaryimage","url":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2026\/01\/Cercle_trigo_3.svg_.png","contentUrl":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2026\/01\/Cercle_trigo_3.svg_.png","width":500,"height":381},{"@type":"WebSite","@id":"https:\/\/workboot.fr\/ciela\/#website","url":"https:\/\/workboot.fr\/ciela\/","name":"workboot","description":"Open Source, Open Minds ","publisher":{"@id":"https:\/\/workboot.fr\/ciela\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/workboot.fr\/ciela\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/workboot.fr\/ciela\/#organization","name":"workboot","url":"https:\/\/workboot.fr\/ciela\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/","url":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","contentUrl":"https:\/\/workboot.fr\/ciela\/wp-content\/uploads\/2025\/05\/logo_ciel-dorian-1.png","width":1024,"height":950,"caption":"workboot"},"image":{"@id":"https:\/\/workboot.fr\/ciela\/#\/schema\/logo\/image\/"}}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/workboot.fr\/ciela\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"Le fichier header du syst\u00e8me: \/usr\/include\/math.h Le fichier du code de la librairie statique Le fichier du code de la librairie dynamique code exemple : math.c Compilation dynamique, toujours faire [&hellip;]","_links":{"self":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/6342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/comments?post=6342"}],"version-history":[{"count":14,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/6342\/revisions"}],"predecessor-version":[{"id":6368,"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/pages\/6342\/revisions\/6368"}],"wp:attachment":[{"href":"https:\/\/workboot.fr\/ciela\/wp-json\/wp\/v2\/media?parent=6342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}