ANSI C中的finite()? [英] finite() in ANSI C?

查看:74
本文介绍了ANSI C中的finite()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用-ansi选项编译时(使用gcc 3.2.3)我被警告了一个

函数''finite''的隐式声明。这是否意味着finite()是
不是ANSI C的一部分,或者我没有包含必要的头文件? (我

确实包含math.h.)无论哪种方式,是否有推荐的方法来检查ANSI C中的浮点数或双精度浮点数是否有限?谢谢。

When I compile with the -ansi option (using gcc 3.2.3) I''m warned of an
implicit declaration of function ''finite''. Does this mean that finite() is
not part of ANSI C, or that I didn''t include a necessary header file? (I
did include math.h.) Either way, is there a recommended way to check if a
float or double is finite in ANSI C? Thanks.

推荐答案

Nicholas R. Markham< ma ******* @ bigfoot.com>潦草地写道:
Nicholas R. Markham <ma*******@bigfoot.com> scribbled the following:
当我使用-ansi选项进行编译时(使用gcc 3.2.3)我被警告了一个
隐式声明函数''finite''。这是否意味着finite()不是ANSI C的一部分,或者我没有包含必要的头文件? (我确实包含了math.h.)无论哪种方式,是否有推荐的方法来检查ANSI C中的浮点数或双精度是否有限?谢谢。
When I compile with the -ansi option (using gcc 3.2.3) I''m warned of an
implicit declaration of function ''finite''. Does this mean that finite() is
not part of ANSI C, or that I didn''t include a necessary header file? (I
did include math.h.) Either way, is there a recommended way to check if a
float or double is finite in ANSI C? Thanks.




finite()不属于ANSI C.


-

/ - Joona Palaste(pa*****@cc.helsinki.fi)-------------芬兰-------- \

\ - http://www.helsinki.fi/~palaste ---------------------规则! -------- /

"''所谓的''意味着'''这有很长的解释,但我没有

时间在这里解释一下。''"

- JIPsoft



finite() is not part of ANSI C.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"''So called'' means: ''There is a long explanation for this, but I have no
time to explain it here.''"
- JIPsoft


" Nicholas R. Markham" <毫安******* @ bigfoot.com>写道:
"Nicholas R. Markham" <ma*******@bigfoot.com> writes:
当我使用-ansi选项进行编译时(使用gcc 3.2.3)我被警告有一个
隐式声明函数''finite''。这是否意味着finite()不是ANSI C的一部分,或者我没有包含必要的头文件? (我确实包含了math.h.)无论哪种方式,是否有推荐的方法来检查ANSI C中的浮点数或双精度是否有限?谢谢。
When I compile with the -ansi option (using gcc 3.2.3) I''m warned of an
implicit declaration of function ''finite''. Does this mean that finite() is
not part of ANSI C, or that I didn''t include a necessary header file? (I
did include math.h.) Either way, is there a recommended way to check if a
float or double is finite in ANSI C? Thanks.




finite()来自BSD。 C99中的等价物是isfinite()。


-

Brian Gough


Network Theory Ltd,

发布免费软件手册--- http:// www .network-theory.co.uk /


Nicholas R. Markham写道:
Nicholas R. Markham wrote:
当我编译时-ansi选项(使用gcc 3.2.3)我被警告了一个
隐式声明函数''finite''。这是否意味着finite()不是ANSI C的一部分,或者我没有包含必要的头文件? (我确实包含了math.h.)无论哪种方式,是否有推荐的方法来检查ANSI C中的浮点数或双精度是否有限?谢谢。
When I compile with the -ansi option (using gcc 3.2.3) I''m warned of an
implicit declaration of function ''finite''. Does this mean that finite() is
not part of ANSI C, or that I didn''t include a necessary header file? (I
did include math.h.) Either way, is there a recommended way to check if a
float or double is finite in ANSI C? Thanks.



您的实现中的标题(特别是< math.h>)将显示

C99中的一些内容但是不是隐藏在#ifdefs中的C89

旨在使它们与C89不可见。只需将它们移到

#ifdefs之外。这并没有解决从标题(可能还有库)中完全遗漏的问题。


The headers (in particular <math.h>) in your implementation will show
some things which are in C99 but not in C89 hidden within #ifdefs
designed to make them invisible with C89. Just move them outside the
#ifdefs. This does not solve the problem of things missing completely
from the headers (and perhaps from the libraries).


这篇关于ANSI C中的finite()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