|
From: | Bill Northcott |
Subject: | Re: [Swarm-Support] Followup: found work-around for missing~/swarmarchiver.scm too |
Date: | Thu, 17 Aug 2006 10:12:38 +1000 |
On 16/08/2006, at 4:42 AM, Paul Johnson wrote:
Yesterday I was bug shooting a problem in and older FC4 and found that gcc treats 50 differently than 50.0 when used as a (double) parameter in a draw from a normal distribution, and the value 50 was converted to 0. It does not do that anymore in FC5.
C is a strongly typed language. You can't just feed an integer constant (50) to a function that expects a double and have any guarantee about what will happen. If you need a floating point argument, you have to use a floating point constant (50.0) or cast the integer. I would expect that recent gcc compilers will kick you about this sort of thing, unless of course you have turned the warnings off or just ignored them.
Cheers Bill
[Prev in Thread] | Current Thread | [Next in Thread] |