On Saturday 29 September 2001 04:45, Gibbs Tanton - tgibbs wrote:
In perl sin(1) != sin(1.0) or in C or in both?
Also, what version of the OS is this, SunOS 5.8 works fine.
Perl equal and C not equal, that is.
bash-2.03$ perl -le 'if(sin(1) == sin(1.0)){print equal}else{print not equal}'
equal
bash-2.03$ ./sin
not equal
bash-2.03$ cat sin.c
# include math.h
int
main()
{
if(sin(1) == sin(1.0))
{
printf(equal\n);
}
else
{
printf(not equal\n);
}
return(1);
}
bash-2.03$ uname -a
SunOS usf-cf-sparc-solaris-2 5.8 Generic_108528-09 sun4u sparc SUNW,Ultra-60
bash-2.03$ perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris
uname='sunos localhost 5.8 sun4u sparc sunw,ultra-1 '
hint=previous, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-xO3 -xdepend', gccversion=
cppflags=''
ccflags =''
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R
/usr/perl5/5.00503/sun4-solaris/CORE'
cccdlflags='-KPIC', lddlflags='-G'
Characteristics of this binary (from libperl):
Built under solaris
Compiled at Dec 22 1999 00:00:57
@INC:
/usr/perl5/5.00503/sun4-solaris
/usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris
/usr/perl5/site_perl/5.005
.