On Thu, Aug 22, 2013 at 12:26 AM, Irek Szczesniak <[email protected]> wrote: > On Thu, Aug 22, 2013 at 12:03 AM, Glenn Fowler <[email protected]> wrote: >> >> On Wed, 21 Aug 2013 22:24:52 +0200 Tina Harriott wrote: >>> On 21 August 2013 20:02, David Korn <[email protected]> wrote: >>> > cc: [email protected] >>> > Subject: Re: Re: Re: [ast-developers] "${_Bool.true}" not working... / >>> > was: Re: AT&T Software Technology ast alpha software download update >>> > -------- >>> > >>> >> > The reason why I want this to work are references, after which you can >>> >> > no longer differ between plain bool and array element book: >>> >> > ./arch/linux.i386-64/bin/ksh -o nounset -c 'bool -a b=( [4][5]=true ) >>> >> > ; nameref nb=b[4][5] ; print ${nb.true}' >>> >> > ./arch/linux.i386-64/bin/ksh: nb.true: parameter not set >>> >> > >>> >> > /arch/linux.i386-64/bin/ksh -o nounset -c 'bool b ; nameref nb=b ; >>> >> > print ${nb.true}' >>> >> > 1 >>> >> >>> >> Is the next alpha going to fix this? The bug is hurting my ability to >>> >> use the _Bool. >>> >> >>> >> Wendy >>> >> >>> > >>> > The next alpha (not counting the one gsf wants to test without my >>> > changes), allow bool array variables (and name references to them) >>> > to have .enumconstat appended. >> >>> Will num.MIN/.MAX/.EPSILON/.M_PI work in the next alpha, too? The code >>> appears to be almost identical for all those cases... >> >> the libast features/float iffe script will need to provide *_EPSILON >> on systems that don't provide it in <float.h>, and it has to be done >> without the benefit of libast, meaning possibly no hexfloat and most >> likely a printf that does a bad job rounding floating point numbers >> >> anybody have C code that does that sans <float.h> ? > > That's an easy request: http://en.wikipedia.org/wiki/Machine_epsilon
On a 2nd thought, there are only binary16, binary32, binary64, binary128 and the nonstandard x387 binary80 to deal with. libast doesn't support binary16 yet, leaving four formats which can be identified through sizeof and handled with constants embedded in the iffe probe. That might be safer than to trust an algorithm which may fall victim to bizarre compiler optimizations or bugs. Irek _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
