{"id":17999,"date":"2026-07-18T11:48:45","date_gmt":"2026-07-18T02:48:45","guid":{"rendered":"https:\/\/genai-ai.co.jp\/ai-kanri\/?p=17999"},"modified":"2026-07-18T11:48:45","modified_gmt":"2026-07-18T02:48:45","slug":"cc-c-pow-sqrt","status":"publish","type":"post","link":"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-c-pow-sqrt\/","title":{"rendered":"\u3010C\u8a00\u8a9epow\u95a2\u6570\u5b8c\u5168\u89e3\u8aac\u3011\u3079\u304d\u4e57\u30fb\u7d2f\u4e57\u30fb\u5e73\u65b9\u6839\u306e\u8a08\u7b97\u65b9\u6cd5\u3068sqrt\u30fb\u30b7\u30d5\u30c8\u6f14\u7b97\u307e\u3067"},"content":{"rendered":"\n<style>\n.g-flow-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;align-items:center;}\n.g-flow-item{background:linear-gradient(135deg,#1a1a1a,#2a1015);color:#fff;border-radius:8px;padding:16px 14px;min-width:130px;flex:1;text-align:center;}\n.g-flow-arrow{color:#dc2626;font-size:20px;font-weight:700;}\n.g-card-row{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 32px;}\n.g-card-row>div{flex:1;min-width:220px;}\n@media(max-width:600px){\n  .g-flow-row{flex-direction:column;}\n  .g-flow-arrow{transform:rotate(90deg);}\n  .g-card-row{flex-direction:column;}\n  .g-card-row>div{min-width:100%;}\n}\n<\/style>\n\n\n\n<div style=\"margin:0 0 32px;\">\n  <img decoding=\"async\" src=\"\u3010C\u8a00\u8a9epow\u95a2\u6570\u5b8c\u5168\u89e3\u8aac\u3011\u3079\u304d\u4e57\u30fb\u7d2f\u4e57\u30fb\u5e73\u65b9\u6839\u306e\u8a08\u7b97\u65b9\u6cd5\u3068sqrt\u30fb\u30b7\u30d5\u30c8\u6f14\u7b97\u307e\u3067\" alt=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/07\/thumb-cc-c-pow-sqrt.jpg\" style=\"width:100%;height:auto;border-radius:12px;display:block;\">\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u306epow\u95a2\u6570\u30fbsqrt\u95a2\u6570\u306b\u3088\u308b\u3079\u304d\u4e57\u30fb\u7d2f\u4e57\u30fb\u5e73\u65b9\u6839\u306e\u8a08\u7b97\u65b9\u6cd5\u3092\u5b8c\u5168\u89e3\u8aac\u3002math.h\u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3068-lm\u30ea\u30f3\u30af\u306e\u5fc5\u9808\u624b\u9806\u30012\u306e\u3079\u304d\u4e57\u8a08\u7b97\u306b\u4f7f\u3048\u308b\u30b7\u30d5\u30c8\u6f14\u7b97\u3001\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u7cbe\u5ea6\u554f\u984c\u3078\u306e\u5bfe\u51e6\u6cd5\u3001Claude Code\u306b\u3088\u308b\u81ea\u52d5\u751f\u6210\u307e\u3067\u5b9f\u8df5\u7684\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u3067\u3079\u304d\u4e57\uff082\u306e3\u4e57\uff1d8\u306a\u3069\uff09\u3084\u5e73\u65b9\u6839\uff08\u221a4\uff1d2\u306a\u3069\uff09\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\u3001\u6570\u5b66\u30e9\u30a4\u30d6\u30e9\u30ea\uff08math.h\uff09\u304c\u63d0\u4f9b\u3059\u308b<code>pow<\/code>\u95a2\u6570\u3068<code>sqrt<\/code>\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u95a2\u6570\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u4f7f\u3048\u307e\u3059\u304c\u300c\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b-lm\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5fc5\u8981\u300d\u300c\u623b\u308a\u5024\u304cdouble\u306a\u306e\u306b\u6574\u6570\u3068\u3057\u3066\u4f7f\u3046\u3068\u8aa4\u5dee\u304c\u51fa\u308b\u300d\u306a\u3069\u3001\u521d\u5fc3\u8005\u304c\u8e0f\u307f\u3084\u3059\u3044\u7f60\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001pow\u30fbsqrt\u95a2\u6570\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u3001\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u7cbe\u5ea6\u554f\u984c\u3078\u306e\u5bfe\u51e6\u30012\u306e\u3079\u304d\u4e57\u306b\u4f7f\u3048\u308b\u30b7\u30d5\u30c8\u6f14\u7b97\u3001\u305d\u3057\u3066Claude Code\u3092\u4f7f\u3063\u305f\u81ea\u52d5\u751f\u6210\u307e\u3067\u4f53\u7cfb\u7684\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"g-flow-row\" style=\"display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:20px 0;padding:20px;background:#f8fafc;border-radius:12px;\">\n<div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">\u3079\u304d\u4e57\u306e\u6982\u5ff5<\/div><div style=\"font-size:22px;color:#64748b;margin:0 6px;\">&#8594;<\/div><div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">sqrt\uff08\u5e73\u65b9\u6839\uff09<\/div><div style=\"font-size:22px;color:#64748b;margin:0 6px;\">&#8594;<\/div><div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">pow\uff08\u3079\u304d\u4e57\uff09<\/div><div style=\"font-size:22px;color:#64748b;margin:0 6px;\">&#8594;<\/div><div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">\u30b7\u30d5\u30c8\u6f14\u7b97<\/div><div style=\"font-size:22px;color:#64748b;margin:0 6px;\">&#8594;<\/div><div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">Claude Code\u6d3b\u7528<\/div>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-c-pow-sqrt&#038;blog_slug=cc-c-pow-sqrt\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-c-pow-sqrt&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"sec-01\">\u3079\u304d\u4e57\u30fb\u7d2f\u4e57\u3068\u306f\uff1aC\u8a00\u8a9e\u3067\u306e\u6570\u5b66\u8a08\u7b97\u306e\u57fa\u672c<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3079\u304d\u4e57\uff08\u7d2f\u4e57\uff09\u3068\u306f\u300c\u3042\u308b\u6570\u3092\u4f55\u56de\u304b\u3051\u7b97\u3059\u308b\u300d\u6f14\u7b97\u3067\u3059\u3002\u300c2\u306e3\u4e57\uff082^3\uff09\u300d\u306f\u300c2\u00d72\u00d72\uff1d8\u300d\u3092\u610f\u5473\u3057\u3001\u4e00\u822c\u7684\u306b\u300c\u5e95\uff08base\uff09\u306e\u6307\u6570\uff08exponent\uff09\u4e57\u300d\u3068\u8868\u73fe\u3057\u307e\u3059\u3002\u3079\u304d\u4e57\u306e\u7279\u6b8a\u30b1\u30fc\u30b9\u3068\u3057\u3066\u300c\u6307\u6570\u304c0.5\uff081\/2\uff09\u306e\u3068\u304d\u5e73\u65b9\u6839\u300d\u300c\u6307\u6570\u304c2\u306e\u3068\u304d\u4e8c\u4e57\uff08\u6b63\u65b9\u5f62\u306e\u9762\u7a4d\u8a08\u7b97\u7b49\uff09\u300d\u300c\u6307\u6570\u304c3\u306e\u3068\u304d\u4e09\u4e57\uff08\u7acb\u65b9\u4f53\u306e\u4f53\u7a4d\u8a08\u7b97\u7b49\uff09\u300d\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u3079\u304d\u4e57\uff08Power \/ Exponentiation\uff09<\/strong>\uff1a\u5e95\uff08base\uff09\u3092\u6307\u6570\uff08exponent\uff09\u306e\u56de\u6570\u3060\u3051\u639b\u3051\u5408\u308f\u305b\u308b\u6570\u5b66\u6f14\u7b97\u3002\u300cm^n\u300d\u306fm\u3092n\u56de\u639b\u3051\u7b97\u3057\u305f\u5024\u3092\u8868\u3057\u307e\u3059\u3002n=2\u306a\u3089\u4e8c\u4e57\uff08m*m\uff09\u3001n=3\u306a\u3089\u4e09\u4e57\uff08m*m*m\uff09\u3001n=0.5\u306a\u3089\u5e73\u65b9\u6839\uff08\u221am\uff09\u3067\u3059\u3002C\u8a00\u8a9e\u3067\u306f^\u6f14\u7b97\u5b50\u306fXOR\uff08\u30d3\u30c3\u30c8\u6392\u4ed6\u7684\u8ad6\u7406\u548c\uff09\u3067\u3042\u308a\u3001\u3079\u304d\u4e57\u306b\u306f\u4f7f\u3048\u307e\u305b\u3093\u3002\u5fc5\u305apow\u95a2\u6570\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<table style=\"width:100%;border-collapse:collapse;margin:20px 0;font-size:14px;\">\n<thead>\n<tr style=\"background:#1e3a5f;color:#fff;\">\n  <th style=\"padding:10px 14px;text-align:left;border:1px solid #cbd5e1;\">\u8a08\u7b97\u306e\u7a2e\u985e<\/th>\n  <th style=\"padding:10px 14px;text-align:left;border:1px solid #cbd5e1;\">\u6570\u5b66\u8868\u8a18<\/th>\n  <th style=\"padding:10px 14px;text-align:left;border:1px solid #cbd5e1;\">C\u8a00\u8a9e\u3067\u306e\u95a2\u6570<\/th>\n  <th style=\"padding:10px 14px;text-align:left;border:1px solid #cbd5e1;\">\u4f8b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background:#fff;\">\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">\u3079\u304d\u4e57\u30fb\u7d2f\u4e57<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">m^n<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;font-family:monospace;color:#dc2626;\">pow(m, n)<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">pow(2, 10) = 1024<\/td>\n<\/tr>\n<tr style=\"background:#f8fafc;\">\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">\u5e73\u65b9\u6839\uff08\u30eb\u30fc\u30c8\uff09<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">\u221am<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;font-family:monospace;color:#dc2626;\">sqrt(m)<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">sqrt(9) = 3.0<\/td>\n<\/tr>\n<tr style=\"background:#fff;\">\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">\u4e09\u4e57\u6839\uff08\u7acb\u65b9\u6839\uff09<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">m^(1\/3)<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;font-family:monospace;color:#dc2626;\">cbrt(m)<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">cbrt(27) = 3.0<\/td>\n<\/tr>\n<tr style=\"background:#f8fafc;\">\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">\u6307\u6570\u95a2\u6570\uff08e^n\uff09<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">e^n<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;font-family:monospace;color:#dc2626;\">exp(n)<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">exp(1) \u2248 2.71828<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div style=\"background:#fff5f5;border-left:4px solid #ef4444;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#ef4444;letter-spacing:1px;\">&#9888;&#65039; C\u8a00\u8a9e\u3067 ^ \u3092\u4f7f\u3046\u3068\u3079\u304d\u4e57\u306b\u306a\u3089\u306a\u3044<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\">C\u8a00\u8a9e\u306e^\u6f14\u7b97\u5b50\u306f\u30d3\u30c3\u30c8\u6392\u4ed6\u7684\u8ad6\u7406\u548c\uff08XOR\uff09\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u300c2^3\u300d\u3068\u66f8\u304f\u3068\u300c2 XOR 3 = 1\u300d\u3068\u306a\u308a\u3001\u3079\u304d\u4e57\u306e\u8a08\u7b97\u306b\u306f\u306a\u308a\u307e\u305b\u3093\u3002C\u8a00\u8a9e\u3067\u3079\u304d\u4e57\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\u5fc5\u305a<code>pow()<\/code>\u95a2\u6570\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-c-pow-sqrt&#038;blog_slug=cc-c-pow-sqrt\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-c-pow-sqrt&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"sec-02\">sqrt\u95a2\u6570\u3067\u5e73\u65b9\u6839\uff08\u30eb\u30fc\u30c8\uff09\u3092\u8a08\u7b97\u3059\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>sqrt<\/code>\u95a2\u6570\uff08square root\uff09\u306fC\u8a00\u8a9e\u3067\u5e73\u65b9\u6839\u3092\u8a08\u7b97\u3059\u308b\u6a19\u6e96\u95a2\u6570\u3067\u3059\u3002\u5f15\u6570\u306bdouble\u578b\u306e\u6570\u5024\u3092\u6e21\u3057\u3001\u305d\u306e\u5e73\u65b9\u6839\u3092double\u578b\u3067\u8fd4\u3057\u307e\u3059\u3002\u4f7f\u7528\u524d\u306b<code>math.h<\/code>\u30d8\u30c3\u30c0\u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>math.h\uff08\u30de\u30b9\u30a8\u30a4\u30c1\uff09<\/strong>\uff1aC\u8a00\u8a9e\u306e\u6570\u5b66\u8a08\u7b97\u95a2\u6570\u3092\u63d0\u4f9b\u3059\u308b\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u3002sqrt\uff08\u5e73\u65b9\u6839\uff09\u30fbpow\uff08\u3079\u304d\u4e57\uff09\u30fbsin\u30fbcos\u30fbtan\uff08\u4e09\u89d2\u95a2\u6570\uff09\u30fblog\uff08\u5bfe\u6570\uff09\u30fbexp\uff08\u6307\u6570\u95a2\u6570\uff09\u306a\u3069\u304c\u542b\u307e\u308c\u307e\u3059\u3002\u300c#include &lt;math.h&gt;\u300d\u3067\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u304c\u5fc5\u8981\u3067\u3001GCC\u7b49\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3068\u304d\u306f\u300c-lm\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3067libm\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30ea\u30f3\u30af\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:10px;padding:20px 24px;margin:20px 0;font-family:monospace;font-size:14px;line-height:1.8;color:#cdd6f4;overflow-x:auto;white-space:pre;\"><span style=\"color:#6c7086;\">\/* sqrt\u95a2\u6570\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9 *\/<\/span>\n<span style=\"color:#89b4fa;\">#include<\/span> <span style=\"color:#a6e3a1;\">&lt;stdio.h&gt;<\/span>\n<span style=\"color:#89b4fa;\">#include<\/span> <span style=\"color:#a6e3a1;\">&lt;math.h&gt;<\/span>  <span style=\"color:#6c7086;\">\/* sqrt\u30fbpow\u7b49\u3092\u4f7f\u3046\u305f\u3081\u306b\u5fc5\u9808 *\/<\/span>\n\n<span style=\"color:#cba6f7;\">int<\/span> <span style=\"color:#89b4fa;\">main<\/span>() {\n    <span style=\"color:#6c7086;\">\/* \u57fa\u672c\u7684\u306a\u5e73\u65b9\u6839\u306e\u8a08\u7b97 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"sqrt(4)   = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">sqrt<\/span>(<span style=\"color:#fab387;\">4.0<\/span>));    <span style=\"color:#6c7086;\">\/* 2.000000 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"sqrt(9)   = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">sqrt<\/span>(<span style=\"color:#fab387;\">9.0<\/span>));    <span style=\"color:#6c7086;\">\/* 3.000000 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"sqrt(2)   = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">sqrt<\/span>(<span style=\"color:#fab387;\">2.0<\/span>));    <span style=\"color:#6c7086;\">\/* 1.414214 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"sqrt(100) = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">sqrt<\/span>(<span style=\"color:#fab387;\">100.0<\/span>));  <span style=\"color:#6c7086;\">\/* 10.000000 *\/<\/span>\n\n    <span style=\"color:#6c7086;\">\/* \u5909\u6570\u3092\u4f7f\u3046\u4f8b *\/<\/span>\n    <span style=\"color:#cba6f7;\">double<\/span> <span style=\"color:#89b4fa;\">x<\/span> = <span style=\"color:#fab387;\">25.0<\/span>;\n    <span style=\"color:#cba6f7;\">double<\/span> <span style=\"color:#89b4fa;\">result<\/span> = <span style=\"color:#89b4fa;\">sqrt<\/span>(<span style=\"color:#89b4fa;\">x<\/span>);\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"sqrt(%.1f) = %.1f\\n\"<\/span>, <span style=\"color:#89b4fa;\">x<\/span>, <span style=\"color:#89b4fa;\">result<\/span>);  <span style=\"color:#6c7086;\">\/* sqrt(25.0) = 5.0 *\/<\/span>\n\n    <span style=\"color:#6c7086;\">\/* \u8ca0\u306e\u6570\u306fNaN\uff08Not a Number\uff09\u306b\u306a\u308b *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"sqrt(-1) = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">sqrt<\/span>(-<span style=\"color:#fab387;\">1.0<\/span>));  <span style=\"color:#6c7086;\">\/* NaN *\/<\/span>\n\n    <span style=\"color:#cba6f7;\">return<\/span> <span style=\"color:#fab387;\">0<\/span>;\n}\n\n<span style=\"color:#6c7086;\">\/* \u30b3\u30f3\u30d1\u30a4\u30eb\u65b9\u6cd5: gcc main.c -lm -o main *\/<\/span>\n<span style=\"color:#6c7086;\">\/*               ^^^^ -lm \u306f\u5fc5\u9808\uff08libm\u6570\u5b66\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30ea\u30f3\u30af\uff09 *\/<\/span><\/div>\n\n\n\n<div style=\"background:#fff5f5;border-left:4px solid #ef4444;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#ef4444;letter-spacing:1px;\">&#9888;&#65039; -lm\u3092\u5fd8\u308c\u308b\u3068\u300cundefined reference to sqrt\u300d\u30a8\u30e9\u30fc<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\">GCC\u3067math.h\u306e\u95a2\u6570\uff08sqrt\u30fbpow\u7b49\uff09\u3092\u4f7f\u3046\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3068\u304d\u3001\u300c-lm\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5fd8\u308c\u308b\u3068\u300cundefined reference to `sqrt`\u300d\u3068\u3044\u3046\u30ea\u30f3\u30af\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002\u5fc5\u305a\u300cgcc \u30d7\u30ed\u30b0\u30e9\u30e0\u540d.c -lm -o \u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u540d\u300d\u3068-lm\u3092\u4ed8\u3051\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002Windows\u306e\u4e00\u90e8\u306e\u74b0\u5883\u3084IDE\u3067\u306f-lm\u304c\u4e0d\u8981\u306a\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-c-pow-sqrt&#038;blog_slug=cc-c-pow-sqrt\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-c-pow-sqrt&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"sec-03\">pow\u95a2\u6570\u3067\u3079\u304d\u4e57\uff08\u7d2f\u4e57\uff09\u3092\u8a08\u7b97\u3059\u308b\uff1a\u4e8c\u4e57\u30fb\u4e09\u4e57\u30fbn\u4e57\u306e\u5b9f\u88c5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>pow<\/code>\u95a2\u6570\u306f\u300c\u7b2c1\u5f15\u6570\uff08\u5e95\uff09\u306e\u7b2c2\u5f15\u6570\uff08\u6307\u6570\uff09\u4e57\u300d\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002\u5f15\u6570\u30fb\u623b\u308a\u5024\u306f\u3059\u3079\u3066double\u578b\u3067\u3059\u3002\u6574\u6570\u306e\u3079\u304d\u4e57\u8a08\u7b97\u306b\u3082pow\u95a2\u6570\u3092\u4f7f\u3048\u307e\u3059\u304c\u3001\u7d50\u679c\u3092int\u306b\u5909\u63db\u3059\u308b\u3068\u304d\u306b\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u8aa4\u5dee\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\uff08Floating-Point Number\uff09<\/strong>\uff1a\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u304c\u5c0f\u6570\u3092\u8868\u73fe\u3059\u308b\u305f\u3081\u306e\u6570\u5024\u5f62\u5f0f\u3002C\u8a00\u8a9e\u306efloat\uff0832bit\uff09\u30fbdouble\uff0864bit\uff09\u30fblong double\uff0880bit\u4ee5\u4e0a\uff09\u304c\u3053\u308c\u306b\u5f53\u305f\u308a\u307e\u3059\u3002\u6709\u9650\u306e\u30d3\u30c3\u30c8\u6570\u3067\u7121\u9650\u306e\u5b9f\u6570\u3092\u8fd1\u4f3c\u3059\u308b\u305f\u3081\u3001\u8a08\u7b97\u7d50\u679c\u306b\u5fae\u5c0f\u306a\u8aa4\u5dee\uff080.0000000001\u7a0b\u5ea6\uff09\u304c\u751f\u3058\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002pow\u95a2\u6570\u306e\u7d50\u679c\u3092int\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u3068\u304d\u3001\u3053\u306e\u8aa4\u5dee\u3067\u5207\u308a\u6368\u3066\u3089\u308c\u3066\u671f\u5f85\u5024\u3088\u308a1\u5c0f\u3055\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:10px;padding:20px 24px;margin:20px 0;font-family:monospace;font-size:14px;line-height:1.8;color:#cdd6f4;overflow-x:auto;white-space:pre;\"><span style=\"color:#89b4fa;\">#include<\/span> <span style=\"color:#a6e3a1;\">&lt;stdio.h&gt;<\/span>\n<span style=\"color:#89b4fa;\">#include<\/span> <span style=\"color:#a6e3a1;\">&lt;math.h&gt;<\/span>\n\n<span style=\"color:#cba6f7;\">int<\/span> <span style=\"color:#89b4fa;\">main<\/span>() {\n    <span style=\"color:#6c7086;\">\/* pow(\u5e95, \u6307\u6570) \u3067\u3079\u304d\u4e57\u8a08\u7b97 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"2^10 = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">pow<\/span>(<span style=\"color:#fab387;\">2.0<\/span>, <span style=\"color:#fab387;\">10.0<\/span>));   <span style=\"color:#6c7086;\">\/* 1024.000000 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"3^3  = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">pow<\/span>(<span style=\"color:#fab387;\">3.0<\/span>, <span style=\"color:#fab387;\">3.0<\/span>));    <span style=\"color:#6c7086;\">\/* 27.000000 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"10^5 = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">pow<\/span>(<span style=\"color:#fab387;\">10.0<\/span>, <span style=\"color:#fab387;\">5.0<\/span>));  <span style=\"color:#6c7086;\">\/* 100000.000000 *\/<\/span>\n\n    <span style=\"color:#6c7086;\">\/* \u6307\u6570\u304c\u5c0f\u6570\u306e\u3068\u304d\uff08\u5e73\u65b9\u6839\u306fpow\u3067\u3082\u8a08\u7b97\u53ef\u80fd\uff09 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"9^0.5 = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">pow<\/span>(<span style=\"color:#fab387;\">9.0<\/span>, <span style=\"color:#fab387;\">0.5<\/span>));   <span style=\"color:#6c7086;\">\/* 3.0\uff08sqrt\u3068\u540c\u3058\uff09 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"8^(1\/3) = %f\\n\"<\/span>, <span style=\"color:#89b4fa;\">pow<\/span>(<span style=\"color:#fab387;\">8.0<\/span>, <span style=\"color:#fab387;\">1.0<\/span>\/<span style=\"color:#fab387;\">3.0<\/span>)); <span style=\"color:#6c7086;\">\/* 2.0\uff08\u4e09\u4e57\u6839\uff09 *\/<\/span>\n\n    <span style=\"color:#6c7086;\">\/* \u6574\u6570\u306b\u5909\u63db\u3059\u308b\u3068\u304d\uff1a\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u8aa4\u5dee\u306b\u6ce8\u610f *\/<\/span>\n    <span style=\"color:#cba6f7;\">int<\/span> <span style=\"color:#89b4fa;\">result<\/span>;\n\n    <span style=\"color:#6c7086;\">\/* \u5371\u967a: \u305d\u306e\u307e\u307e\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u3068\u8aa4\u5dee\u30671\u6e1b\u308b\u5834\u5408\u304c\u3042\u308b *\/<\/span>\n    result = (<span style=\"color:#cba6f7;\">int<\/span>)<span style=\"color:#89b4fa;\">pow<\/span>(<span style=\"color:#fab387;\">3.0<\/span>, <span style=\"color:#fab387;\">3.0<\/span>);  <span style=\"color:#6c7086;\">\/* 26 \u306b\u306a\u308b\u53ef\u80fd\u6027\u3042\u308a *\/<\/span>\n\n    <span style=\"color:#6c7086;\">\/* \u5b89\u5168: round\u3084lround\u95a2\u6570\u3067\u56db\u6368\u4e94\u5165\u3057\u3066\u304b\u3089\u30ad\u30e3\u30b9\u30c8 *\/<\/span>\n    result = (<span style=\"color:#cba6f7;\">int<\/span>)<span style=\"color:#89b4fa;\">round<\/span>(<span style=\"color:#89b4fa;\">pow<\/span>(<span style=\"color:#fab387;\">3.0<\/span>, <span style=\"color:#fab387;\">3.0<\/span>));  <span style=\"color:#6c7086;\">\/* 27 (\u6b63\u3057\u3044) *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"3^3(int) = %d\\n\"<\/span>, result);\n\n    <span style=\"color:#cba6f7;\">return<\/span> <span style=\"color:#fab387;\">0<\/span>;\n}<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border-left:4px solid #22c55e;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#22c55e;letter-spacing:1px;\">&#128161; pow\u7d50\u679c\u3092\u6574\u6570\u306b\u3059\u308b\u3068\u304d\u306fround()\u3092\u5fc5\u305a\u4f7f\u3046<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\">pow(3.0, 3.0)\u306e\u8a08\u7b97\u7d50\u679c\u306f\u6570\u5b66\u7684\u306b\u306f27\u3067\u3059\u304c\u3001\u6d6e\u52d5\u5c0f\u6570\u70b9\u8aa4\u5dee\u306b\u3088\u308a26.999999...\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092int\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u306826\u306b\u306a\u308a\u307e\u3059\u3002<code>round()<\/code>\u307e\u305f\u306f<code>lround()<\/code>\u3067\u56db\u6368\u4e94\u5165\u3057\u3066\u304b\u3089\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u3053\u3068\u3067\u3001\u6b63\u3057\u3044\u6574\u6570\u5024\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-c-pow-sqrt&#038;blog_slug=cc-c-pow-sqrt\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-c-pow-sqrt&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"sec-04\">powf\u30fbpowl\u30fbsqrtf\uff1afloat\u578b\u30fblong double\u578b\u7248\u306e\u95a2\u6570<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">pow\u30fbsqrt\u306fdouble\u578b\u3092\u6271\u3046\u95a2\u6570\u3067\u3059\u304c\u3001float\u578b\u3084long double\u578b\u3092\u4f7f\u3046\u5834\u5408\u306f\u5c02\u7528\u306e\u95a2\u6570\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>powf\u30fbpowl\uff08\u30d1\u30a6\u30a8\u30d5\u30fb\u30d1\u30a6\u30a8\u30eb\uff09<\/strong>\uff1apow\u306efloat\u578b\u7248\uff08powf\uff09\u3068long double\u578b\u7248\uff08powl\uff09\u3002\u7cbe\u5ea6\u3088\u308a\u3082\u901f\u5ea6\u3092\u512a\u5148\u3059\u308b\u7d44\u307f\u8fbc\u307f\u74b0\u5883\u3067\u306fpowf\uff08float\u7cbe\u5ea6\uff09\u304c\u4f7f\u308f\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002sqrt\u30fbcbrt\u306a\u3069\u3082\u540c\u69d8\u306bsqrtf\u30fbsqrtl\u30fbcbrtf\u30fbcbrtl\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002\u4e00\u822c\u7684\u306aPC\u30a2\u30d7\u30ea\u3067\u306fdouble\u578b\u306epow\u30fbsqrt\u3092\u4f7f\u3048\u3070\u5341\u5206\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n\n<table style=\"width:100%;border-collapse:collapse;margin:20px 0;font-size:14px;\">\n<thead>\n<tr style=\"background:#1e3a5f;color:#fff;\">\n  <th style=\"padding:10px 14px;text-align:left;border:1px solid #cbd5e1;\">\u95a2\u6570\u540d<\/th>\n  <th style=\"padding:10px 14px;text-align:left;border:1px solid #cbd5e1;\">\u5f15\u6570\u30fb\u623b\u308a\u5024\u306e\u578b<\/th>\n  <th style=\"padding:10px 14px;text-align:left;border:1px solid #cbd5e1;\">\u7cbe\u5ea6<\/th>\n  <th style=\"padding:10px 14px;text-align:left;border:1px solid #cbd5e1;\">\u7528\u9014<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background:#fff;\">\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;font-family:monospace;color:#dc2626;\">pow(x, y)<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">double<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">64bit\uff08\u7d0415\u6841\uff09<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">\u4e00\u822c\u7684\u306a\u7528\u9014\uff08\u63a8\u5968\uff09<\/td>\n<\/tr>\n<tr style=\"background:#f8fafc;\">\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;font-family:monospace;color:#dc2626;\">powf(x, y)<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">float<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">32bit\uff08\u7d047\u6841\uff09<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">\u901f\u5ea6\u512a\u5148\u30fb\u7d44\u307f\u8fbc\u307f\u7cfb<\/td>\n<\/tr>\n<tr style=\"background:#fff;\">\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;font-family:monospace;color:#dc2626;\">powl(x, y)<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">long double<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">80\u301c128bit\uff08\u7d0418\u301c34\u6841\uff09<\/td>\n  <td style=\"padding:9px 14px;border:1px solid #cbd5e1;\">\u9ad8\u7cbe\u5ea6\u8a08\u7b97<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-c-pow-sqrt&#038;blog_slug=cc-c-pow-sqrt\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-c-pow-sqrt&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"sec-05\">2\u306e\u3079\u304d\u4e57\u8a08\u7b97\u306b\u306f\u30b7\u30d5\u30c8\u6f14\u7b97\u304c\u9ad8\u901f\uff1a\u5de6\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u306e\u6d3b\u7528<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">2\u306e\u3079\u304d\u4e57\uff082^n\uff09\u3092\u6574\u6570\u3067\u8a08\u7b97\u3059\u308b\u5834\u5408\u3001pow\u95a2\u6570\u3088\u308a\u5de6\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\uff08&lt;&lt;\uff09\u306e\u65b9\u304c\u9ad8\u901f\u3067\u3059\u3002\u300c1 &lt;&lt; n\u300d\u3067\u300c2\u306en\u4e57\u300d\u3092\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\u7d44\u307f\u8fbc\u307f\u7cfb\u3084\u6027\u80fd\u304c\u91cd\u8981\u306a\u51e6\u7406\u3067\u306f\u7a4d\u6975\u7684\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u5de6\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\uff08Left Shift Operator: <<\uff09<\/strong>\uff1a\u30d3\u30c3\u30c8\u5217\u3092\u5de6\u306b\u6307\u5b9a\u6570\u3060\u3051\u30b7\u30d5\u30c8\u3059\u308b\u6f14\u7b97\u5b50\u3002\u300cx << n\u300d\u306fx\u306e\u30d3\u30c3\u30c8\u5217\u3092n\u6841\u5de6\u306b\u79fb\u52d5\u3057\u3001\u53f3\u5074\u306b0\u3092\u57cb\u3081\u307e\u3059\u30022\u9032\u6570\u3067\u30d3\u30c3\u30c8\u30921\u6841\u5de6\u306b\u30b7\u30d5\u30c8\u3059\u308b\u3053\u3068\u306f\u300c2\u500d\u3059\u308b\u300d\u3053\u3068\u3068\u540c\u3058\u3067\u3059\u3002\u300c1 << n\u300d\u30672\u306en\u4e57\uff082^n\uff09\u304c\u5f97\u3089\u308c\u307e\u3059\u3002pow(2.0, n)\u3088\u308a\u9ad8\u901f\u3067\u6574\u6570\u578b\u3092\u6271\u3048\u308b\u305f\u3081\u3001\u30d3\u30c3\u30c8\u30de\u30b9\u30af\u3084\u30d1\u30ef\u30fc\u30aa\u30d6\u30c4\u30fc\u306e\u8a08\u7b97\u3067\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:10px;padding:20px 24px;margin:20px 0;font-family:monospace;font-size:14px;line-height:1.8;color:#cdd6f4;overflow-x:auto;white-space:pre;\"><span style=\"color:#89b4fa;\">#include<\/span> <span style=\"color:#a6e3a1;\">&lt;stdio.h&gt;<\/span>\n\n<span style=\"color:#cba6f7;\">int<\/span> <span style=\"color:#89b4fa;\">main<\/span>() {\n    <span style=\"color:#6c7086;\">\/* \u5de6\u30b7\u30d5\u30c8 << \u306f 2\u306e\u3079\u304d\u4e57\u3068\u540c\u3058 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"1 << 0 = %d\\n\"<\/span>, <span style=\"color:#fab387;\">1<\/span> << <span style=\"color:#fab387;\">0<\/span>);   <span style=\"color:#6c7086;\">\/* 2^0 = 1 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"1 << 1 = %d\\n\"<\/span>, <span style=\"color:#fab387;\">1<\/span> << <span style=\"color:#fab387;\">1<\/span>);   <span style=\"color:#6c7086;\">\/* 2^1 = 2 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"1 << 8 = %d\\n\"<\/span>, <span style=\"color:#fab387;\">1<\/span> << <span style=\"color:#fab387;\">8<\/span>);   <span style=\"color:#6c7086;\">\/* 2^8 = 256 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"1 << 10 = %d\\n\"<\/span>, <span style=\"color:#fab387;\">1<\/span> << <span style=\"color:#fab387;\">10<\/span>); <span style=\"color:#6c7086;\">\/* 2^10 = 1024 *\/<\/span>\n\n    <span style=\"color:#6c7086;\">\/* \u53f3\u30b7\u30d5\u30c8 >> \u306f 2\u3067\u5272\u308b\u306e\u3068\u540c\u3058 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"16 >> 1 = %d\\n\"<\/span>, <span style=\"color:#fab387;\">16<\/span> >> <span style=\"color:#fab387;\">1<\/span>);  <span style=\"color:#6c7086;\">\/* 16 \/ 2 = 8 *\/<\/span>\n    <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"32 >> 2 = %d\\n\"<\/span>, <span style=\"color:#fab387;\">32<\/span> >> <span style=\"color:#fab387;\">2<\/span>);  <span style=\"color:#6c7086;\">\/* 32 \/ 4 = 8 *\/<\/span>\n\n    <span style=\"color:#6c7086;\">\/* \u5b9f\u7528\u4f8b: \u30d3\u30c3\u30c8\u30de\u30b9\u30af\u306e\u751f\u6210 *\/<\/span>\n    <span style=\"color:#cba6f7;\">unsigned int<\/span> mask;\n    <span style=\"color:#cba6f7;\">int<\/span> bit;\n    <span style=\"color:#cba6f7;\">for<\/span> (bit = <span style=\"color:#fab387;\">0<\/span>; bit < <span style=\"color:#fab387;\">8<\/span>; bit++) {\n        mask = (<span style=\"color:#cba6f7;\">unsigned int<\/span>)<span style=\"color:#fab387;\">1<\/span> << bit;\n        <span style=\"color:#89b4fa;\">printf<\/span>(<span style=\"color:#a6e3a1;\">\"bit%d mask = 0x%02X\\n\"<\/span>, bit, mask);\n    }\n\n    <span style=\"color:#cba6f7;\">return<\/span> <span style=\"color:#fab387;\">0<\/span>;\n}<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border-left:4px solid #22c55e;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#22c55e;letter-spacing:1px;\">&#128161; \u6574\u6570\u306e2\u306e\u3079\u304d\u4e57\u306f\u30b7\u30d5\u30c8\u6f14\u7b97\u304c\u9ad8\u901f<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\">pow(2.0, n)\u3092\u4f7f\u3046\u3068\u6d6e\u52d5\u5c0f\u6570\u70b9\u6f14\u7b97\u306b\u306a\u308a\u3001\u7d50\u679c\u3092int\u578b\u306b\u623b\u3059\u969b\u306b\u8aa4\u5dee\u304c\u751f\u3058\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u30022\u306e\u3079\u304d\u4e57\u3092\u6574\u6570\u3067\u6c42\u3081\u308b\u3068\u304d\u306f\u300c1 &lt;&lt; n\u300d\u3092\u4f7f\u3046\u3068\u8aa4\u5dee\u306a\u304f\u3001\u304b\u3064\u9ad8\u901f\u306b\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\u305f\u3060\u3057int\u578b\u306e\u4e0a\u9650\uff08\u901a\u5e382^31-1\uff09\u3092\u8d85\u3048\u306a\u3044\u3088\u3046\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/div>\n\n\n<div style=\"margin:48px 0 8px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/aikanri.genai-ai.co.jp\/seminar2-blog\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_content=cc-c-pow-sqrt&#038;blog_slug=cc-c-pow-sqrt\" target=\"_blank\" rel=\"noopener\" aria-label=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff08\u7121\u6599\u30fb1on1\u30fb60\u5206\uff09\u306e\u4e88\u7d04\u753b\u9762\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_seminar_claude_code_2026.jpg\" alt=\"Claude Code \u5b8c\u5168\u89e3\u8aac\u30bb\u30df\u30ca\u30fc\uff5c\u7d4c\u55b6\u8005\u30fb\u4f1a\u793e\u5f79\u54e1\u5c02\u7528 1on1 60\u5206 \u7121\u6599\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&#038;utm_medium=h2banner&#038;utm_campaign=cc-c-pow-sqrt&#038;utm_content=h2-banner-kanri\" target=\"_blank\" rel=\"noopener\" aria-label=\"AI\u9b3c\u7ba1\u7406 \u516c\u5f0f\u30b5\u30a4\u30c8\u3078\" style=\"flex:1 1 280px;max-width:360px;text-decoration:none;\"><img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/05\/cta_blog_1to1.jpg\" alt=\"Claude Code\u3092\u7d4c\u55b6\u306b\u6d3b\u304b\u3057\u305f\u3044\u65b9\u3078 \u2014 AI\u9b3c\u7ba1\u7406\" style=\"width:100%;height:auto;border-radius:8px;display:block;\"><\/a><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"sec-06\">Claude Code\u3067\u6570\u5b66\u8a08\u7b97\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u306e\u6570\u5b66\u95a2\u6570\uff08pow\u30fbsqrt\u7b49\uff09\u3092\u4f7f\u3063\u305f\u30b3\u30fc\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u3068\u304d\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3\u3084\u578b\u306e\u9078\u629e\u3067\u60a9\u3080\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002Claude Code\u3092\u4f7f\u3048\u3070\u3001\u8981\u4ef6\u3092\u65e5\u672c\u8a9e\u3067\u8aac\u660e\u3059\u308b\u3060\u3051\u3067\u9069\u5207\u306a\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"g-flow-row\" style=\"display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:20px 0;padding:20px;background:#f8fafc;border-radius:12px;\">\n<div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">\u8981\u4ef6\u3092\u65e5\u672c\u8a9e\u3067\u8aac\u660e<\/div><div style=\"font-size:22px;color:#64748b;margin:0 6px;\">&#8594;<\/div><div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">Claude Code\u304c\u751f\u6210<\/div><div style=\"font-size:22px;color:#64748b;margin:0 6px;\">&#8594;<\/div><div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">\u30b3\u30f3\u30d1\u30a4\u30eb\u30fb\u5b9f\u884c<\/div><div style=\"font-size:22px;color:#64748b;margin:0 6px;\">&#8594;<\/div><div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">\u52d5\u4f5c\u78ba\u8a8d<\/div><div style=\"font-size:22px;color:#64748b;margin:0 6px;\">&#8594;<\/div><div style=\"background:#1e3a5f;color:#fff;border-radius:8px;padding:12px 18px;font-size:14px;font-weight:600;text-align:center;min-width:120px;\">\u5b8c\u6210<\/div>\n<\/div>\n\n\n\n<div style=\"background:#1e1e2e;border-radius:10px;padding:20px 24px;margin:20px 0;font-family:monospace;font-size:14px;line-height:1.8;color:#cdd6f4;overflow-x:auto;white-space:pre;\"><span style=\"color:#6c7086;\">\/\/ Claude Code\u3078\u306e\u6307\u793a\u4f8b\uff08\u65e5\u672c\u8a9e\u3067OK\uff09<\/span>\n\n<span style=\"color:#a6e3a1;\">\"C\u8a00\u8a9e\u30671\u304b\u308910\u307e\u3067\u306e\u5404\u6570\u306e\u5e73\u65b9\u6839\u3068\u4e8c\u4e57\u3092\u307e\u3068\u3081\u3066\u8868\u793a\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066\u3002\n\u8868\u5f62\u5f0f\u3067printf\u51fa\u529b\u3057\u3066\u3001-lm\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u65b9\u6cd5\u3082\u6559\u3048\u3066\u3002\"<\/span>\n\n<span style=\"color:#a6e3a1;\">\"C\u8a00\u8a9e\u3067\u30e6\u30fc\u30b6\u30fc\u306b\u5e95\u3068\u6307\u6570\u3092\u5165\u529b\u3055\u305b\u3066\u3079\u304d\u4e57\u3092\u8a08\u7b97\u3057\u3001\n\u6574\u6570\u3068\u3057\u3066\u6b63\u78ba\u306b\u8868\u793a\u3059\u308b\u30b3\u30fc\u30c9\u3092\u4f5c\u3063\u3066\u3002\n\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u8aa4\u5dee\u5bfe\u7b56\u3082\u5165\u308c\u3066\u3002\"<\/span>\n\n<span style=\"color:#a6e3a1;\">\"C\u8a00\u8a9e\u3067\u30d5\u30a3\u30dc\u30ca\u30c3\u30c1\u6570\u5217\u3092pow\u95a2\u6570\u306e\u4ee3\u308f\u308a\u306b\u30eb\u30fc\u30d7\u3067\n\u52b9\u7387\u3088\u304f\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u3092\u6559\u3048\u3066\u3002\"<\/span><\/div>\n\n\n\n<div style=\"background:#f0fdf4;border-left:4px solid #22c55e;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#22c55e;letter-spacing:1px;\">&#128161; \u300c-lm\u304c\u5fc5\u8981\u300d\u3082Claude Code\u304c\u81ea\u52d5\u3067\u6ce8\u8a18<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\">math.h\u95a2\u6570\u3092\u4f7f\u3046\u30b3\u30fc\u30c9\u3092Claude Code\u306b\u751f\u6210\u3055\u305b\u308b\u3068\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u65b9\u6cd5\u306e\u8aac\u660e\u306b\u81ea\u52d5\u7684\u306b\u300cgcc main.c -lm\u300d\u3068-lm\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u542b\u3081\u3066\u304f\u308c\u307e\u3059\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5fd8\u308c\u3066\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3053\u3068\u304c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u306epow\u30fbsqrt\u95a2\u6570\u306fmath.h\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3057\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b-lm\u3092\u4ed8\u3051\u308b\u3053\u3068\u3067\u4f7f\u3048\u307e\u3059\u3002\u623b\u308a\u5024\u306fdouble\u578b\u306a\u306e\u3067\u6574\u6570\u306b\u5909\u63db\u3059\u308b\u3068\u304d\u306fround()\u3067\u56db\u6368\u4e94\u5165\u3057\u3066\u304b\u3089\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u30022\u306e\u3079\u304d\u4e57\u3092\u6574\u6570\u3067\u8a08\u7b97\u3059\u308b\u5834\u5408\u306f\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\uff081 &lt;&lt; n\uff09\u304c\u9ad8\u901f\u3067\u8aa4\u5dee\u3082\u3042\u308a\u307e\u305b\u3093\u3002Claude Code\u3092\u6d3b\u7528\u3057\u3066\u6570\u5b66\u8a08\u7b97\u30b3\u30fc\u30c9\u3092\u52b9\u7387\u3088\u304f\u5b9f\u88c5\u3057\u3001C\u8a00\u8a9e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u5e45\u3092\u5e83\u3052\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">\u3088\u304f\u3042\u308b\u8cea\u554f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Q. C\u8a00\u8a9e\u3067\u3079\u304d\u4e57\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. math.h\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3057\u3066pow(\u5e95, \u6307\u6570)\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002\u300cpow(2.0, 10.0)\u300d\u30672\u306e10\u4e57\uff081024\uff09\u3092\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306f\u300cgcc main.c -lm\u300d\u3068-lm\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. C\u8a00\u8a9e\u3067\u5e73\u65b9\u6839\uff08\u30eb\u30fc\u30c8\uff09\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. math.h\u306esqrt()\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002\u300csqrt(9.0)\u300d\u30673.0\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\u8ca0\u306e\u6570\u3092\u6e21\u3059\u3068NaN\uff08Not a Number\uff09\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306f-lm\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. pow\u95a2\u6570\u306e\u7d50\u679c\u3092int\u578b\u306b\u5909\u63db\u3059\u308b\u3068\u304d\u6ce8\u610f\u3059\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u8aa4\u5dee\u3067pow(3.0, 3.0)\u304c26.999...\u306b\u306a\u308a\u3001int\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u306826\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u6b63\u78ba\u306a\u6574\u6570\u3092\u5f97\u308b\u306b\u306fround()\u3067\u56db\u6368\u4e94\u5165\u3057\u3066\u304b\u3089\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u300c(int)round(pow(3.0, 3.0))\u300d\u306727\u304c\u5f97\u3089\u308c\u307e\u3059\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. -lm\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u306f\u4f55\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. GCC\u3067math.h\uff08pow\u30fbsqrt\u306a\u3069\uff09\u3092\u4f7f\u3046\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3068\u304d\u3001\u6570\u5b66\u30e9\u30a4\u30d6\u30e9\u30ea\uff08libm\uff09\u3092\u30ea\u30f3\u30af\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002\u4ed8\u3051\u5fd8\u308c\u308b\u3068\u300cundefined reference to sqrt\u300d\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. 2\u306e\u3079\u304d\u4e57\u3092\u9ad8\u901f\u306b\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u306f\u3042\u308a\u307e\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u6574\u6570\u306e2\u306e\u3079\u304d\u4e57\u8a08\u7b97\u306a\u3089\u5de6\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\uff08<<\uff09\u3092\u4f7f\u3046\u306e\u304c\u6700\u901f\u3067\u3059\u3002\u300c1 << n\u300d\u30672\u306en\u4e57\u304c\u5f97\u3089\u308c\u307e\u3059\uff08\u4f8b: 1 << 10 = 1024\uff09\u3002pow\u95a2\u6570\u3088\u308a\u9ad8\u901f\u3067\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u8aa4\u5dee\u3082\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"C\u8a00\u8a9e\u3067\u3079\u304d\u4e57\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"math.h\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3057\u3066pow(\u5e95, \u6307\u6570)\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002\u300cpow(2.0, 10.0)\u300d\u30672\u306e10\u4e57\uff081024\uff09\u3092\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306f\u300cgcc main.c -lm\u300d\u3068-lm\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5fc5\u8981\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"C\u8a00\u8a9e\u3067\u5e73\u65b9\u6839\uff08\u30eb\u30fc\u30c8\uff09\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"math.h\u306esqrt()\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002\u300csqrt(9.0)\u300d\u30673.0\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\u8ca0\u306e\u6570\u3092\u6e21\u3059\u3068NaN\uff08Not a Number\uff09\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306f-lm\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5fc5\u8981\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"pow\u95a2\u6570\u306e\u7d50\u679c\u3092int\u578b\u306b\u5909\u63db\u3059\u308b\u3068\u304d\u6ce8\u610f\u3059\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u8aa4\u5dee\u3067pow(3.0, 3.0)\u304c26.999...\u306b\u306a\u308a\u3001int\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u306826\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u6b63\u78ba\u306a\u6574\u6570\u3092\u5f97\u308b\u306b\u306fround()\u3067\u56db\u6368\u4e94\u5165\u3057\u3066\u304b\u3089\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\uff08\u300c(int)round(pow(3.0, 3.0))\u300d\u306727\u304c\u5f97\u3089\u308c\u307e\u3059\uff09\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"-lm\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u306f\u4f55\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"GCC\u3067math.h\uff08pow\u30fbsqrt\u306a\u3069\uff09\u3092\u4f7f\u3046\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3068\u304d\u3001\u6570\u5b66\u30e9\u30a4\u30d6\u30e9\u30ea\uff08libm\uff09\u3092\u30ea\u30f3\u30af\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002\u4ed8\u3051\u5fd8\u308c\u308b\u3068\u300cundefined reference to sqrt\u300d\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"2\u306e\u3079\u304d\u4e57\u3092\u9ad8\u901f\u306b\u8a08\u7b97\u3059\u308b\u65b9\u6cd5\u306f\u3042\u308a\u307e\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u6574\u6570\u306e2\u306e\u3079\u304d\u4e57\u8a08\u7b97\u306a\u3089\u5de6\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\uff08<<\uff09\u3092\u4f7f\u3046\u306e\u304c\u6700\u901f\u3067\u3059\u3002\u300c1 << n\u300d\u30672\u306en\u4e57\u304c\u5f97\u3089\u308c\u307e\u3059\uff08\u4f8b: 1 << 10 = 1024\uff09\u3002pow\u95a2\u6570\u3088\u308a\u9ad8\u901f\u3067\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u8aa4\u5dee\u3082\u3042\u308a\u307e\u305b\u3093\u3002\"\n      }\n    }\n  ]\n}\n<\/script>\n\n\n\n<h3 style=\"font-size:18px;font-weight:700;margin:32px 0 16px;padding-left:12px;border-left:4px solid #7c3aed;\">pow\u30fbsqrt\u95a2\u6570\u306e\u5b9f\u8df5\u6d3b\u7528\u4f8b\uff1a\u5b9f\u52d9\u3067\u3088\u304f\u4f7f\u3046\u6570\u5b66\u8a08\u7b97\u30d1\u30bf\u30fc\u30f3<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u306epow\u30fbsqrt\u95a2\u6570\u304c\u5b9f\u969b\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3069\u3046\u4f7f\u308f\u308c\u308b\u304b\u3092\u3001\u5b9f\u52d9\u7684\u306a\u4f8b\u3067\u89e3\u8aac\u3057\u307e\u3059\u3002\u6570\u5b66\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3092\u5b66\u3076\u306b\u306f\u3001\u5b9f\u969b\u306e\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3067\u8a66\u3059\u306e\u304c\u4e00\u756a\u52b9\u679c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b9f\u7528\u4f8b1\uff1a2\u70b9\u9593\u306e\u8ddd\u96e2\u8a08\u7b97\uff08\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\uff09<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2\u6b21\u5143\u5ea7\u6a19\u4e0a\u306e2\u70b9\uff08x1,y1\uff09\u3068\uff08x2,y2\uff09\u306e\u8ddd\u96e2\u306f\u300c\u221a((x2-x1)^2 + (y2-y1)^2)\u300d\u3067\u6c42\u3081\u3089\u308c\u307e\u3059\u3002\u3053\u308c\u306fsqrt\u3068pow\uff08\u307e\u305f\u306f\u5358\u7d14\u306a\u4e57\u7b97\uff09\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u8a08\u7b97\u3057\u307e\u3059\u3002\u30b2\u30fc\u30e0\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u306e\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u9593\u8ddd\u96e2\u3001\u5730\u56f3\u30a2\u30d7\u30ea\u306e\u7d4c\u8def\u8ddd\u96e2\u3001\u30bb\u30f3\u30b5\u30fc\u30c7\u30fc\u30bf\u306e\u5dee\u7570\u8a08\u7b97\u306a\u3069\u3067\u5e83\u304f\u4f7f\u308f\u308c\u308b\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002C\u8a00\u8a9e\u3067\u306fdouble\u578b\u3067\u8a08\u7b97\u3059\u308b\u3053\u3068\u3067\u5341\u5206\u306a\u7cbe\u5ea6\u304c\u5f97\u3089\u308c\u307e\u3059\u3002\u300cdouble dist = sqrt(pow(x2-x1, 2) + pow(y2-y1, 2));\u300d\u306e1\u884c\u3067\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u304c\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b9f\u7528\u4f8b2\uff1a\u8907\u5229\u8a08\u7b97\uff08\u5143\u5229\u5408\u8a08\u306e\u7b97\u51fa\uff09<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u91d1\u878d\u7cfb\u30a2\u30d7\u30ea\u3067\u3088\u304f\u4f7f\u3046\u8907\u5229\u8a08\u7b97\u306f\u300c\u5143\u91d1 \u00d7 (1 + \u5e74\u5229\u7387)^\u5e74\u6570\u300d\u3067\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002C\u8a00\u8a9e\u3067\u306f\u300cdouble total = principal * pow(1.0 + rate, years);\u300d\u3068\u66f8\u304d\u307e\u3059\u3002\u3053\u3053\u3067principal\u304c\u5143\u91d1\u3001rate\u304c\u5e74\u5229\u7387\uff08\u4f8b: 0.05 = 5%\uff09\u3001years\u304c\u904b\u7528\u5e74\u6570\u3067\u3059\u3002pow\u95a2\u6570\u3092\u4f7f\u3046\u3053\u3068\u3067\u9577\u671f\u8907\u5229\u8a08\u7b97\u3092\u7c21\u6f54\u306b\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002\u30ed\u30fc\u30f3\u306e\u6b8b\u50b5\u8a08\u7b97\u3001\u7a4d\u7acb\u6295\u8cc7\u306e\u5c06\u6765\u4fa1\u5024\u8a08\u7b97\u3001\u9280\u884c\u5229\u606f\u8a08\u7b97\u306a\u3069\u5e45\u5e83\u3044\u91d1\u878d\u8a08\u7b97\u3067\u5fdc\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b9f\u7528\u4f8b3\uff1a\u3079\u304d\u4e57\u3092\u4f7f\u3063\u305f\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6587\u5b57\u5217\u30cf\u30c3\u30b7\u30e5\u95a2\u6570\u3084\u591a\u9805\u5f0f\u30ed\u30fc\u30ea\u30f3\u30b0\u30cf\u30c3\u30b7\u30e5\uff08Polynomial Rolling Hash\uff09\u3067\u306f\u3001\u3079\u304d\u4e57\u306e\u7d44\u307f\u5408\u308f\u305b\u304c\u4f7f\u308f\u308c\u307e\u3059\u3002\u300chash = (hash * base + char_value) % modulus\u300d\u306e\u7e70\u308a\u8fd4\u3057\u3067\u30cf\u30c3\u30b7\u30e5\u5024\u3092\u8a08\u7b97\u3057\u307e\u3059\u304c\u3001\u3053\u306e\u4e2d\u306ebase\u306e\u3079\u304d\u4e57\u8a08\u7b97\u306bpow\u7684\u306a\u8003\u3048\u65b9\u304c\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u30cf\u30c3\u30b7\u30e5\u8a08\u7b97\u3067\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u7cbe\u5ea6\u554f\u984c\u3092\u907f\u3051\u308b\u305f\u3081pow\u95a2\u6570\u3067\u306f\u306a\u304f\u30eb\u30fc\u30d7\u3092\u4f7f\u3046\u6574\u6570\u6f14\u7b97\u304c\u4e00\u822c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b9f\u7528\u4f8b4\uff1a\u753b\u50cf\u51e6\u7406\u3067\u306e\u30ac\u30f3\u30de\u88dc\u6b63<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ac\u30f3\u30de\u88dc\u6b63\u306f\u753b\u50cf\u306e\u660e\u308b\u3055\u3092\u8abf\u6574\u3059\u308b\u51e6\u7406\u3067\u300c\u51fa\u529b = (\u5165\u529b\/255)^(1\/\u30ac\u30f3\u30de\u5024) \u00d7 255\u300d\u3067\u8a08\u7b97\u3057\u307e\u3059\u3002C\u8a00\u8a9e\u3067\u306fpow\u95a2\u6570\u3092\u4f7f\u3063\u3066\u300coutput = pow(input\/255.0, 1.0\/gamma) * 255.0;\u300d\u3068\u5b9f\u88c5\u3057\u307e\u3059\u3002\u30ac\u30f3\u30de\u5024\u304c2.2\u306e\u5834\u5408\uff08\u4e00\u822c\u7684\u306a\u30e2\u30cb\u30bf\u30fc\u306e\u6a19\u6e96\u30ac\u30f3\u30de\uff09\u3001\u300cpow(pixel\/255.0, 1.0\/2.2) * 255.0\u300d\u3067\u30ac\u30f3\u30de\u88dc\u6b63\u304c\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u79d1\u5b66\u6280\u8853\u8a08\u7b97\u30fb\u753b\u50cf\u51e6\u7406\u30fb\u4fe1\u53f7\u51e6\u7406\u3067pow\u95a2\u6570\u304c\u591a\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h3 style=\"font-size:18px;font-weight:700;margin:32px 0 16px;padding-left:12px;border-left:4px solid #059669;\">pow\u30fbsqrt\u306e\u7cbe\u5ea6\u554f\u984c\u3068\u5bfe\u51e6\u6cd5\uff1a\u3088\u304f\u3042\u308b\u30d0\u30b0\u3068\u5b89\u5168\u306a\u5b9f\u88c5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">pow\u30fbsqrt\u95a2\u6570\u3092\u5b9f\u52d9\u3067\u4f7f\u3046\u3068\u304d\u306b\u767a\u751f\u3057\u3084\u3059\u3044\u7cbe\u5ea6\u554f\u984c\u3068\u305d\u306e\u5bfe\u51e6\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002C\u8a00\u8a9e\u306e\u6d6e\u52d5\u5c0f\u6570\u70b9\u8a08\u7b97\u306e\u7279\u6027\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u8a08\u7b97\u30df\u30b9\u3092\u9632\u3052\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u554f\u984c1\uff1a\u6574\u6570\u306e\u3079\u304d\u4e57\u7d50\u679c\u3092int\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u30681\u5f15\u304b\u308c\u308b<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u300c(int)pow(3, 3)\u300d\u304c26\u306b\u306a\u308b\u3068\u3044\u3046\u306e\u306f\u6709\u540d\u306a\u30d0\u30b0\u3067\u3059\u3002\u6570\u5b66\u7684\u306b\u306f3^3=27\u3067\u3059\u304c\u3001pow\u306e\u5185\u90e8\u8a08\u7b97\u306726.9999999...\u3068\u3044\u3046\u5024\u306b\u306a\u308a\u3001int\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u3068\u30c8\u30e9\u30f3\u30b1\u30fc\u30c8\uff08\u5207\u308a\u6368\u3066\uff09\u306726\u306b\u306a\u308a\u307e\u3059\u3002\u5bfe\u51e6\u6cd5\u306f\u300c(int)round(pow(3, 3))\u300d\u306e\u3088\u3046\u306bround\u95a2\u6570\u3067\u56db\u6368\u4e94\u5165\u3057\u3066\u304b\u3089\u30ad\u30e3\u30b9\u30c8\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3042\u308b\u3044\u306f\u6574\u6570\u3079\u304d\u4e57\u306e\u305f\u3081\u306b\u5c02\u7528\u306e\u30eb\u30fc\u30d7\u95a2\u6570\u300cint ipow(int base, int exp) { int result=1; while(exp--) result*=base; return result; }\u300d\u3092\u7528\u610f\u3059\u308b\u65b9\u304c\u78ba\u5b9f\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u554f\u984c2\uff1asqrt(x*x + y*y)\u3067\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u304c\u8d77\u304d\u308b<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u8a08\u7b97\u3067x=1e200\u3001y=1e200\u306e\u3088\u3046\u306a\u5927\u304d\u306a\u5024\u3092\u4f7f\u3046\u3068\u3001x*x\u304cdouble\u306e\u4e0a\u9650\uff08\u7d041.8e308\uff09\u3092\u8d85\u3048\u3066Infinity\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u9632\u3050\u306b\u306fhypot(x, y)\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002hypot\u306f\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3084\u30a2\u30f3\u30c0\u30fc\u30d5\u30ed\u30fc\u3092\u56de\u907f\u3057\u306a\u304c\u3089\u5b89\u5168\u306b\u8ddd\u96e2\u3092\u8a08\u7b97\u3059\u308b\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u95a2\u6570\u3067\u3059\u3002\u7cbe\u5ea6\u304c\u91cd\u8981\u306a\u8a08\u7b97\u3067\u306f\u300csqrt(x*x + y*y)\u300d\u306e\u4ee3\u308f\u308a\u306b\u300chypot(x, y)\u300d\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u554f\u984c3\uff1a\u8ca0\u306e\u6570\u306bpow\u3092\u4f7f\u3046\u3068\u4e88\u60f3\u5916\u306e\u7d50\u679c\u306b\u306a\u308b<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u300cpow(-2.0, 3.0)\u300d\u306f\u6570\u5b66\u7684\u306b\u306f-8\u3067\u3059\u304c\u3001\u6307\u6570\u304c\u6574\u6570\u304b\u3069\u3046\u304b\u306b\u3088\u3063\u3066\u52d5\u4f5c\u304c\u5909\u308f\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u300cpow(-2.0, 2.5)\u300d\u306e\u3088\u3046\u306b\u6307\u6570\u304c\u5c0f\u6570\u3067\u5e95\u304c\u8ca0\u306e\u5834\u5408\u306fNaN\uff08Not a Number\uff09\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u8907\u7d20\u6570\u6f14\u7b97\u306e\u9818\u57df\u306b\u306a\u308b\u305f\u3081C\u6a19\u6e96\u306emath.h\u3067\u306f\u6271\u3048\u306a\u3044\u304b\u3089\u3067\u3059\u3002\u8ca0\u306e\u6570\u306e\u3079\u304d\u4e57\u8a08\u7b97\u306b\u306f\u300c\u7b26\u53f7\u3092\u5225\u9014\u7ba1\u7406\u3057\u3066\u6b63\u306e\u6570\u3067pow\u3092\u8a08\u7b97\u3059\u308b\u300d\u304b\u300c\u8907\u7d20\u6570\u30e9\u30a4\u30d6\u30e9\u30ea\uff08complex.h\uff09\u3092\u4f7f\u3046\u300d\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u53d6\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h3 style=\"font-size:18px;font-weight:700;margin:32px 0 16px;padding-left:12px;border-left:4px solid #dc2626;\">C\u8a00\u8a9e\u306e\u6570\u5b66\u95a2\u6570\u30e9\u30a4\u30d6\u30e9\u30ea\u5168\u4f53\u50cf\uff1apow\u30fbsqrt\u4ee5\u5916\u3082\u628a\u63e1\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">math.h\u306b\u306fpow\u30fbsqrt\u4ee5\u5916\u306b\u3082\u591a\u304f\u306e\u6570\u5b66\u95a2\u6570\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002C\u8a00\u8a9e\u3067\u6570\u5024\u8a08\u7b97\u3092\u884c\u3046\u969b\u306b\u77e5\u3063\u3066\u304a\u304f\u3079\u304d\u4e3b\u306a\u95a2\u6570\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e09\u89d2\u95a2\u6570\u7fa4\u3068\u3057\u3066sin\uff08\u6b63\u5f26\uff09\u30fbcos\uff08\u4f59\u5f26\uff09\u30fbtan\uff08\u6b63\u63a5\uff09\u30fbasin\uff08\u9006\u6b63\u5f26\uff09\u30fbacos\uff08\u9006\u4f59\u5f26\uff09\u30fbatan\uff08\u9006\u6b63\u63a5\uff09\u30fbatan2\uff08atan2\u306f2\u5f15\u6570\u7248\u3067\u89d2\u5ea6\u8a08\u7b97\u306b\u4fbf\u5229\uff09\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u5f15\u6570\u30fb\u623b\u308a\u5024\u304c\u30e9\u30b8\u30a2\u30f3\uff08\u5ea6\u3067\u306f\u306a\u3044\uff09\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5ea6\u304b\u3089\u30e9\u30b8\u30a2\u30f3\u3078\u306e\u5909\u63db\u306f\u300cradians = degrees * M_PI \/ 180.0\u300d\u3067\u884c\u3044\u307e\u3059\uff08M_PI\u306f\u5186\u5468\u7387\u3067\u3001math.h\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\uff09\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bfe\u6570\u95a2\u6570\u7fa4\u3068\u3057\u3066log\uff08\u81ea\u7136\u5bfe\u6570log_e\uff09\u30fblog2\uff082\u3092\u5e95\u3068\u3059\u308b\u5bfe\u6570\uff09\u30fblog10\uff08\u5e38\u7528\u5bfe\u6570log_10\uff09\u304c\u3042\u308a\u307e\u3059\u3002log2\u306f\u30d3\u30c3\u30c8\u6570\u306e\u8a08\u7b97\u306b\u3001log10\u306f\u6841\u6570\u306e\u8a08\u7b97\u306b\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002\u300c(int)log10(n) + 1\u300d\u3067n\u306e\u6841\u6570\u3092\u8a08\u7b97\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7d76\u5bfe\u5024\u30fb\u7aef\u6570\u51e6\u7406\u95a2\u6570\u3068\u3057\u3066fabs\uff08double\u578b\u306e\u7d76\u5bfe\u5024\uff09\u30fbceil\uff08\u5207\u308a\u4e0a\u3052\uff09\u30fbfloor\uff08\u5207\u308a\u6368\u3066\uff09\u30fbround\uff08\u56db\u6368\u4e94\u5165\uff09\u30fbtrunc\uff08\u30bc\u30ed\u65b9\u5411\u3078\u306e\u5207\u308a\u6368\u3066\uff09\u30fbfmod\uff08\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u5270\u4f59\uff09\u304c\u3042\u308a\u307e\u3059\u3002\u6574\u6570\u306eabs\u95a2\u6570\uff08stdlib.h\uff09\u3068\u6df7\u540c\u3057\u306a\u3044\u3088\u3046\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002double\u578b\u306b\u306ffabs\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3089\u306e\u6570\u5b66\u95a2\u6570\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u7269\u7406\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u30fb\u30b2\u30fc\u30e0\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30fb\u753b\u50cf\u51e6\u7406\u30fb\u4fe1\u53f7\u51e6\u7406\u30fb\u91d1\u878d\u8a08\u7b97\u306a\u3069\u5e45\u5e83\u3044\u5206\u91ce\u306eC\u8a00\u8a9e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u52b9\u7387\u3088\u304f\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002Claude Code\u306b\u300cC\u8a00\u8a9e\u3067\u3053\u306e\u8a08\u7b97\u3092\u3057\u305f\u3044\u300d\u3068\u65e5\u672c\u8a9e\u3067\u4f1d\u3048\u308c\u3070\u3001\u9069\u5207\u306a\u6570\u5b66\u95a2\u6570\u3092\u9078\u629e\u3057\u305f\u5b8c\u5168\u306a\u30b3\u30fc\u30c9\u3092\u5373\u5ea7\u306b\u751f\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u306epow\u30fbsqrt\u95a2\u6570\u306fmath.h\u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3068-lm\u30b3\u30f3\u30d1\u30a4\u30eb\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5fd8\u308c\u305a\u306b\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u304c\u57fa\u672c\u3067\u3059\u3002\u6574\u6570\u306e\u3079\u304d\u4e57\u8a08\u7b97\u3067\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u8aa4\u5dee\u5bfe\u7b56\u3068\u3057\u3066round()\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u304b\u3001\u6574\u6570\u5c02\u7528\u306e\u30eb\u30fc\u30d7\u95a2\u6570\u3092\u4f7f\u3046\u5224\u65ad\u304c\u5fc5\u8981\u3067\u3059\u30022\u306e\u3079\u304d\u4e57\u306b\u9650\u308c\u3070\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u304c\u6700\u3082\u9ad8\u901f\u3067\u6b63\u78ba\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u4f7f\u3044\u5206\u3051\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\u3053\u3068\u3067\u3001C\u8a00\u8a9e\u3067\u306e\u6570\u5b66\u8a08\u7b97\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u54c1\u8cea\u304c\u5927\u5e45\u306b\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 style=\"font-size:18px;font-weight:700;margin:32px 0 16px;padding-left:12px;border-left:4px solid #0ea5e9;\">pow\u30fbsqrt\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u3068\u30ea\u30f3\u30af\u30a8\u30e9\u30fc\u306e\u89e3\u6c7a\u6cd5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u521d\u5fc3\u8005\u304c\u6700\u521d\u306b\u3064\u307e\u305a\u304f\u306e\u304c\u3001pow\u30fbsqrt\u3092\u4f7f\u3063\u305f\u30b3\u30fc\u30c9\u304c\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u306a\u3044\u30fb\u5b9f\u884c\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u30a8\u30e9\u30fc\u3067\u3059\u3002\u539f\u56e0\u3068\u5bfe\u51e6\u6cd5\u3092\u9806\u306b\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u30a8\u30e9\u30fc1\uff1a\u300cundefined reference to 'pow'\u300d\u3068\u3044\u3046\u30ea\u30f3\u30af\u30a8\u30e9\u30fc<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u306fgcc\u30b3\u30de\u30f3\u30c9\u306b\u300c-lm\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u5fd8\u308c\u3066\u3044\u308b\u3068\u304d\u306b\u767a\u751f\u3057\u307e\u3059\u3002math.h\u306e\u6570\u5b66\u95a2\u6570\uff08pow\u3001sqrt\u3001sin\u3001cos\u7b49\uff09\u306flibm\uff08\u6570\u5b66\u30e9\u30a4\u30d6\u30e9\u30ea\uff09\u306b\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u30ea\u30f3\u30af\u3055\u308c\u307e\u305b\u3093\u3002\u300cgcc program.c -o program\u300d\u3067\u306f\u5931\u6557\u3057\u3001\u300cgcc program.c -o program -lm\u300d\u3068\u66f8\u304f\u3053\u3068\u3067\u89e3\u6c7a\u3057\u307e\u3059\u3002-lm\u306f\u5fc5\u305a\u30b3\u30f3\u30d1\u30a4\u30eb\u30b3\u30de\u30f3\u30c9\u306e\u672b\u5c3e\u304b\u3001\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306e\u5f8c\u308d\u306b\u66f8\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u30a8\u30e9\u30fc2\uff1a\u300cimplicit declaration of function 'pow'\u300d\u3068\u3044\u3046\u8b66\u544a\u30fb\u30a8\u30e9\u30fc<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u306f\u300c#include &lt;math.h&gt;\u300d\u3092\u5fd8\u308c\u3066\u3044\u308b\u3068\u304d\u306b\u51fa\u307e\u3059\u3002math.h\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3057\u306a\u3044\u3068\u3001\u30b3\u30f3\u30d1\u30a4\u30e9\u306fpow\u30fbsqrt\u3092\u77e5\u3089\u306a\u3044\u307e\u307eint\u3092\u8fd4\u3059\u95a2\u6570\u3068\u3057\u3066\u6271\u3044\u3001\u8aa4\u3063\u305f\u8a08\u7b97\u3092\u3059\u308b\u304b\u8b66\u544a\u3092\u51fa\u3057\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u306b\u300c#include &lt;math.h&gt;\u300d\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u30a8\u30e9\u30fc3\uff1asqrt\u306e\u5f15\u6570\u304c\u8ca0\u306e\u6570\u3067NaN\u306b\u306a\u308b<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sqrt(-1.0)\u306fNaN\uff08Not a Number\uff09\u3092\u8fd4\u3057\u3001\u305d\u306e\u5f8c\u306e\u8a08\u7b97\u3082\u3059\u3079\u3066NaN\u306b\u306a\u308a\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u5024\u3084\u8a08\u7b97\u7d50\u679c\u304c\u8ca0\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u5834\u5408\u306f\u300cif (x &lt; 0) { fprintf(stderr, \"\u30a8\u30e9\u30fc: \u8ca0\u306e\u6570\u306e\u5e73\u65b9\u6839\u306f\u8a08\u7b97\u3067\u304d\u307e\u305b\u3093\"); return -1; }\u300d\u306e\u3088\u3046\u306b\u4e8b\u524d\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c\u3066\u304f\u3060\u3055\u3044\u3002NaN\u304b\u3069\u3046\u304b\u306f\u300cisnan(value)\u300d\u95a2\u6570\uff08math.h\uff09\u3067\u5224\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 style=\"font-size:18px;font-weight:700;margin:32px 0 16px;padding-left:12px;border-left:4px solid #f59e0b;\">C\u8a00\u8a9e\u3067\u306e\u3079\u304d\u4e57\u8a08\u7b97\uff1a\u7528\u9014\u5225\u306e\u9078\u3073\u65b9\u30ac\u30a4\u30c9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u3067\u3079\u304d\u4e57\u30fb\u5e73\u65b9\u6839\u3092\u8a08\u7b97\u3059\u308b\u306b\u306f\u8907\u6570\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u7528\u9014\u306b\u5fdc\u3058\u3066\u6700\u9069\u306a\u65b9\u6cd5\u3092\u9078\u3076\u3053\u3068\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002\u6574\u6570\u3067\u306e\u3079\u304d\u4e57\u3067\u7cbe\u5ea6\u304c\u5fc5\u8981\u306a\u3068\u304d\u306f\u30eb\u30fc\u30d7\u306b\u3088\u308b\u6574\u6570\u6f14\u7b97\u3092\u4f7f\u3044\u30012\u306e\u3079\u304d\u4e57\u306f\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\uff08&lt;&lt;\u3001&gt;&gt;\uff09\u3092\u4f7f\u3044\u3001\u4e00\u822c\u7684\u306a\u5b9f\u6570\u306e\u3079\u304d\u4e57\u306fpow\u95a2\u6570\u3092\u4f7f\u3044\u3001\u6574\u6570\u7d50\u679c\u304c\u6b32\u3057\u3044\u3068\u304d\u306fround()\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u4f7f\u3046\u3068\u3044\u3046\u306e\u304c\u57fa\u672c\u7684\u306a\u4f7f\u3044\u5206\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u89b3\u70b9\u3067\u306f\u3001\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u304c\u6700\u901f\uff081\u547d\u4ee4\uff09\u3001\u30eb\u30fc\u30d7\u4e57\u7b97\u304c\u6b21\u70b9\uff08\u6570\u547d\u4ee4\uff09\u3001pow\u95a2\u6570\u304c\u6700\u3082\u9045\u3044\uff08\u6d6e\u52d5\u5c0f\u6570\u70b9\u8a08\u7b97\uff09\u3068\u3044\u3046\u9806\u5e8f\u3067\u3059\u3002\u30b2\u30fc\u30e0\u306e\u30d5\u30ec\u30fc\u30e0\u51e6\u7406\u3084\u753b\u50cf\u30d4\u30af\u30bb\u30eb\u51e6\u7406\u306e\u3088\u3046\u306b\u6bce\u79d2\u4f55\u767e\u4e07\u56de\u3082\u5b9f\u884c\u3059\u308b\u30b3\u30fc\u30c9\u3067\u306f\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u30fb\u30eb\u30fc\u30d7\u6f14\u7b97\u3092\u512a\u5148\u3057\u3001\u79d1\u5b66\u6280\u8853\u8a08\u7b97\u306e\u7cbe\u5ea6\u91cd\u8996\u30b3\u30fc\u30c9\u3067\u306fpow\u95a2\u6570\u3092\u9078\u3076\u306e\u304c\u8ce2\u660e\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b66\u7fd2\u306e\u89b3\u70b9\u3067\u306f\u3001\u307e\u305apow\u30fbsqrt\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\uff08math.h\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3001-lm\u30aa\u30d7\u30b7\u30e7\u30f3\u3001\u57fa\u672c\u7684\u306a\u547c\u3073\u51fa\u3057\u65b9\uff09\u3092\u7fd2\u5f97\u3057\u3001\u6b21\u306b\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u8aa4\u5dee\u3068round()\u306e\u5fc5\u8981\u6027\u3092\u7406\u89e3\u3057\u3001\u6700\u5f8c\u306bpowf\u30fbpowl\u30fbsqrtf\u306a\u3069\u306e\u578b\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u3068\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u306b\u9032\u3080\u306e\u304c\u52b9\u7387\u7684\u306a\u30b9\u30c6\u30c3\u30d7\u30a2\u30c3\u30d7\u7d4c\u8def\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u306e\u6570\u5b66\u8a08\u7b97\u306b\u95a2\u3057\u3066Claude Code\u306b\u8cea\u554f\u3059\u308b\u3068\u304d\u306f\u300cC\u8a00\u8a9e\u3067pow\u95a2\u6570\u3092\u4f7f\u3063\u3066\u8907\u5229\u8a08\u7b97\u3059\u308b\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u300d\u300csqrt\u306e\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u5bfe\u7b56\u3092\u6559\u3048\u3066\u300d\u306e\u3088\u3046\u306b\u5177\u4f53\u7684\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3092\u4f1d\u3048\u308b\u3068\u3001\u5b8c\u5168\u306b\u52d5\u4f5c\u3059\u308b\u30b3\u30fc\u30c9\u3068\u89e3\u8aac\u3092\u5f97\u3089\u308c\u307e\u3059\u3002\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u5834\u5408\u306f\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u305d\u306e\u307e\u307eClaude Code\u306b\u8cbc\u308a\u4ed8\u3051\u308b\u3068\u3001\u539f\u56e0\u3068\u89e3\u6c7a\u7b56\u3092\u30d4\u30f3\u30dd\u30a4\u30f3\u30c8\u3067\u63d0\u6848\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308aC\u8a00\u8a9e\u306e\u6570\u5b66\u8a08\u7b97\u5b66\u7fd2\u3092\u5927\u5e45\u306b\u52a0\u901f\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 style=\"font-size:18px;font-weight:700;margin:32px 0 16px;padding-left:12px;border-left:4px solid #8b5cf6;\">C\u8a00\u8a9e\u3067pow\u30fbsqrt\u3092\u4f7f\u3046\u3068\u304d\u306e\u5b66\u7fd2\u30ed\u30fc\u30c9\u30de\u30c3\u30d7<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u3067pow\u30fbsqrt\u95a2\u6570\u3092\u7fd2\u5f97\u3059\u308b\u305f\u3081\u306e\u5b66\u7fd2\u30ed\u30fc\u30c9\u30de\u30c3\u30d7\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u6bb5\u968e\u3092\u8e0f\u3080\u3053\u3068\u3067\u3001\u30a8\u30e9\u30fc\u306b\u60a9\u307e\u3055\u308c\u305a\u306b\u6570\u5b66\u95a2\u6570\u3092\u4f7f\u3044\u3053\u306a\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30c6\u30c3\u30d71\u306f\u57fa\u790e\u74b0\u5883\u306e\u78ba\u8a8d\u3067\u3059\u3002GCC\u304c\u5165\u3063\u3066\u3044\u308b\u304b\u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d\u3057\u3001math.h\u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3068-lm\u30ea\u30f3\u30af\u304c\u5fc5\u8981\u306a\u3053\u3068\u3092\u899a\u3048\u307e\u3059\u3002\u30b7\u30f3\u30d7\u30eb\u306asqrt(4.0)\u3084pow(2.0, 3.0)\u3092\u8a08\u7b97\u3057\u3066\u7d50\u679c\u3092\u8868\u793a\u3059\u308b\u3060\u3051\u306e\u7df4\u7fd2\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308a\u307e\u3059\u3002\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u8e93\u304f\u4eba\u306f-lm\u306e\u3064\u3051\u5fd8\u308c\u304c\u4e00\u756a\u591a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30c6\u30c3\u30d72\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u7406\u89e3\u3067\u3059\u3002pow(3.0, 3.0)\u306e\u7d50\u679c\u3092(int)\u3067\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u307f\u3066\u300127\u3067\u306a\u304f26\u306b\u306a\u308b\u3053\u3068\u3092\u4f53\u9a13\u3057\u307e\u3059\u3002round()\u3092\u4f7f\u3048\u307027\u306b\u306a\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u6574\u6570\u540c\u58eb\u306e\u3079\u304d\u4e57\u306bpow\u3092\u4f7f\u3046\u3068\u7cbe\u5ea6\u554f\u984c\u304c\u8d77\u304d\u308b\u3053\u3068\u3068\u3001\u305d\u306e\u56de\u907f\u6cd5\uff08round\u4f7f\u7528\u30fb\u6574\u6570\u5c02\u7528\u30eb\u30fc\u30d7\u95a2\u6570\uff09\u3092\u8eab\u306b\u3064\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30c6\u30c3\u30d73\u306f\u5b9f\u7528\u30d1\u30bf\u30fc\u30f3\u306e\u7fd2\u5f97\u3067\u3059\u30022\u70b9\u9593\u306e\u30e6\u30fc\u30af\u30ea\u30c3\u30c9\u8ddd\u96e2\u8a08\u7b97\u3001\u8907\u5229\u8a08\u7b97\u3001\u30d4\u30bf\u30b4\u30e9\u30b9\u306e\u5b9a\u7406\uff08\u76f4\u89d2\u4e09\u89d2\u5f62\u306e\u659c\u8fba\u8a08\u7b97\uff09\u306a\u3069\u3001\u6570\u5b66\u7684\u306b\u610f\u5473\u306e\u3042\u308b\u8a08\u7b97\u3067pow\u30fbsqrt\u3092\u4f7f\u3044\u307e\u3059\u3002\u3053\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u6570\u5b66\u95a2\u6570\u306e\u5b9f\u969b\u306e\u4f7f\u3044\u9053\u304c\u5b9f\u611f\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30c6\u30c3\u30d74\u306f\u578b\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u3068\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3067\u3059\u3002float\u578b\u306b\u306fpowf\u3068sqrtf\u3092\u4f7f\u3046\u3053\u3068\u3001long double\u578b\u306b\u306fpowl\u3068sqrtl\u3092\u4f7f\u3046\u3053\u3068\u3092\u899a\u3048\u307e\u3059\u3002\u307e\u305f2\u306e\u3079\u304d\u4e57\u306f\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\uff081 &lt;&lt; n\uff09\u3067\u8a08\u7b97\u3059\u308b\u65b9\u304c\u9ad8\u901f\u304b\u3064\u6b63\u78ba\u306a\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u30ed\u30fc\u30c9\u30de\u30c3\u30d7\u306b\u6cbf\u3063\u3066\u5b66\u7fd2\u3059\u308b\u3053\u3068\u3067\u3001C\u8a00\u8a9e\u306e\u6570\u5b66\u8a08\u7b97\u3092\u7cfb\u7d71\u7684\u306b\u7fd2\u5f97\u3067\u304d\u307e\u3059\u3002\u5404\u30b9\u30c6\u30c3\u30d7\u3067\u884c\u304d\u8a70\u307e\u3063\u305f\u3089Claude Code\u306b\u300cC\u8a00\u8a9e\u3067pow\u95a2\u6570\u306e\u6574\u6570\u3079\u304d\u4e57\u306e\u7cbe\u5ea6\u554f\u984c\u3092\u8a73\u3057\u304f\u6559\u3048\u3066\u300d\u306e\u3088\u3046\u306b\u8cea\u554f\u3059\u308c\u3070\u3001\u8a73\u3057\u3044\u89e3\u8aac\u3068\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u3059\u3050\u306b\u5f97\u3089\u308c\u307e\u3059\u3002C\u8a00\u8a9e\u306e\u6570\u5b66\u95a2\u6570\u30e9\u30a4\u30d6\u30e9\u30eamath.h\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u79d1\u5b66\u6280\u8853\u8a08\u7b97\u304b\u3089\u7d44\u307f\u8fbc\u307f\u30b7\u30b9\u30c6\u30e0\u3001\u30b2\u30fc\u30e0\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u307e\u3067\u5e45\u5e83\u3044\u5206\u91ce\u3067\u6d3b\u8e8d\u3067\u304d\u308bC\u8a00\u8a9e\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u76ee\u6307\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u306e\u3079\u304d\u4e57\u30fb\u5e73\u65b9\u6839\u8a08\u7b97\u3092\u5b66\u3076\u4e0a\u3067\u91cd\u8981\u306a\u306e\u306f\u3001\u300c\u6570\u5b66\u306e\u6b63\u78ba\u3055\u300d\u3068\u300c\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u52d5\u4f5c\u300d\u306e\u9055\u3044\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u6570\u5b66\u3067\u306f3\u306e3\u4e57\u306f\u53b3\u5bc6\u306b27\u3067\u3059\u304c\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306e\u6d6e\u52d5\u5c0f\u6570\u70b9\u6f14\u7b97\u3067\u306f26.9999...\u306e\u3088\u3046\u306a\u8fd1\u4f3c\u5024\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u7279\u6027\u3092\u77e5\u3063\u3066\u304a\u304f\u3060\u3051\u3067\u3001\u591a\u304f\u306e\u30d0\u30b0\u3092\u672a\u7136\u306b\u9632\u3052\u307e\u3059\u3002pow\u95a2\u6570\u306f\u5229\u4fbf\u6027\u304c\u9ad8\u3044\u53cd\u9762\u3001\u6574\u6570\u6f14\u7b97\u306b\u306f\u5411\u304b\u306a\u3044\u5834\u9762\u3082\u3042\u308a\u307e\u3059\u3002\u7528\u9014\u306b\u5fdc\u3058\u3066\u30b7\u30d5\u30c8\u6f14\u7b97\u5b50\u30fb\u30eb\u30fc\u30d7\u30fbpow\u3092\u4f7f\u3044\u5206\u3051\u3001\u7cbe\u5ea6\u304c\u5fc5\u8981\u306a\u5834\u9762\u3067\u306fround()\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u304cC\u8a00\u8a9e\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u306e\u57fa\u672c\u30b9\u30ad\u30eb\u3067\u3059\u3002\u307e\u305f\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b-lm\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5fd8\u308c\u308b\u3053\u3068\u3067\u8d77\u304d\u308b\u300cundefined reference\u300d\u30a8\u30e9\u30fc\u306fC\u8a00\u8a9e\u5b66\u7fd2\u8005\u306e\u5b9a\u756a\u30cf\u30de\u308a\u30dd\u30a4\u30f3\u30c8\u306a\u306e\u3067\u3001Makefile\u3084\u30d3\u30eb\u30c9\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u6700\u521d\u304b\u3089-lm\u3092\u66f8\u304d\u8fbc\u3080\u7fd2\u6163\u3092\u3064\u3051\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u521d\u5b66\u8005\u304cpow\u30fbsqrt\u95a2\u6570\u306e\u5b66\u7fd2\u3092\u59cb\u3081\u308b\u3068\u304d\u3001\u6700\u521d\u306f\u5c0f\u3055\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u8a66\u3059\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002\u300c2\u306e10\u4e57\u306f1024\u300d\u300c16\u306e\u5e73\u65b9\u6839\u306f4\u300d\u3068\u3044\u3046\u77e5\u3063\u3066\u3044\u308b\u7b54\u3048\u3092\u6301\u3064\u8a08\u7b97\u3092\u5b9f\u969b\u306b\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3057\u3066\u78ba\u8a8d\u3059\u308b\u3053\u3068\u3067\u3001\u95a2\u6570\u306e\u57fa\u672c\u52d5\u4f5c\u3068-lm\u30ea\u30f3\u30af\u306e\u5fc5\u8981\u6027\u3092\u4f53\u9a13\u7684\u306b\u7fd2\u5f97\u3067\u304d\u307e\u3059\u3002\u6b21\u306b\u6574\u6570\u30ad\u30e3\u30b9\u30c8\u554f\u984c\uff08round()\u306e\u5fc5\u8981\u6027\uff09\u3092\u4f53\u9a13\u3057\u3001\u6700\u5f8c\u306b\u5b9f\u7528\u7684\u306a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\uff08\u8ddd\u96e2\u8a08\u7b97\u3001\u8907\u5229\u8a08\u7b97\u3001\u30ac\u30f3\u30de\u88dc\u6b63\u306a\u3069\uff09\u3067\u4f7f\u3044\u65b9\u3092\u56fa\u3081\u3066\u3044\u304f\u3068\u3001\u3064\u307e\u305a\u304d\u304c\u5c11\u306a\u304f\u7740\u5b9f\u306b\u30b9\u30ad\u30eb\u30a2\u30c3\u30d7\u3067\u304d\u307e\u3059\u3002C\u8a00\u8a9e\u306e\u6570\u5b66\u8a08\u7b97\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\u3068\u3001\u7d44\u307f\u8fbc\u307f\u30b7\u30b9\u30c6\u30e0\u30fb\u30b2\u30fc\u30e0\u30a8\u30f3\u30b8\u30f3\u30fb\u79d1\u5b66\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u306a\u3069\u5e45\u5e83\u3044\u5206\u91ce\u3078\u306e\u6249\u304c\u958b\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C\u8a00\u8a9e\u306epow\u30fbsqrt\u95a2\u6570\u306e\u77e5\u8b58\u3092\u6df1\u3081\u308b\u3053\u3068\u3067\u3001\u6570\u5024\u8a08\u7b97\u306e\u57fa\u790e\u304b\u3089\u5fdc\u7528\u307e\u3067\u5e45\u5e83\u3044\u5834\u9762\u3067\u81ea\u4fe1\u3092\u6301\u3063\u3066\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u305c\u3072\u4eca\u65e5\u304b\u3089\u5b9f\u969b\u306b\u624b\u3092\u52d5\u304b\u3057\u3066\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>C\u8a00\u8a9e\u306epow\u95a2\u6570\u30fbsqrt\u95a2\u6570\u306b\u3088\u308b\u3079\u304d\u4e57\u30fb\u7d2f\u4e57\u30fb\u5e73\u65b9\u6839\u306e\u8a08\u7b97\u65b9\u6cd5\u3092\u5b8c\u5168\u89e3\u8aac\u3002math.h\u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3068-lm\u30ea\u30f3\u30af\u306e\u5fc5\u9808\u624b\u9806\u30012\u306e\u3079\u304d\u4e57\u8a08\u7b97\u306b\u4f7f\u3048\u308b\u30b7\u30d5\u30c8\u6f14\u7b97\u3001\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u7cbe\u5ea6\u554f\u984c\u3078\u306e\u5bfe\u51e6\u6cd5\u3001Claude Code\u306b\u3088\u308b\u81ea\u52d5\u751f\u6210\u307e\u3067\u5b9f\u8df5\u7684\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":17998,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sitemap_hide":"","_veu_custom_css":"","vkexunit_cta_each_option":"","footnotes":"","rank_math_description":"C\u8a00\u8a9e\u306epow\u95a2\u6570\u30fbsqrt\u95a2\u6570\u306b\u3088\u308b\u3079\u304d\u4e57\u30fb\u7d2f\u4e57\u30fb\u5e73\u65b9\u6839\u306e\u8a08\u7b97\u65b9\u6cd5\u3092\u5b8c\u5168\u89e3\u8aac\u3002math.h\u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3068-lm\u30ea\u30f3\u30af\u306e\u5fc5\u9808\u624b\u9806\u30012\u306e\u3079\u304d\u4e57\u8a08\u7b97\u306b\u4f7f\u3048\u308b\u30b7\u30d5\u30c8\u6f14\u7b97\u3001\u6d6e\u52d5\u5c0f\u6570\u70b9\u306e\u7cbe\u5ea6\u554f\u984c\u3078\u306e\u5bfe\u51e6\u6cd5\u3001Claude Code\u306b\u3088\u308b\u81ea\u52d5\u751f\u6210\u307e\u3067\u5b9f\u8df5\u7684\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002","rank_math_focus_keyword":"C\u8a00\u8a9e pow \u95a2\u6570 \u3079\u304d\u4e57","rank_math_title":"C\u8a00\u8a9e\u306epow\u95a2\u6570\u30fbsqrt\u95a2\u6570\u5b8c\u5168\u89e3\u8aac\uff5c\u3079\u304d\u4e57\u30fb\u5e73\u65b9\u6839\u30fb\u30b7\u30d5\u30c8\u6f14\u7b97\u307e\u3067","pending_rewrite_html":"","pending_rewrite_id":"","pending_rewrite_kw":"","pending_rewrite_at":"","pending_rewrite_source":"","pending_rewrite_brief":"","pending_rewrite_evidence":"","approved_rewrite_html":"","approved_rewrite_id":"","approved_rewrite_kw":"","approved_rewrite_at":"","approved_rewrite_by":"","approved_rewrite_brief":"","approved_rewrite_evidence":"","rewrite_tracker_baseline":"","rewrite_tracker_7day":"","rewrite_tracker_14day":"","rewrite_tracker_30day":"","rewrite_tracker_notified":""},"categories":[2],"tags":[],"class_list":["post-17999","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-claude-tips"],"_links":{"self":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/17999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/comments?post=17999"}],"version-history":[{"count":7,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/17999\/revisions"}],"predecessor-version":[{"id":18006,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/17999\/revisions\/18006"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media\/17998"}],"wp:attachment":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media?parent=17999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/categories?post=17999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/tags?post=17999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}