Re: [fun] unsigned int is not big enough (was: lfs-chat Digest, Vol 1288, Issue 1)

[email protected]
Newsgroups gmane.linux.lfs.general
Message-ID <1353593263.5696661347189228197.JavaMail.root@dsmdc-mail-mbs4>
While I agree float is not exact I'm not sure what is being calculated needs exact precision.


----- Original Message -----
From: "Andy Bennett" <[email protected]>
To: [email protected]
Sent: Saturday, September 8, 2012 8:37:49 AM GMT -06:00 US/Canada Central
Subject: Re: [fun] unsigned int is not big enough (was: lfs-chat Digest, Vol 1288, Issue 1)

Hi,

> Use unsigned long long or float.

float is not exact.

(un)signed long long is the one to use. Avoid floating point arithmetic:
stick to integer or fixed point. You still have to be careful with
rounding when you divide. ;-)





Regards,
@ndy

-- 
[email protected]
http://www.ashurst.eu.org/
0x7EBA75FF

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page
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.