| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4098 人关注过本帖
标题:关于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
快速回复:关于float是否转换为double?
数据加载中...
 
   



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

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