Status: New
Owner: ----

New issue 1974 by [email protected]: Re: Issue 115790 in chromium: JavaScript issue. Result different from expected
http://code.google.com/p/v8/issues/detail?id=1974

Reported by [email protected], Yesterday (17 hours ago)

Chrome Version       : <Copy from: 'about:version'>
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
Firefox 4.x:
IE 7/8/9:

What steps will reproduce the problem?

<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <script>

            function sortNumber(a,b)
            {
                return a - b;
            }

            var r = [];

            for (var b = 2; b <= 100; b++)
            {
                for (var a = 2; a <= 100; a++) r.push(Math.pow(a,b));
            }

            r.sort(sortNumber);

            var count = 0;

            for (var i = 0; i < r.length; i++)
            {
                if ((i == 0) || (r[i] > r[i-1])) count++;
            }

            document.write(count);
        </script>
    </body>
</html>


What is the expected result?

9183

What happens instead?

9220

Please provide any additional information below. Attach a screenshot if
possible.

Euler - problem 29

Comment 1 by [email protected], Yesterday (16 hours ago)

This looks like a pure Javascript issue.  Chrome uses V8 for Javascript.
Probably should be reported to http://code.google.com/p/v8/issues



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to