Re: The joy of type aliasing and C

"Alen Ladavac" <[email protected]>
Newsgroups gmane.games.devel.general
Message-ID <[email protected]>
>> Generally, trying to look at a float as if it's some kind of a
>> black box that stores real numbers, is kinda silly.
>I think this depends entirely on the application's domain.  A lot of
>applications will merrily use a float and perform floating point
>operations and have no care at all whether the underlying
>implementation is IEEE-754 or some freakish VAX implementation.

True, but I happen to work in such domain that just I have to care. But I
guess we all do. ;)

>You can inspect an implementation's internal representation by using
><float.h> and inspecting the associated predefined constants.  These
<...>
I am aware of that, but I don't find it particularly useful, except for
stuff like: assert(FLT_MANT_DIG>=24). Honestly, have you ever made an app
that dynamically adjust itself depending on number of bits in mantissa? Most
code I see uses things like typedef int INT32; and adjusts it with #ifs for
different platforms. Not to say that a generic int shouldn't be available,
for people that want it, but for sanity sake, standards could just add
int16, int32 etc. and get over with the mess. Am I wrong?

Alen



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.