Redian新闻
>
how to print 2 exponential digits in windows by using Perl
avatar
how to print 2 exponential digits in windows by using Perl# Programming - 葵花宝典
l*e
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
avatar
t*t
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

avatar
q*g
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

avatar
c*e
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.
avatar
l*e
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

avatar
l*e
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.

avatar
t*t
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

avatar
p*u
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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。