boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - [合集] float data type question
相关主题
[合集] C里面return 1代表失败,return 0代表成功,对么?
[合集] simple question
[合集] 两个小问题
[合集] 快速填充memory的方法?
[合集] 可以在不同的文件里定义名字相同结构不同的两个class?
[合集] 有没有哪位高手可以帮小妹看一下偶滴程序的?
[合集] 又学了一招
[合集] 一个数据结构问题
[合集] one simple question
[合集] c++里面到底destructor是不是要virtual的?
相关话题的讨论汇总
话题: float话题: sep话题: myfloat话题: thrust话题: type
进入Programming版参与讨论
1 (共1页)
b***y
发帖数: 2799
1
☆─────────────────────────────────────☆
Savant (期待奇迹中) 于 (Sun Sep 18 22:35:12 2005) 提到:
i have two lines of code as:
//////
float myFloat = 99999999;
printf("%f", myFloat);
//////
it gives 100000000.000000
i am really confused about the result. does somebody have experience on this?
how can i resolve this (giving the correct output) without changing the data
type
to integer or double? thanks.
☆─────────────────────────────────────☆
thrust (Thrust Jaeina) 于 (Mon Sep 19 00:23:48 2005) 提到
1 (共1页)
进入Programming版参与讨论
相关主题
[合集] c++里面到底destructor是不是要virtual的?
[合集] pointer in C
[合集] What are the differences between "const char* p" and "c
[合集] g++下log函数出现问题
[合集] C help(urgent)!!! thanks a lot!!
[合集] 请问哪位有Hilbert transform 的 C code
[合集] 请教一个calloc的问题
c++ 中如何把str转换为float?
请教关于float的精度和比较
[合集] 那位大侠给启蒙一下:Python和C#比起来有什么优缺点?
相关话题的讨论汇总
话题: float话题: sep话题: myfloat话题: thrust话题: type