From 3a99ef322dafcd2cf833b2a0668436ac120df1b3 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 15 Jan 2015 13:52:08 +0000 Subject: 34280: more widespread use of FORCE_FLOAT. Add the case of variables read for use in arithmetic expressions. --- Test/C01arith.ztst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Test') diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst index 8e0730d8d..ea87af257 100644 --- a/Test/C01arith.ztst +++ b/Test/C01arith.ztst @@ -308,3 +308,13 @@ >2 >2 # It's hard to test for integer to float. + + integer ff1=3 ff2=4 + print $(( ff1/ff2 )) + setopt force_float + print $(( ff1/ff2 )) + unsetopt force_float +0:Variables are forced to floating point where necessary +# 0.75 is exactly representable, don't expect rounding error. +>0 +>0.75 -- cgit 1.4.1