由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - How to judge if it is a number in C++
相关主题
[合集] 也问C++的小问题numerical recipe里的快速傅立叶变换
问哪里有C/C++的open source的project可以参与Adobe中国公司关闭(烙印又下黑手了) (转载)
matlab读入数据的错误python debug tool?
Extrapolation in Python?需要一个自动grade程序的软件,online judge, autograder这种
问一个C语言的NAN 的问题compare double to float
急问高手一个问题:如何实现微秒精度的time stamp
请教一道c面试题:在线等这儿专家多,问个杂志问题
what is the job of this function ?那位老大能帮忙下载一篇IEEE Xpore 的文章?叩谢。 (转载)
相关话题的讨论汇总
话题: c++话题: judge话题: number话题: nan话题: anybody
进入Programming版参与讨论
1 (共1页)
n*******r
发帖数: 60
1
in C++ How to judge a variable is a number (double type) or N/A, anybody
could help. I spent several hours in searching the document. Thanks very
much!
h*****k
发帖数: 5022
2
wot do u mean judge a variable?
a variable should declared first, then u know the type
X****r
发帖数: 3557
3
Google "IEEE 754"
e.g. on http://steve.hollasch.net/cgindex/coding/ieeefloat.html , see the "Summary" section.

anybody

【在 n*******r 的大作中提到】
: in C++ How to judge a variable is a number (double type) or N/A, anybody
: could help. I spent several hours in searching the document. Thanks very
: much!

n********e
发帖数: 2
4
#include
numeric_limits::quiet_NaN()
Actually there should be many representation of NaN for IEE754
So to determine whether a number is NaN one use isnan(double) in math.h

anybody

【在 n*******r 的大作中提到】
: in C++ How to judge a variable is a number (double type) or N/A, anybody
: could help. I spent several hours in searching the document. Thanks very
: much!

1 (共1页)
进入Programming版参与讨论
相关主题
那位老大能帮忙下载一篇IEEE Xpore 的文章?叩谢。 (转载)问一个C语言的NAN 的问题
how to solve too large positive summation go to negative in fortran programming?急问高手一个问题:
又有问题了请教一道c面试题:在线等
有没有人考IEEE的CSDA CSDP证书what is the job of this function ?
[合集] 也问C++的小问题numerical recipe里的快速傅立叶变换
问哪里有C/C++的open source的project可以参与Adobe中国公司关闭(烙印又下黑手了) (转载)
matlab读入数据的错误python debug tool?
Extrapolation in Python?需要一个自动grade程序的软件,online judge, autograder这种
相关话题的讨论汇总
话题: c++话题: judge话题: number话题: nan话题: anybody