www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - C equivalent for the D "float" type

reply TSalm <TSalm free.fr> writes:
Hello,

What is the C equivalent for the D "float" type ?

Thanks in advance,
TSalm
Sep 18 2009
parent reply div0 <div0 users.sourceforge.net> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

TSalm wrote:
 Hello,
 
 What is the C equivalent for the D "float" type ?
 
 Thanks in advance,
 TSalm

float and double is double. in c, real support is compiler dependant, it may or may not be available. - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFKs/YuT9LetA9XoXwRAg5jAJ98cKfmnt2XfFFODbqbG0CzjN78xACeNWkQ bLYQ4yOZKLSmn8ZNvXXGCX4= =YvgC -----END PGP SIGNATURE-----
Sep 18 2009
parent reply TSalm <TSalm free.fr> writes:
 What is the C equivalent for the D "float" type ?

float and double is double. in c, real support is compiler dependant, it may or may not be available.

Sep 18 2009
parent Jeremie Pelletier <jeremiep gmail.com> writes:
TSalm wrote:
 What is the C equivalent for the D "float" type ?

float and double is double. in c, real support is compiler dependant, it may or may not be available.


Most of the time you'll see D's real type to be declared as 'long double' in C/C++, some compilers such as VC++ understand it to be syntactically different from 'double' but implement it using the same semantics (ie, 64bits).
Sep 20 2009