Re: [ast-users] NaN and their payloads

2013-09-03 Thread Glenn Fowler
I'm aware of NaN payload but have not seen C code that * has MIN/MAX macros for the min/max payload value for a give FP type * sets a NaN value with a specific payload * extracts a payload from a NaN are there standard api's for this? for the casual reader, comparisons on

[ast-users] Strange behavior of typeset -En; precision of FP variables

2013-09-03 Thread PHILIPP, Axel, Dr.
Who can explain this strange behavior of typeset (-l) -En? For me it looks like a bug. echo 2^69 | bc 590295810358705651712 /bin/ksh -c 'typeset -l -E18 x;x=$(( pow(2,69) ));echo $x' 5.90295810358705652e+20 /bin/ksh -c 'typeset -l -E19 x;x=$(( pow(2,69) ));echo $x' 5.90295810358705652e+20

Re: [ast-users] [ast-developers] arithmetric function int() does not work

2013-09-03 Thread Glenn Fowler
On Tue, 3 Sep 2013 04:35:56 +0200 Tina Harriott wrote: The arithmetic function int() does not work in sh (ATT 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