This calculator works only with round numbers

I need help,

This calculator works only with the numbers series, but is this 1.9 * 6 the result is 11.399999999999999 instead of 11.4

Ware is the problem, can it be resolved?

Theanks in advace.

<? XML version = "1.0" encoding = "utf-8"? >

< mx:Application ' xmlns:mx = ' http://www.Adobe.com/2006/MXML "layout =" " vertical " >

< mx:Script >

<! [CDATA]

private function getTotal():Sub

{

var myInt:int = parseInt (input.text);

var myFloat:Number = parseFloat (input.text);

var myNumber:Number = new Number (Input.Text);

var myInt2:int = parseInt (input2.text);

var myFloat2:Number = parseFloat (input2.text);

var myNumber2:Number = new Number (INPUT2. (Text);

total. Data = (myNumber) * (myNumber2);

}

[]] >

< / mx:Script >

< mx:TextInput id=" entry " />

< mx:TextInput id=" INPUT2 " />

< mx:TextInput id=" total " />

< mx:Button " label = ' Button "click ="getTotal ();" />

< / mx:Application >

Welcome to the joys of IEEE 754 floating-point arithmetic. For more fun, try ".1 + 1 - 1»

The simplest answer is probably to limit your result with Number.toFixed (). The answer is not so easy is to write your own class BigDecimal (in Java).

--
Maciek Sakrejda
Truviso, Inc..
www.truviso.com
Truviso recruiting: http://www.truviso.com/company-careers.php?i=87

Tags: Flex

