问题描述
C99标准忘了定义复杂数字的printf等价物
因为我正在修改复数的lcc-win实现
我决定填补这个漏洞
" Z"
例如
double _Complex m = 2 + 3 * I;
printf("%Zg \ n",m);
将打印
2 + 3 *我
替代标志使其看起来像:
printf("%#Zg \ n",m);
2.00000 + 3.00000i
-
jacob navia
jacob at jacob point remcomp point fr
logiciels / informatique
The C99 standard forgot to define the printf equivalent for complex numbers
Since I am revising the lcc-win implementation of complex numbers
I decided to fill this hole with
"Z"
for instance
double _Complex m = 2+3*I;
printf("%Zg\n",m);
will print
2+3*I
The alternative flag makes this look like:
printf("%#Zg\n",m);
2.00000+3.00000i
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
推荐答案
我不认为这就像那样,雅各布,就像晚餐我一样在Champs d'Elyzee上摄取了
。不同于那些6名厨师2名模具师,他们知道给我带来优质美食,而他们给我喂了一匹马,我要么给我的衬衫口袋或者给我b $ b。在返回酒店途中的人行道上,我实际上预计会吃一顿饭。
我有兴趣尝试新版本的lcc 。
-
Gerry Ford
" Er hat sich georgiert。 Der Spiegel,2008,sich auf Chimpy Eins komma null
beziehend。
I don''t think it''s quite like that, Jacob, much like the dinner I ingested
on the Champs d''Elyzee. Unlike those 6 chefs 2 dieners, who knew to feed my
wife excellent cuisine while they fed me a horse''s willy that I either gave
to my shirt pocket or to the sidewalk on our way back to the hotel, I
actually expected a meal.
I''d be interested to try a new version of lcc.
--
Gerry Ford
"Er hat sich georgiert." Der Spiegel, 2008, sich auf Chimpy Eins komma null
beziehend.
将来,请在发布前清醒。谢谢。
In future, please sober up before posting. Thank you.
这篇关于复数和printf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!