由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - how to print 2 exponential digits in windows by using Perl
相关主题
easy problem coconut说实话要是没有谷歌的话Python在Linux下的地位不如PHP和Perl
大家最近学啥呢Usage of Grep???help!!!
perl sprintf question converting dec to hex这里的人用BOOST都是用来做什么?
Perl Q: how to convert integer to MAC addresswhich Regular Expression lib in C++ do you prefer?
UNIX下小问题[合集] c#整个就是个script language now,将来谁都能写
python和PERL哪个管用一点how to assign new value to loop variables?
perl怎么这么难?在emacs中怎么按照某种格式进行替换?
Re: 学生物的真是藏龙卧虎阿 (转载)关于process and threads的问题
相关话题的讨论汇总
话题: digits话题: windows话题: perl话题: unix
进入Programming版参与讨论
1 (共1页)
l****e
发帖数: 137
1
The default ouput of the exponential digit number is 3 in windows and 2 in
Linux/Unix. How can I reduce the exponential digits output in windows from 3
to 2 as the same in Linux/Unix.
Thanks a lot.
louwee
t****t
发帖数: 6806
2
"Note that the number of exponent digits in the scientific notation produced
by %e, %E, %g and %G for numbers with the modulus of the exponent less than
100 is system-dependent: it may be three or less (zero-padded as necessary)
. In other words, 1.23 times ten to the 99th may be either ``1.23e99'' or ``
1.23e099''."
so i suggest you do sprintf and do a regexp replacement.

3

【在 l****e 的大作中提到】
: The default ouput of the exponential digit number is 3 in windows and 2 in
: Linux/Unix. How can I reduce the exponential digits output in windows from 3
: to 2 as the same in Linux/Unix.
: Thanks a lot.
: louwee

q*****g
发帖数: 72
3
good point
huan qian

produced
than
necessary)
``

【在 t****t 的大作中提到】
: "Note that the number of exponent digits in the scientific notation produced
: by %e, %E, %g and %G for numbers with the modulus of the exponent less than
: 100 is system-dependent: it may be three or less (zero-padded as necessary)
: . In other words, 1.23 times ten to the 99th may be either ``1.23e99'' or ``
: 1.23e099''."
: so i suggest you do sprintf and do a regexp replacement.
:
: 3

c********e
发帖数: 383
4
u see, he claims that he has done all below 60 quests and he has his own tho
ttbot database for them, guess what, i believe him to his toe hair.
l****e
发帖数: 137
5
Thanks. I also notice this paragraph. But is there any way around other than
using regexp replacement?

produced
than
necessary)
``

【在 t****t 的大作中提到】
: "Note that the number of exponent digits in the scientific notation produced
: by %e, %E, %g and %G for numbers with the modulus of the exponent less than
: 100 is system-dependent: it may be three or less (zero-padded as necessary)
: . In other words, 1.23 times ten to the 99th may be either ``1.23e99'' or ``
: 1.23e099''."
: so i suggest you do sprintf and do a regexp replacement.
:
: 3

l****e
发帖数: 137
6
what is going on here? I could not read your guys' minds. So tell me do you
have a way to specify the exponential digits?
thanks.

tho

【在 c********e 的大作中提到】
: u see, he claims that he has done all below 60 quests and he has his own tho
: ttbot database for them, guess what, i believe him to his toe hair.

t****t
发帖数: 6806
7
keke, never mind those 2 bad eggs
regex replacement is what i can think, if you don't want to print fp
yourself

you

【在 l****e 的大作中提到】
: what is going on here? I could not read your guys' minds. So tell me do you
: have a way to specify the exponential digits?
: thanks.
:
: tho

p*u
发帖数: 2454
8
kao, it took me 2 minutes to figure out what bad eggs meant.

【在 t****t 的大作中提到】
: keke, never mind those 2 bad eggs
: regex replacement is what i can think, if you don't want to print fp
: yourself
:
: you

1 (共1页)
进入Programming版参与讨论
相关主题
关于process and threads的问题UNIX下小问题
怎样用Python选一部分数据出来python和PERL哪个管用一点
python regexp questionperl怎么这么难?
正则表达式里括号的转义好乱Re: 学生物的真是藏龙卧虎阿 (转载)
easy problem coconut说实话要是没有谷歌的话Python在Linux下的地位不如PHP和Perl
大家最近学啥呢Usage of Grep???help!!!
perl sprintf question converting dec to hex这里的人用BOOST都是用来做什么?
Perl Q: how to convert integer to MAC addresswhich Regular Expression lib in C++ do you prefer?
相关话题的讨论汇总
话题: digits话题: windows话题: perl话题: unix