> Reproducible: Always > Steps to Reproduce: > Run ksh -c 'integer -a z=( [1]=90 ) ; function x { > nameref nz=$1 ; > print " $((log10(nz)))==$((log10($nz)))" ; } ; x > z[1]' > > Actual Results: > The shell will print: > -inf==1.95424250943932487459005580651023 > Expected Results: > The shell should print identical values > 1.95424250943932487459005580651023==1.954242509439324 > 7459005580651023 > > Evaluation: > This bug only happens if the value in the array is > accessed via a > nameref variable, the array index is greater than 0 > and nz is not > dereferenced as string like in the second call to > log10().
Not that I'm much of a shell coder these days, but where have you verified the code? The Ubuntu/Lucid Lynx implementation of ksh gives the same result as on OPpenSolaris_b134: thom...@lucidlynx:~$ ksh -c 'integer -a z=( [1]=90 ) ; function x { nameref nz=$1 ; print " $((log10(nz)))==$((log10($nz)))" ; } ; x z[1]' -inf==1.95424250943932487 thom...@lucidlynx:~$ uname -a Linux lucidlynx 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux thom...@isis:~$ ksh -c 'integer -a z=( [1]=90 ) ; function x { nameref nz=$1 ; print " $((log10(nz)))==$((log10($nz)))" ; } ; x z[1]' -inf==1.95424250943932487 thom...@isis:~$ uname -a SunOS isis 5.11 snv_134 i86pc i386 i86pc -- This message posted from opensolaris.org _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org