From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <23b1f2e6bdd7d080c9c1ce27478716d0@felloff.net> References: <9f4dd8c69f9f67abcba0a3bfc69bfcf9@brasstown.quanstro.net> <23b1f2e6bdd7d080c9c1ce27478716d0@felloff.net> Date: Sun, 13 Sep 2015 18:10:32 +0100 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=f46d04447e35c37ad7051fa40683 Subject: Re: [9fans] kenc vlong double Topicbox-Message-UUID: 6a412ef8-ead9-11e9-9d60-3106f5b1d025 --f46d04447e35c37ad7051fa40683 Content-Type: text/plain; charset=UTF-8 On 13 September 2015 at 15:23, wrote: > the problem is v += d propagates the whole expression > to double. so we somehow need to convert v to double, > do the then convert back but return the double > result. > the type of E1 op=E2 is the same as the type of E1 = E1 op E2, since the expressions are "equivalent" in the sense of language definitions, and has the value (and type) of E1 after the assignment, so the final type is vlong not double (so the type also isn't right). --f46d04447e35c37ad7051fa40683 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On 13 September 2015 at 15:23, <cinap_lenrek@felloff.net> wrote:
the problem is v +=3D d propagates the whole e= xpression
to double. so we somehow need to convert v to double,
do the <asop> then convert back but return the double
result.

the type of E1 op=3DE2 is the same as t= he type of E1 =3D E1 op E2,
since the expre= ssions are "equivalent" in the sense of language definitions,
and has the value (and type) of E1 after the a= ssignment,
so the final type is vlong not d= ouble (so the type also isn't right).
--f46d04447e35c37ad7051fa40683--