Skip to content
Snippets Groups Projects
  • Tom Lane's avatar
    6923d699
    Protect GIST logic that assumes penalty values can't be negative. · 6923d699
    Tom Lane authored
    Apparently sane-looking penalty code might return small negative values,
    for example because of roundoff error.  This will confuse places like
    gistchoose().  Prevent problems by clamping negative penalty values to
    zero.  (Just to be really sure, I also made it force NaNs to zero.)
    Back-patch to all supported branches.
    
    Alexander Korotkov
    6923d699
    History
    Protect GIST logic that assumes penalty values can't be negative.
    Tom Lane authored
    Apparently sane-looking penalty code might return small negative values,
    for example because of roundoff error.  This will confuse places like
    gistchoose().  Prevent problems by clamping negative penalty values to
    zero.  (Just to be really sure, I also made it force NaNs to zero.)
    Back-patch to all supported branches.
    
    Alexander Korotkov