首页上一页 1 下一页尾页 1 条记录 1/1页
关于long double 的问题
发表在C语言图书答疑
2013-07-19
是否精华
是
否
版块置顶:
是
否
我急切的想问大家一下,
#include<stdio.h>
main()
{long double x;
x=2222222222.222226666L;
printf("x=%f\n",x);}
x=2222222222.222227
Press any key to continue
问:Long double 是18~19位。书中说“在编写实型常量时,L表示该常量为long double长双精度类型”。为什么结果不会是x=2222222222.222226666 呢?
#include<stdio.h>
main()
{long double x;
x=2222222222.222226666L;
printf("x=%f\n",x);}
x=2222222222.222227
Press any key to continue
问:Long double 是18~19位。书中说“在编写实型常量时,L表示该常量为long double长双精度类型”。为什么结果不会是x=2222222222.222226666 呢?