微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用来自float.h和limits的数据,找到该系统的一些数字限制

#include <stdio.h>
#include <limits.h>    // integer limits
#include <float.h>     // floating-point limits

int main(void){    
    printf(Biggest int: %d\n, INT_MAX);
    printf(Smallest long long: %lld\n, LLONG_MIN);
    printf(One byte = %d bits on this system.\n, CHAR_BIT);
    printf(Largest double: %e\n, DBL_MAX);
    printf(Smallest normal float: %e\n, FLT_MIN);
    printf(float precision = %d digits\n, FLT_DIG);
    printf(float epsilon = %e\n, FLT_EPSILON);
    return 0;
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