From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Sun, 13 Sep 2015 11:28:40 -0700 To: 9fans@9fans.net Message-ID: In-Reply-To: References: <52607cb8b4723e1490f67b6451fc4ef5@felloff.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] kenc vlong double Topicbox-Message-UUID: 6a61571e-ead9-11e9-9d60-3106f5b1d025 > On 13 September 2015 at 19:21, erik quanstrom wrote: > > > isn't the && !mixedasop() added to the condition the problem: > > the cast should not be elided if it's a float/double. t > > > > the test is correct, because in mixed-mode assignment, you want to do the > calculation in float/double, > then convert it to the integer type, not convert the rhs float/double to > the integer type at the start. > ie, I += D is I = I+D which is I = (double)I + D, not I += (int)D; ah, you're right. - erik