Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers LCC > Complex numbers...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 28 Topic 1026 of 1062
Post > Topic >>

Complex numbers and printf

by jacob navia <jacob@[EMAIL PROTECTED] > Feb 29, 2008 at 10:34 AM

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
 




 28 Posts in Topic:
Complex numbers and printf
jacob navia <jacob@[EM  2008-02-29 10:34:17 
Re: Complex numbers and printf
spambait@[EMAIL PROTECTED  2008-02-29 13:23:35 
Re: Complex numbers and printf
jacob navia <jacob@[EM  2008-02-29 15:50:17 
Re: Complex numbers and printf
"Joachim Schmitz&quo  2008-02-29 16:00:46 
Re: Complex numbers and printf
jacob navia <jacob@[EM  2008-02-29 16:03:15 
Re: Complex numbers and printf
Richard Heathfield <rj  2008-02-29 15:10:28 
Re: Complex numbers and printf
"Joachim Schmitz&quo  2008-02-29 16:02:29 
Re: Complex numbers and printf
jacob navia <jacob@[EM  2008-02-29 16:05:36 
Re: Complex numbers and printf
Nelu <spamahead@[EMAIL  2008-02-29 16:08:59 
Re: Complex numbers and printf
Nelu <spamahead@[EMAIL  2008-02-29 17:44:05 
Re: Complex numbers and printf
Nelu <spamahead@[EMAIL  2008-02-29 16:08:58 
Re: Complex numbers and printf
Keith Thompson <kst-u@  2008-02-29 08:16:55 
Re: Complex numbers and printf
roberson@[EMAIL PROTECTED  2008-02-29 17:38:01 
Re: Complex numbers and printf
"Serve Laurijssen&qu  2008-03-01 09:13:41 
Re: Complex numbers and printf
David Thompson <dave.t  2008-03-10 01:38:30 
Re: Complex numbers and printf
CBFalconer <cbfalconer  2008-02-29 10:28:47 
Re: Complex numbers and printf
roberson@[EMAIL PROTECTED  2008-02-29 18:11:21 
Re: Complex numbers and printf
jacob navia <jacob@[EM  2008-02-29 19:23:42 
Re: Complex numbers and printf
roberson@[EMAIL PROTECTED  2008-03-01 03:51:32 
Re: Complex numbers and printf
roberson@[EMAIL PROTECTED  2008-02-29 17:01:15 
Re: Complex numbers and printf
lawrence.jones@[EMAIL PRO  2008-02-29 11:14:42 
Re: Complex numbers and printf
"Bartc" <bc@  2008-02-29 18:39:48 
Re: Complex numbers and printf
Morris Dovey <mrdovey@  2008-02-29 12:56:36 
Re: Complex numbers and printf
burton.samogradNOSP@[EMAI  2008-02-29 14:06:58 
Re: Complex numbers and printf
Morris Dovey <mrdovey@  2008-02-29 14:55:30 
Re: Complex numbers and printf
burton.samogradHEY@[EMAIL  2008-02-29 17:10:08 
[OT] Re: Complex numbers and printf
Eric Sosman <Eric.Sosm  2008-02-29 15:31:38 
Re: Complex numbers and printf
Martin Ambuhl <mambuhl  2008-02-29 14:00:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 20:11:15 CDT 2008.