Skip to content

Incorrect sorting on large arrays when doubles are all integral. #11

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Perform a sort of sufficient size that LARGE_SORT is used.  Keys-only or 
keys with values will reproduce this issue.
2. Have the keys be doubles, but all of them be integers.
3. A basic example I use is the natural numbers decreasing from 1000000 to 1.

What is the expected output? What do you see instead?

I expect to see the numbers 1 through to 1000000 in increasing order.  I 
instead see negative numbers for the sorted keys.

What version of the product are you using? On what operating system?

Version v1.0.655 (SVN r655).  Windows 8 64-bit, targeting 64-bit, 
compute_13,sm_13.  Running on NVidia GEForce GTX 580.


Please provide any additional information below.

I have an (inelegant) workaround of multiplying all numbers by some number 
(7.76345621464357) before sorting, and dividing again afterwards, for problem 
sizes over 100,000.  This is of course not ideal - speed, roundoff, etc :).


Original issue reported on code.google.com by marksi...@gmail.com on 18 Feb 2013 at 9:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions