ããå®æ°ãå¿ããã®ã§åå¿ float ã®èª¤å·®ãèæ ®ãã¦ç価æ¯è¼ããã«ã¯ FLT_EPSILON ã使ã double ã®ããã® DBL_EPSILON long double ã®ããã® LDBL_EPSILON ãç¨æããã¦ããã ä¾ãã° float a ã float b ã¨ã¤ã³ã¼ã«ã§ãããããã§ãã¯ããã«ã¯ a 㨠b ã¨ã®å·®ã FLT_EPSILON ã®å¤ä»¥ä¸ãã©ãããã¤ã¾ãå·®ã®çµ¶å¯¾å¤ã FLT_EPSILON ã¨æ¯è¼æ¼ç®ããã ããã float a; float b; // ä½ããã®å¦ç if (a == b) { } ãããªã â float a; float b; // ä½ããã®å¦ç if (fabsf(a - b) < FLT_EPSILON) { } double ã®å ´å㯠â double a; double b; // ä½ããã®å¦ç if (fabs(a - b) <
{{#tags}}- {{label}}
{{/tags}}