On Tue, Feb 27, 2007 at 09:35:49AM -0800, Geoffrey Broadwell wrote: : On Tue, 2007-02-27 at 09:20 -0800, Geoffrey Broadwell wrote: : > How is casting and coersion handled with expressions involving mixed low : > and high level types? : > : > For example, what is the output of this? : > : > my Int $ten = 10; : > my int4 $a = 0; : > my int4 $b; : > : > $b = ($a + 2.4 * $ten) / 4; : > say $b; : > : > The answers to the above questions may alter my view on the proper : > handling of overflow during casting/coersion. : : And for those who think the above code is too easy -- and I can see at : least 1, 2, 5, and 6 as defensible answers -- try 2.8 instead of 2.4.
I think either 5 or 6 is correct. See the recent S09 update. Larry