标题:关于float是否转换为double?
取消只看楼主
xsimon
Rank: 1
等 级:新手上路
帖 子:121
专家分:0
注 册:2006-5-5
 问题点数:0 回复次数:1 
关于float是否转换为double?
Notice that floats in an expression are not automatically converted to double; this is a change from the original definition. In general, mathematical functions like those in <math.h> will use double precision. The main reason for using float is to save storage in large arrays, or, less often, to save time on machines where double-precision arithmetic is particularly expensive.

关于float是否转换为double? 老谭的书(C编译系统将实型常量作为双精度来处理)与K&R的书中不一样?
搜索更多相关主题的帖子: float double 
2006-05-17 17:46
xsimon
Rank: 1
等 级:新手上路
帖 子:121
专家分:0
注 册:2006-5-5
得分:0 
楼上的,那K&R的书上为何是这样写的.

The main reason for using float is to save storage in large arrays, to save time on machines where double-precision arithmetic is particularly expensive.
2006-05-18 08:05



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-65033-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.076178 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved