On Tue, 3 Sep 2013 04:35:56 +0200 Tina Harriott wrote: > The arithmetic function int() does not work in sh (AT&T Research) 93v- > 2013-08-27
> I get this: > ksh -c 'print -- $(( log2( int(pow(2,69) )) ))' > 69 > But it should print 'nan', as it does if I use explicitly an > intermediate integer variable: > ksh -c 'integer i; print -- $(( i=pow(2,69) , log2(i) ))' > nan in ksh93 the int() arith function is an alias for the shell floor() which calls the C library floorl() (or floor() if long double not available) C floor() has no "too big to fit in C integral value" error if int(f) is supposed to act like the C cast (int)f then the ksh int() needs to be its own function that implements the cast (ksh_int_type)f _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
