Mailing List Archive

BUG in '**' operator?
Re: BUG in '**' operator? [ In reply to ]
On Thu, 14 Dec 1995 14:00:10 +0100, Steffen Beyer wrote:
>
>5 bits (2**5) = 32
>30
>31
>32 <--------- !!!!!
>
>6 bits (2**6) = 64
>62
>63
>64 <--------- !!!!!
[..]
>
>The oddest fact of all is that this bug only shows on a HP, but not on a
>SUN!!!

Hint: ** is implemented via pow(double, double).

- Sarathy.
gsar@engin.umich.edu
Re: BUG in '**' operator? [ In reply to ]
> Recently, I was very surprised to discover that a series of tests for a module
> I'm currently writing went through without any problems on a SUN SPARCstation
> 20/61 but failed on the 5th test of a series (always the same test but with
> increasing number of bits) on an HP 9000.

This works fine on 5.001m++ and 5.002b1f under HP-UX 9.05. It does not
produce the extra bogus lines. Time to start comparing config.sh's?

Jeff
Re: BUG in '**' operator? [ In reply to ]
In article <199512141805.AA028014354@hpcc123.corp.hp.com>, Jeff Okamoto (okamoto@hpcc123.corp.hp.com) wrote:
> > Recently, I was very surprised to discover that a series of tests for a module
> > I'm currently writing went through without any problems on a SUN SPARCstation
> > 20/61 but failed on the 5th test of a series (always the same test but with
> > increasing number of bits) on an HP 9000.

> This works fine on 5.001m++ and 5.002b1f under HP-UX 9.05. It does not
> produce the extra bogus lines. Time to start comparing config.sh's?

I suppose, yes.

> Jeff

Here's mine:

-------------------- cut here -------------------- cut here --------------------
#!/bin/sh
#
# This file was produced by running the Configure script. It holds all the
# definitions figured out by Configure. Should you modify one of these values,
# do not forget to propagate your changes by running "Configure -der". You may
# instead choose to run each of the .SH files by yourself, or "Configure -S".
#

# Configuration time: Thu Oct 19 11:38:24 MEZ 1995
# Configured by: root
# Target system: hp-ux hp a.09.00 e 9000887 400504202 8-user license

