bugGnash - The GNU Flash player - Bugs: bug #19191, Ming gets large number parsing...

 
 

bug #19191: Ming gets large number parsing wrong

Submitter:  Martin Guy <martinwguy>
Submitted:  Sat 03 Mar 2007 02:00:43 PM UTC
   
 
Category:  testsuite Severity:  1 - Wish
Release:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 25 Jul 2007 01:17:54 PM UTC, comment #4: 

Patch was committed.

Sandro Santilli <strk>
Group Member
Thu 17 May 2007 07:27:50 PM UTC, comment #3: 

Patch for Ming has been contributed:

http://bugs.libming.org/show_bug.cgi?id=15

Still not applied though.

Sandro Santilli <strk>
Group Member
Sat 03 Mar 2007 03:33:32 PM UTC, comment #2: 

I wouldn't call this a Ming bug, rather it's a feature request.
Integer numbers in ActionScript are 32bit long, so you do
have to use a float if you want to go over that limit.

The "feature" would be for Ming to take your integer as
a float to help you... anyway the problem will persist
if you go over float boundaries.

Sandro Santilli <strk>
Group Member
Sat 03 Mar 2007 02:07:13 PM UTC, comment #1: 

My mistake. Ming returns large integer constants as 2147483647 (not the difference), but large constants with an explicit ".0" on the end are returned correctly.

trace (946684800000);
trace (946684800000.0);

gives

14:04:26: TRACE: 2147483647
14:04:26: TRACE: 946684800000

Martin Guy <martinwguy>
Sat 03 Mar 2007 02:00:43 PM UTC, original submission:  

Ming's parsing of large integers is broken.

Revealed by:

check(Date.UTC(2000,0,1).valueOf() == 946684800000)
fails although
check(Date.UTC(2000,0,1).valueOf().toString() == "946684800000")
succeeds.

More pointedly:

trace(946684800000)
outputs
13:55:40: TRACE: 944537316353

The difference between the two values is exactly 2147483647 or 2^31-1

Martin Guy <martinwguy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by martinwguy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-07-25 strk Open/ClosedOpen Closed
    2007-07-25 strk StatusNone Fixed
    2007-05-17 strk Severity3 - Normal 1 - Wish

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code