我如何获得DOUBLE_MAX? [英] How do I get DOUBLE_MAX?

查看:285
本文介绍了我如何获得DOUBLE_MAX?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,C只支持少数的数据类型:

AFAIK, C supports just a few data types:

int, float, double, char, void enum.

我需要存储一个数字,可能达到进入高10位。因为我是从得到一个低10位的#

I need to store a number that could reach into the high 10 digits. Since I'm getting a low 10 digit # from

INT_MAX

,我想我需要一个双。

<&limits.h中GT; 没有DOUBLE_MAX。我发现了一个 DBL_MAX 认为这是遗产,也似乎是C ++在互联网上。是双我需要什么?为什么没有DOUBLE_MAX?

<limits.h> doesn't have a DOUBLE_MAX. I found a DBL_MAX on the internet that said this is LEGACY and also appears to be C++. Is double what I need? Why is there no DOUBLE_MAX?

推荐答案

DBL_MAX 中定义的<$c$c><float.h>.它在<一个可用性href=\"http://pubs.opengroup.org/onlinepubs/007908799/xsh/limits.h.html\"><$c$c><limits.h>在UNIX上是被标记为(LEGACY)。

DBL_MAX is defined in <float.h>. Its availability in <limits.h> on unix is what is marked as "(LEGACY)".

(显示什么那里float.h中链接到即使你有没有UNIX标记,因为这可能是在哪里找到的遗产符号UNIX标准,但大部分也是在C标准回C89)

(linking to the unix standard even though you have no unix tag since that's probably where you found the "LEGACY" notation, but much of what is shown there for float.h is also in the C standard back to C89)

这篇关于我如何获得DOUBLE_MAX?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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