CShort Question

General FreeBASIC programming questions.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: CShort Question

Post by lizard »

Yes, it really happened decades ago in USA, AFAIK. It was in the news once. :-)
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: CShort Question

Post by Munair »

lizard wrote:Never trust a computer when it comes to money and floatingpoint calculations. :-)
You can completely trust the computer provided you understand its language. It's binary, so it only understands multiples of two. Hence, by necessity any floating point value will be an approximation matching a multiple of two. Double floating points is one way to deal with this (allowing higher accuracy). Special Currency or Cardinal types is another, with decimals consistently rounded to four digits.
Post Reply