Author='sb@sdm.de'
Date='$Date'
Header=''
Id='$Id'
Locker=''
Log='$Log'
Mcc='Mcc'
RCSfile='$RCSfile'
Revision='$Revision'
Source=''
State=''
afs='false'
alignbytes='8'
aphostname=''
archlib='/opt/lib/perl5.001m/hpux'
archlibexp='/opt/lib/perl5.001m/hpux'
archname='hpux'
awk='awk'
baserev='5.0'
bash=''
bin='/opt/pkg/perl5.001m/bin'
binexp='/opt/pkg/perl5.001m/bin'
bison=''
byacc='byacc'
byteorder='4321'
c='\c'
castflags='0'
cat='cat'
cc='cc'
cccdlflags='+z'
ccdlflags='-Wl,-E '
ccflags='-D_POSIX_SOURCE -D_HPUX_SOURCE -Aa'
cf_by='root'
cf_time='Thu Oct 19 11:38:24 MEZ 1995'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm='comm'
compress=''
contains='grep'
cp='cp'
cpio=''
cpp='cpp'
cpp_stuff='42'
cppflags='-D_POSIX_SOURCE -D_HPUX_SOURCE -Aa'
cpplast='-'
cppminus='-'
cpprun='cc -E'
cppstdin='cc -E'
cryptlib=''
csh='csh'
d_Gconvert='gcvt((x),(n),(b))'
d_access='define'
d_alarm='define'
d_archlib='define'
d_attribut='undef'
d_bcmp='define'
d_bcopy='define'
d_bsd='define'
d_bsdpgrp='undef'
d_bzero='define'
d_casti32='undef'
d_castneg='define'
d_charvspr='undef'
d_chown='define'
d_chroot='define'
d_chsize='undef'
d_closedir='define'
d_const='define'
d_crypt='define'
d_csh='define'
d_cuserid='define'
d_dbl_dig='define'
d_difftime='define'
d_dirnamlen='define'
d_dlerror='undef'
d_dlopen='undef'
d_dlsymun='undef'
d_dosuid='undef'
d_dup2='define'
d_eunice='undef'
d_fchmod='define'
d_fchown='define'
d_fcntl='define'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
d_fgetpos='define'
d_flexfnam='define'
d_flock='undef'
d_fork='define'
d_fpathconf='define'
d_fsetpos='define'
d_getgrps='define'
d_gethent='define'
d_gethname='undef'
d_getlogin='define'
d_getpgrp2='define'
d_getpgrp='define'
d_getppid='define'
d_getprior='define'
d_htonl='define'
d_index='undef'
d_isascii='define'
d_killpg='undef'
d_link='define'
d_locconv='define'
d_lockf='define'
d_lstat='define'
d_mblen='define'
d_mbstowcs='define'
d_mbtowc='define'
d_memcmp='define'
d_memcpy='define'
d_memmove='define'
d_memset='define'
d_mkdir='define'
d_mkfifo='define'
d_mktime='define'
d_msg='define'
d_msgctl='define'
d_msgget='define'
d_msgrcv='define'
d_msgsnd='define'
d_mymalloc='define'
d_nice='define'
d_oldsock='undef'
d_open3='define'
d_pathconf='define'
d_pause='define'
d_phostname='undef'
d_pipe='define'
d_portable='define'
d_pwage='define'
d_pwchange='undef'
d_pwclass='undef'
d_pwcomment='define'
d_pwexpire='undef'
d_pwquota='undef'
d_readdir='define'
d_readlink='define'
d_rename='define'
d_rewinddir='define'
d_rmdir='define'
d_safebcpy='define'
d_safemcpy='undef'
d_seekdir='define'
d_select='define'
d_sem='define'
d_semctl='define'
d_semget='define'
d_semop='define'
d_setegid='undef'
d_seteuid='undef'
d_setlinebuf='undef'
d_setlocale='define'
d_setpgid='define'
d_setpgrp2='define'
d_setpgrp='define'
d_setprior='define'
d_setregid='undef'
d_setresgid='define'
d_setresuid='define'
d_setreuid='undef'
d_setrgid='undef'
d_setruid='undef'
d_setsid='define'
d_shm='define'
d_shmat='define'
d_shmatprototype='define'
d_shmctl='define'
d_shmdt='define'
d_shmget='define'
d_shrplib='undef'
d_sitelib='undef'
d_socket='define'
d_sockpair='define'
d_statblks='define'
d_stdio_cnt_lval='define'
d_stdio_ptr_lval='define'
d_stdiobase='define'
d_stdstdio='define'
d_strchr='define'
d_strcoll='define'
d_strctcpy='define'
d_strerrm='strerror(e)'
d_strerror='define'
d_strxfrm='define'
d_suidsafe='undef'
d_symlink='define'
d_syscall='define'
d_sysconf='define'
d_sysernlst=''
d_syserrlst='define'
d_system='define'
d_tcgetpgrp='define'
d_tcsetpgrp='define'
d_telldir='define'
d_time='define'
d_times='define'
d_truncate='define'
d_tzname='define'
d_umask='define'
d_uname='define'
d_vfork='undef'
d_void_closedir='undef'
d_voidsig='define'
d_voidtty=''
d_volatile='define'
d_vprintf='define'
d_wait4='undef'
d_waitpid='define'
d_wcstombs='define'
d_wctomb='define'
d_xenix='undef'
date='date'
db_hashtype='int'
db_prefixtype='int'
defvoidused='15'
direntrytype='struct dirent'
dlext='sl'
dlsrc='dl_hpux.xs'
dynamic_ext='Fcntl POSIX SDBM_File Socket'
echo='echo'
egrep='egrep'
emacs=''
eunicefix=':'
expr='expr'
extensions='Fcntl POSIX SDBM_File Socket'
find='find'
flex=''
fpostype='fpos_t'
freetype='void'
full_csh='/bin/csh'
full_sed='/bin/sed'
gcc=''
gccversion=''
gidtype='gid_t'
glibpth='/usr/shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/local/lib '
grep='grep'
groupcat=''
groupstype='gid_t'
h_fcntl='false'
h_sysfile='true'
hint='previous'
hostcat='cat /etc/hosts'
huge=''
i_bsdioctl=''
i_db='undef'
i_dbm='undef'
i_dirent='define'
i_dld='undef'
i_dlfcn='undef'
i_fcntl='undef'
i_float='define'
i_gdbm='undef'
i_grp='define'
i_limits='define'
i_malloc='define'
i_math='define'
i_memory='undef'
i_ndbm='undef'
i_neterrno='undef'
i_niin='define'
i_pwd='define'
i_sgtty='undef'
i_stdarg='define'
i_stddef='define'
i_stdlib='define'
i_string='define'
i_sysdir='define'
i_sysfile='define'
i_sysfilio='undef'
i_sysin='undef'
i_sysioctl='define'
i_sysndir='undef'
i_sysparam='define'
i_sysselct='undef'
i_syssockio=''
i_sysstat='define'
i_systime='define'
i_systimek='undef'
i_systimes='define'
i_systypes='define'
i_termio='undef'
i_termios='define'
i_time='undef'
i_unistd='define'
i_utime='define'
i_varargs='undef'
i_varhdr='stdarg.h'
i_vfork='undef'
incpath=''
inews=''
installarchlib='/opt/lib/perl5.001m/hpux'
installbin='/opt/pkg/perl5.001m/bin'
installman1dir='/opt/pkg/perl5.001m/man/man1'
installman3dir='/opt/pkg/perl5.001m/man/man3'
installprivlib='/opt/lib/perl5.001m'
installscript='/opt/pkg/perl5.001m/bin'
installsitelib=''
intsize='4'
known_extensions='DB_File Fcntl GDBM_File NDBM_File ODBM_File POSIX SDBM_File Socket'
ksh=''
large=''
ld='ld'
lddlflags='-b'
ldflags=''
less=''
libc='/lib/libc.sl'
libpth=' '
libs='-lm -ldld'
libswanted='m dld'
line='line'
lint=''
lkflags=''
ln='ln'
lns='/bin/ln -s'
lp=''
lpr=''
ls='ls'
lseektype='off_t'
mail=''
mailx=''
make=''
mallocobj='malloc.o'
mallocsrc='malloc.c'
malloctype='void *'
man1dir='/opt/pkg/perl5.001m/man/man1'
man1direxp='/opt/pkg/perl5.001m/man/man1'
man1ext='1'
man3dir='/opt/pkg/perl5.001m/man/man3'
man3direxp='/opt/pkg/perl5.001m/man/man3'
man3ext='3'
medium=''
mips=''
mips_type=''
mkdir='mkdir'
models='none'
modetype='mode_t'
more=''
mv=''
myarchname='9000/887-hpux'
mydomain=''
myhostname='hp'
myuname='hp-ux hp a.09.00 e 9000887 400504202 8-user license '
n=''
nm_opt=''
nroff='nroff'
optimize='+O1'
orderlib='false'
osname='hpux'
osvers='9'
package='perl5'
passcat=''
patchlevel='1'
perl='perl'
pg=''
phostname='hostname'
plibpth=''
pmake=''
pr=''
prefix='/opt/pkg/perl5.001m'
prefixexp='/opt/pkg/perl5.001m'
privlib='/opt/lib/perl5.001m'
privlibexp='/opt/lib/perl5.001m'
prototype='define'
randbits='15'
ranlib=':'
rm='rm'
rmail=''
runnm='true'
scriptdir='/opt/pkg/perl5.001m/bin'
scriptdirexp='/opt/pkg/perl5.001m/bin'
sed='sed'
selecttype='int *'
sendmail=''
sh=''
shar=''
sharpbang='#!'
shmattype='void *'
shrpdir='none'
shsharp='true'
sig_name='ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CLD PWR VTALRM PROF IO WINCH STOP TSTP CONT TTIN TTOU'
signal_t='void'
sitelib=''
sitelibexp=''
sizetype='size_t'
sleep=''
smail=''
small=''
so='sl'
sockethdr=''
socketlib=''
sort='sort'
spackage='Perl5'
spitshell='cat'
split=''
ssizetype='ssize_t'
startsh='#!/bin/sh'
static_ext=' '
stdchar='unsigned char'
stdio_base='((fp)->_base)'
stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)'
stdio_cnt='((fp)->_cnt)'
stdio_ptr='((fp)->_ptr)'
strings='/usr/include/string.h'
submit=''
sysman='/usr/man/man1'
tail=''
tar=''
tbl=''
test='test'
timeincl='/usr/include/sys/time.h '
timetype='time_t'
touch='touch'
tr='tr'
troff=''
uidtype='uid_t'
uname='uname'
uniq='uniq'
usedl='define'
usemymalloc='y'
usenm='true'
useposix='true'
usevfork='false'
usrinc='/usr/include'
uuname=''
vi=''
voidflags='15'
xlibpth='/usr/lib/386 /lib/386'
zcat=''
PATCHLEVEL=1
CONFIG=true
# Variables propagated from previous config.sh file.
POSIX_cflags='ccflags="$ccflags -DFLT_MIN=1.17549435E-38"'
-------------------- cut here -------------------- cut here --------------------

(I ran Configure twice - once to get the defaults, then I edited
config.sh to get the paths right and then again to check if all the
answers were correct now)

Any help greatly appreciated!!!!!

Yours,
--
Steffen Beyer
mailto:sb@sdm.de |s |d &|m | software design & management GmbH&Co.KG
phone: +49 89 63812-244 | | | | Thomas-Dehler-Str. 27
fax: +49 89 63812-150 | | | | 81737 Munich, Germany.
Re: BUG in '**' operator? [ In reply to ]
In article <199512141649.LAA21473@aatma.engin.umich.edu>,
Gurusamy Sarathy (gsar@engin.umich.edu) wrote:

> Hint: ** is implemented via pow(double, double).

Thank you very much!!!!!

I suppose that's the reason why!

Please excuse the delay, I was busy with tasks here at the company.

Kind regards,
--
Steffen Beyer
mailto:sb@sdm.de |s |d &|m | software design & management GmbH&Co.KG
phone: +49 89 63812-244 | | | | Thomas-Dehler-Str. 27
fax: +49 89 63812-150 | | | | 81737 Munich, Germany.