Too bad there aren't exponents in Flex. I'm not a math wiz but there might
be some method like exponents to convert a large number into a smaller one,
then do your math and convert it back out. Just a random thought.
 
John
[EMAIL PROTECTED]
 

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cameron
Childress
Sent: Friday, April 11, 2008 2:56 PM
To: [email protected]
Subject: Re: [AFFUG Discuss] Problem with large integer numbers


I think this is expected behavior.  From the AS3 docs
http://livedocs.adobe.com/flex/3/html/help.html?content=03_Language_and_Synt
ax_11.html

"When you store integer values with the Number data type, only the 52 bits
of the significand are used. The Number data type uses these 52 bits and a
special hidden bit to represent integers from -9,007,199,254,740,992 (-253)
to 9,007,199,254,740,992 (253)."

17 digit numbers are bigger than that maximum.  If you aren't actually doing
any math on this, could you potentially store it (in Flex) as a string?
That will allow you to do some comparisons, but no math (in Flex).  If all
the calculations are done on the server or in the DB, then you can just pull
it out as a string before sending it to Flex and let Flex just treat it as
string data.

-Cameron

On Fri, Apr 11, 2008 at 1:59 PM, Sydney R. Bennett <[EMAIL PROTECTED]>
wrote:
> 
> Sounds like a bug...I would search for it on the Flex bug list and if you
> don't find anything then create a new bug:
> 
> http://bugs.adobe.com/flex/
> 
> 
> 
> 
> 
> ----- Original Message ----
> From: "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Friday, April 11, 2008 1:50:53 PM
> Subject: Re: [AFFUG Discuss] Problem with large integer numbers
> 
>  
> I am surprised there is no response.    We have a real need for a solution
> to this problem.  Should this probably  be sent to Adobe directly instead
of
> putting it in front of the user group? 
> 
>  
>  Jay Jayaraman
>  Central Billing Services
>  Financial Management and Planning
>  (404) 498-8453 (W)
>  (404) 273-7131 (C) 
>  
>  
>  
>  [EMAIL PROTECTED] 
> Sent by: [EMAIL PROTECTED] 
> 
> 04/08/2008 04:18 PM 
>  
> Please respond to
>  [email protected] 
>  
>  
> To [email protected] 
>  
> cc 
>  
> Subject Re: [AFFUG Discuss] Problem with large integer numbers 
>  
>  
> 
>  
>  
>  
>  
> 
>  Even when I bind this large numbet to TextInput Control, it shows
> 123456789012345768 
>  
>  Here is the code 
>  
>  <?xml version="1.0" encoding="utf-8"?> 
>  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute"
> creationComplete="initApp()"> 
>         <mx:Script> 
>                 <![CDATA[ 
>                         import mx.controls.Alert; 
>                                 [Bindable] 
>                         private        var jdx:Number = 12345678901234567;

>                         private function initApp():void { 
>                                 Alert.show(jdx.toString()); 
>                         } 
>                         
>                 ]]> 
>         </mx:Script> 
>         <mx:TextInput text="{jdx}" /> 
>  </mx:Application> 
>  
>  
>  Jay Jayaraman
>  Central Billing Services
>  Financial Management and Planning
>  (404) 498-8453 (W)
>  (404) 273-7131 (C) 
>  
>  
>  [EMAIL PROTECTED] 
>  Sent by: [EMAIL PROTECTED] 
> 
> 04/08/2008 04:13 PM 
>  
>  
> Please respond to
>  [email protected] 
> 
>  
>  
> To [email protected] 
>  
> cc 
>  
> Subject [AFFUG Discuss] Problem with large integer numbers 
>  
>  
>  
> 
>  
>  
> 
>  
>  
>  
>  Has anybody seen this? 
>  
>  When I stored a 17 digit number in Number type actionscript variable and
> tried to display it using Alert, I got a different number. 
>  
>  Here is the program 
>  
>  <?xml version="1.0" encoding="utf-8"?> 
>  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute"
> creationComplete="initApp()"> 
>        <mx:Script> 
>                <![CDATA[ 
>                        import mx.controls.Alert; 
>                        private function initApp():void { 
>                                var jdx:Number = 12345678901234567; 
>                                Alert.show(jdx.toString()); 
>                        } 
>                        
>                ]]> 
>        </mx:Script> 
>  </mx:Application> 
>  
>  Alert Box shows 12345678901234568 
>  
>  
>  Jay Jayaraman
>  Central Billing Services
>  Financial Management and Planning
>  (404) 498-8453 (W)
>  (404) 273-7131 (C) 
>  ------------------------------------------------------------- 
>  To unsubscribe from this list, simply email the list with unsubscribe in
> the subject line 
>  
>  For more info, see http://www.affug.com 
>  Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
>  List hosted by FusionLink 
>  ------------------------------------------------------------- 
>  
>  ------------------------------------------------------------- 
>  To unsubscribe from this list, simply email the list with unsubscribe in
> the subject line 
>  
>  For more info, see http://www.affug.com 
>  Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
>  List hosted by FusionLink 
>  ------------------------------------------------------------- 
>  
> ------------------------------------------------------------- 
> To unsubscribe from this list, simply email the list with unsubscribe in
the
> subject line 
>  
> For more info, see http://www.affug.com 
> Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
> List hosted by FusionLink 
> ------------------------------------------------------------- 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
>  
> ------------------------------------------------------------- 
> To unsubscribe from this list, simply email the list with unsubscribe in
the
> subject line 
>  
> For more info, see http://www.affug.com 
> Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
> List hosted by FusionLink 
> ------------------------------------------------------------- 



-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell: 678.637.5072
aim: cameroncf
email: [EMAIL PROTECTED]

------------------------------------------------------------- 
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line 

For more info, see http://www.affug.com 
Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 



-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to