Similar Questions

  • Is - this calculation Manager works only with EPMA?

    It seems calculation Manager works only with EPMA for the application of the classic plsnning, I cannot use the module of business rule and cannot use the Manager of computing to work on business rules, is good? correct me and advise, thank you!

    Sorry I disagree

    You can use the calc for classic version 11.1.1.3 planning
    When you create a planning application in 11.1.1.3 classic, you have the option to choose if you use business rules or calc for the app Manager.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Lightroom works only with reduced funktionality. Develop module is not available.  Adobe can not find the license associated with my Adobe why identification code? Every month I pay an amount for PS and LR...

    After the upgrade to Windows 10 Lightroom works only with reduced funktionality. Develop module is not available.  Adobe can not find the license associated with my Adobe why identification code? I bought the license more than 1 year ago. Every month I pay an amount for PS and LR, and for the past 4 months I can't work. Russian support team cannot solve this problem and sent me here.

    Thank you! I reset my password, the problem was in it.

  • DeskJet 722C works only with Windows 7

    OK, so I applied the DJ_Patch as described. (See http://h30434.www3.hp.com/t5/Printer-All-in-One-Software-and/Deskjet-710-720-810-820-100-Series-prin... ) I have Windows 7, 64-bit and a HP Deskjet 722 C printer.  Tried to print the test page, but received the error from the printer.  Tried to add a printer, you are looking for the 722C, but it is not on the list, even tried to do Windows Update to search for my printer.   Tried to restart, which did not work or the other.  Still get error printer.  I appreciate any other suggestions.  BTW, the printer is connected via a USB to parallel port cable.

    My HP Deskjet 722C now works!  I spent several hours trying different things only to find out it was the cable use to connect the printer to our new computer.  He is there not a lot of info on the package of cable but if you watched closely he said it worked only with Win XP, me and Vista.  Who would have thought that the cable wasn't working with some BONE... me!  Once we went and bought a new cable ($40, Ouch!), we were running a few minutes.  I don't know that a cheaper cable is available online.

    I wanted to post this in the hope of saving someone money, time and frustration on the other.

  • RoboForm does not work with your new browser. It is very fustrating and works only with Windows Explorer. I need to reinstall the old FIREFOX program?

    RoboForm does not work with your new browser. It is very fustrating and works only with Windows Explorer. I need to reinstall the old FIREFOX program?

    RoboForm has already released a version with support for the latest version of Firefox. See http://www.roboform.com/support/news. Try upgrading to the latest version of Roboform.

  • This software works well with Mac to convert EPS files in JPEG files?

    This software works well with Mac to convert EPS files in JPEG files?

    EPS to jpg converter

  • Card USB Reader works only with Windows 7 Final

    My internal card reader is not recognized by Windows 7.  I have uninstalled and installed the drivers of many times without effect.  When I installed the drivers from the website of manufacturers or automatically by Windows, it is not recognized.  After installing it manually through the Device Manager, it is now recognized, but returns the error: this device cannot start. (Code 10).  This device worked perfectly with Vista, Win 7 Beta and Win 7 RC.  The USB port on the card reader works, but not the card reader itself.  Can I use an external card reader and read the card.  The driver is: 6.1.7100.30093 by Realtek.

    Marc and Daniel,
    I solved the problem.  I have checked the connections to the motherboard and swapped USB1 and USB2 connections.  When I reconnected it everything the computer would not start.  I disconnected the connections usb case before and tried and it worked.  It seems that one of the two connections business is bad and the card reader to stop working at the origin.

    Thanks for all your help.
    Ed

  • Windows 7 works only with canon MX 340

    Canon MX 340 printer works only with windows 7.

    Canon MX 340 printer works only with windows 7.

    You mean the Canon PIXMA MX340?

    You have the following drivers installed? :
    http://www.USA.Canon.com/nw3s/CanonUSA/DownloadContents/English/0100461601EN.htm
    (As of 10/23/12)

  • External speakers work only with powerpoint.

    External speakers work only with powerpoint. DVD, internet, music files, are not. They worked for the first few weeks.

    I have a HP dv7-6c27cl with intel core i5 and Windows 7.

    When I have the system check it, it finds no problem.  Apparently, I have the latest drivers. The fact that the speakers work with powerpoint, which is confusing.

    When I play a video file or music, I get an error message: "Windows Media Player has encountered a problem while playing the file."

    The headset works for internet but not DVD.

    I've installed Weatherbug a week ago and had to uninstall other garbage that come with it. I think that's when the problem started.

    Well, I set myself just now. I did a system restore to a point before that I installed Weatherbug, and now everything's fine.

  • PROBLEMA: PHOTOMERGE NOT RUN! AND GET THIS ERROR MESSAGE: ERROR 22 WINDOWS NOT HAS DI A COSTRUTTORE LINEA 388 VAR W = NEW WINDOW (RES) PLEASE, IF POSSIBLE, HELP ME. THIS PROBLEM IS ONLY WITH WINDOWS 10!

    Adobe Photoshop version: 13.0.1 (13.0.1.3 20131024.r.34, 2013/10 / 24:21:00:00) x 64

    Operating system: Windows NT version: 6.2 Architettura di sistema: Famiglia CPU AMD:15, Modello:10, Stepping: 0 con MMX, SSE Intero, SSE FP, SSE2, SSE3

    Fisico processore Conteggio: 6 Velocità processore: 3214 MHz

    PROBLEMA: PHOTOMERGE NOT RUN! AND GET THIS ERROR MESSAGE: ERROR 22 WINDOWS NOT HAS DI A COSTRUTTORE LINEA 388 VAR W = WINDOW (RES) NEW

    PLEASE, IF POSSIBLE, HELP ME. THIS PROBLEM IS ONLY WITH WINDOWS 10!

    Hi biagiob,

    Seems that the operating system is obsolete.

    Photoshop CS6 has not been tested on Windows NT in accordance with this article: Photoshop system requirements

    Suggest you to see this link to the similar problem: Photoshop: Err: "window 22 has no constructor" (Win 7/64 bit)

    Kind regards

    Claes

  • Adobe Acrobat dc works only with Microsoft office 2016

    Adobe Acrobat dc works only with Microsoft office 2016

    Hey Nick Villani,

    Desktop stand 2016 for Windows and MAC OS versions of Acrobat DC will be available in the next major update quarterly Acrobat, tentatively scheduled for October.

    Kind regards

    Ana Maria

  • CS6 Production Premium supports AMD graphics cards? Specifically over-pants M6100. If so, all the features work with the M6100, or are there features that work only with nVidia video cards?

    CS6 Production Premium supports AMD graphics cards? Specifically over-pants M6100. If so, all the features work with the M6100, or are there features that work only with nVidia video cards?

    CS6 does support OpenCL and OpenGL?

    Are all features that CS6 supports for NVidia Cuda available for the M6100 OpenCL?

    Bill supposed to first Pro CC (not CS6) response. Windows of Premiere Pro CS6 version does not support OpenCL for accelerating GPU of MPE. Therefore, there is no "opencl_supported_cards.txt" file in the folder of Premiere Pro, and the code to OpenCL is disabled permanently in all versions of Windows from Premiere Pro CS6. So, for your over-pants M6100 Premiere Pro CS6 will be permanently locked to only software MPE mode. (Acceleration GPU of MSES in the Windows of Premiere Pro CS6 version is limited to the CUDA only, which means that only NVIDIA for GPU - no AMD over-pants or GPU Radeon support CUDA at all.)

  • I have the code for an Adobe Creative Cloud, it is alphanumeric, but the registry works only with numeric codes ¿where I can use my code?

    Hi, I have a problem with code for my Adobe Creative cloud, it is alphanumeric, but the registry works only with numeric codes ¿where I can use my code? is a subscription to creative cloud of throughout the year.

    Probably you have a redemption code... especially if you did not purchase directly from Adobe

    Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

    -or https://forums.adobe.com/thread/1572504

  • Index work only with a column of numbers?

    I created a table with a column of data type such as varchar2

    with index I executed the query
    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 2608167055

    ----------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 8. 2896 | 2 (0) | 00:00:01 |
    |* 1 | TABLE ACCESS FULL | BOPS_1 | 8. 2896 | 2 (0) | 00:00:01 |
    ----------------------------------------------------------------------------


    After creating Btree index on this column I executed the same query


    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 2608167055

    ----------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    ----------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 8. 2896 | 2 (0) | 00:00:01 |
    |* 1 | TABLE ACCESS FULL | BOPS_1 | 8. 2896 | 2 (0) | 00:00:01 |
    ----------------------------------------------------------------------------



    There is no change between these to explain plans, no performance difference?



    is that B-TREE index works well with number data types?



    Thank you
    REDA

    There could be several reasons. After you create the index statistics gather e.g. also maybe your query returns a huge part of table index will be useless. I mean if you ask him % of 80 percent of one table, optimizer will probably not use index. Another reason, perhaps your table is too small, so oracle read both so the whole table, it is not necessary use index. etc...

    It is not on the varchar2 data type, if one of these conditions is tru that whatever your index of data type will not be used.

    Published by: Mustafa KALAYCI on 20.Eki.2010 10:14

  • 4.2 - column link works only with interactive report (IR)

    Greetings-

    I have a screen with an interactive report (IR) and a tabular report on it. There is a radio button used to switch between them, of course, both of them have conditional logic based on this button. If the tabular report is the default value, everything works fine. If the interactive report is the default, then the 'link' on the IR used to display single details comes in white.

    Note that if the IR is by default, but you switch to tabular and then back to IR before trying to put in place the single record view, fine. It's almost as if something is not be instantiated unless the table view is loaded.

    The option button and the two reports are in the same region.

    Anyone has any idea on this?

    Thank you
    Scott

    Published by: DenverScott on April 30, 2013 09:14

    Published by: DenverScott on May 2, 2013 05:31

    OK, I looked inside. It is a common problem, but you have reached a particular example of this, because it seems that you need not the value of P2_REPORT_SELECTOR in your SQL for IR.
    BUT do you it because you have on your health.

    So, there are two simple ways to solve this problem. As I mentioned previously.
    1. you must fill in the field "Page elements must send" in the IR with P2_REPORT_SELECTOR
    I did it.
    What it does it does the value of P2_REPORT_SELECTOR available in persistent session state so that the AJAX call can seen that the condition is met and that the report should be displayed/rendering.

    2. the other option is a calculation on P2_REPORT_SELECTOR who rule on 1 when P2_REPORT_SELECTOR is set to null. I left this calculation, but it set to never right now. It's the same effect net because calculations save values to persistent session state.

    Without the value of P2_REPORT_SELECTOR to persistent session state, the value is only in memory during rendering. That's why the page renders correctly. BUT so that the report to switch to the display of the page one needs to know the value of P2_REPORT_SELECTOR and the value was NOT in permanent session state, therefore not available for the AJAX call, which updates the State.
    Same thing when VC has been sent, it saves the value of P2_REPORT_SELECTOR in persistent session state. Same as switching the button radio.

    I hope this help out you.
    -Jorge

Maybe you are looking for