由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - how to convert str to double
相关主题
perl sprintf question converting dec to hexwhat's wrong with this scripts?variable passing?
could anybody please tell me what " while(cin) {...}" means?how to print 2 exponential digits in windows by using Perl
perl debugger 请较大虾们关于文件命名
估计javascript 最初设计时就基本没考虑好scope问题[合集] 如何只用putchar来实现itoa?
python没有first class function吧?Mysterious PgSQL 8.3 crash
Python为啥Lexical Scoping不适用于import?C语言一个passing variable的问题
python的scope机制 非常垃圾easy problem coconut
C++里面把数转成字符串的命令是啥啊?请教Matlab和IDL的处理数据能力差异
相关话题的讨论汇总
话题: double话题: precision话题: convert话题: str话题: ve
进入Programming版参与讨论
1 (共1页)
b*d
发帖数: 75
1
in c++. i've used sstream, atof, strtod, none of them give me good precision
eg. 112.84375->112.844
haven't try sprintf but i guess it's the same.
i've also tried >>std::setprecios(20) and it doesn't help. the output
container is declared to double.
any idea how to keep the precision in the string? perhaps i have to use
boost lexical cast...
y*******g
发帖数: 6599
2

precision
try <<

【在 b*d 的大作中提到】
: in c++. i've used sstream, atof, strtod, none of them give me good precision
: eg. 112.84375->112.844
: haven't try sprintf but i guess it's the same.
: i've also tried >>std::setprecios(20) and it doesn't help. the output
: container is declared to double.
: any idea how to keep the precision in the string? perhaps i have to use
: boost lexical cast...

b*d
发帖数: 75
3
lol, thx.

【在 y*******g 的大作中提到】
:
: precision
: try <<

1 (共1页)
进入Programming版参与讨论
相关主题
请教Matlab和IDL的处理数据能力差异python没有first class function吧?
two general C++ questionPython为啥Lexical Scoping不适用于import?
MPI I/O 问题python的scope机制 非常垃圾
a C questionC++里面把数转成字符串的命令是啥啊?
perl sprintf question converting dec to hexwhat's wrong with this scripts?variable passing?
could anybody please tell me what " while(cin) {...}" means?how to print 2 exponential digits in windows by using Perl
perl debugger 请较大虾们关于文件命名
估计javascript 最初设计时就基本没考虑好scope问题[合集] 如何只用putchar来实现itoa?
相关话题的讨论汇总
话题: double话题: precision话题: convert话题: str话题: ve