Menu

#216 pctover inconsistent output

closed-fixed
core (120)
5
2009-05-07
2009-04-11
Ben Zhang
No

23 percentile is smaller than 20 percentile:

perldl> $x = sequence(10)
perldl> p $x->pctover(.2)
2
perldl> p $x->pctover(.23)
1.8

pctover(.2) hits one of the special handling code below which is inconsistent with the general interpolation code at the end.
Ufunc.pd: pctover
...
} else if ($p() == pp1) {
$b() = $tmp(n => nn1);
} else if ($p() == pp2) {
$b() = $tmp(n => nn2);
...

$ perldl -V
perlDL shell v1.35
PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file
'COPYING' in the PDL distribution. This is free software and you
are welcome to redistribute it under certain conditions, see
the same file for details.

Summary of my PDL configuration

VERSION: PDL v2.4.4 (supports bad values)

$%PDL::Config = {
'BADVAL_PER_PDL' => '0',
'OPENGL_DEFINE' => '-DGL_MESA_trace -DGLX_ARB_render_texture -DGLX_GLEXT_LEGACY -DGLX_MESA_agp_offset -DGLX_NV_vertex_array_range',
'WITH_PROJ' => undef,
'FFTW_TYPE' => 'double',
'FFTW_LIBS' => [
'/lib',
'/usr/lib',
'/usr/local/lib'
],
'WITH_FFTW' => undef,
'GSL_LIBS' => undef,
'GL_BUILD' => '1',
'WITH_IO_BROWSER' => '0',
'PROJ_INC' => undef,
'WHERE_PLPLOT_INCLUDE' => undef,
'WITH_KARMA' => '0',
'WHERE_KARMA' => undef,
'HTML_DOCS' => '1',
'WHERE_PLPLOT_LIBS' => undef,
'WITH_3D' => '1',
'OPENGL_INC' => '-I/usr/X11R6/include -I/usr/X11R6/include/GL',
'FFTW_INC' => [
'/usr/include/',
'/usr/local/include'
],
'WITH_POSIX_THREADS' => '0',
'HIDE_TRYLINK' => '1',
'WITH_HDF' => undef,
'HDF_INC' => undef,
'OPENGL_LIBS' => '-L/usr/X11R6/lib -L/usr/X11R6/lib/ -L/usr/X11R6/lib -lGLU -lGL -lXext -lX11 -lm',
'WITH_BADVAL' => '1',
'WITH_GD' => undef,
'FITS_LEGACY' => '1',
'WITH_SLATEC' => '1',
'BADVAL_USENAN' => '0',
'TEMPDIR' => '/tmp',
'PROJ_LIBS' => undef,
'GD_LIBS' => undef,
'GSL_INC' => undef,
'GD_INC' => undef,
'OPTIMIZE' => undef,
'WITH_GSL' => undef,
'HDF_LIBS' => undef,
'MALLOCDBG' => {},
'WITH_MINUIT' => '1',
'WITH_PLPLOT' => '0',
'MINUIT_LIB' => undef
};
Summary of my perl5 (revision 5 version 10 subversion 0 patch 34065) configuration:
Platform:
osname=cygwin, osvers=1.5.25(0.15642), archname=cygwin-thread-multi-64int
uname='cygwin_nt-5.1 reini 1.5.25(0.15642) 2008-06-12 19:34 i686 cygwin '
config_args='-de -Dmksymlinks -Dusethreads -Dmad=y -Dusedevel'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -I/usr/local/include',
optimize='-O3',
cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='3.4.4 (cygming special, gdc 0.12, using dmd 0.125)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib
libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
perllibs=-ldl -lcrypt
libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib'

Discussion

  • Chris Marshall

    Chris Marshall - 2009-04-21
    • assigned_to: nobody --> marshallch
    • status: open --> open-accepted
     
  • Chris Marshall

    Chris Marshall - 2009-04-21

    The problem was in the linear interpolation code where one of the weight factors was omitted. A patch will be posted and the fix submitted to git this week. Thanks for reporting the problem.

     
  • Chris Marshall

    Chris Marshall - 2009-04-22

    Bug fixed in CVS.
    Thanks for reporting the problem!

     
  • Chris Marshall

    Chris Marshall - 2009-04-22

    Attached is a patch for the fixes to be applied to PDL git once the transition from CVS to git is complete. The patch should be usable against PDL-2.4.4 source.

     
  • Chris Marshall

    Chris Marshall - 2009-04-22
    • status: open-accepted --> pending-fixed
     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.