12.3 - 12.3  is not equal to 0??

I am trying to calculate the result of two Numbers
((Float)f).floatValue() - ((Double)d).doubleValue(), where f is equal to d.
However the result is not equal to zero.
I've tried to print out (12.3f - 12.3d) the result is not equal to zero too. I think it is a bug when Java do type promotion, right?
How can I get around of it?
Germen

abs( a - b ) < delta,The problem with comparing numbers that way is that delta doesn't scale as a and b scale. The delta required when a and b are near 1e-10 is quite different form that when they are 1e10.
A better way to write an inexact comparison is:
a == b || abs(a - b) < max(a, b) * delta
This improved code also handles infinities and zeroes correctly as well as scaling as a and b scale.
Knuth gives a much more rigorous definition of inexact floating point comparison in The Art of Computer Programming.

Similar Messages

  • Is not equal to operator not working properly in obiee 11g

    Hi ,
    I have 5 members in a dimesion ENTITY.gen5 (A,B,C,D,E) .
    nOW , I am using a *"is equal to "* operator in that ,
    ENTITY.gen5 = A;B .
    Which results in a strange error while running the report :
    Socket communication error : was attempted on somthing which is not socket .
    or sometimes ,
    Socket communication error : Oracle BI server is not currently running .
    So , I tried with giving "is not equal to" i.e . ENTITY.gen5 != C;D;E .
    Then , I am getting A,B,C . C is not desired here .
    FYI , I have renamed ENTITY.gen5 member names in essbase once and after refreshing I tried the above .
    OBIEE version : 11.1.1.6
    essbase version : 11.1.2.1
    Thanks in advance

    In EM, go to Weblogic Domain, right click on bifoundation_domain and on the Security menu choose Application Policies.
    Set Application Stripe to obi and click the blue arrow search button.
    Highlight BIConsumer and click Edit.
    Under Permissions locate Resource Name oracle.bi.publisher.scheduleReport. Highlight this and click Delete...
    Click OK (top right corner).
    Now log your user out of OBIEE and back in again, and the option should have disappeared from their New menu.

  • Not Equals Function is not working in Mapping

    Hi All,
    i have to do mappig based on the Not Equals & And conditions
    If the Material Group starts with "F"
                            And Material Type Not Equals to "ZPRO" means
                                        then send "FG" Else "FC"
    Here Not Equals & And Functions are not giving success, Error throwing like
    Cannot cast ZPRO to boolean] in class com.sap.aii.mappingtool.flib3.Bool method not[ZPRO
    Please help in this
    Regards

    i have to do mappig based on the Not Equals & And conditions
    If the Material Group starts with "F"
    And Material Type Not Equals to "ZPRO" means
    then send "FG" Else "FC"
    Here Not Equals & And Functions are not giving success, Error throwing like
    Cannot cast ZPRO to boolean] in class com.sap.aii.mappingtool.flib3.Bool method not[ZPRO
    the logic applied is incorrect
    NotEquals is a boolean function meaning it will accept only boolean values as input....
    To check if the Material Number is ZPRO or not use the below logic
    MaterialNumber                                            Then(FG)
                          ------equalS(TextFunction) ---- not -----ifWithElse ------------------ Target
    Constant (ZPRO)                                                   Else(FC)
    Regards,
    Abhishek.

  • HOW TO BLOCK DELIVERY OF GOODS WHICH ARE NOT EQUAL TO SALES ORDER

    Hi,
    I want to block user to create any sales invoice for some customers based on  sales order where quantity in sales order is not equal to invoice.
    Thanks,
    Anitha

    Hi Anitha,
    You can do this by selecting check marks on two field under BP Master data >>Payment Terms
    1) Allow Partial Delivery of Sales Order
    2) Allow Partial Delivery per row.
    Thanks,
    Regards,
    Sudhir

  • Is BDC's CALL TRANSACTION 'VA01' is not equals to ONLINE(manual) creation?

    Hi Experts,
    Ours is IS-Oil.
    If the user do not enters/inputs OIC_MOT (Mode Of Transport) at ITEM level on the External Details popup, SAP will get it from Customar Master-KNA1 and populates on it, because its a mandatory field (OIC_MOT), but, do not throws an Error message and interupts the sales order creation process.
    We have a inbound IDOC posting function module for sales order (VA01), which posts the sales oreders by using BDC (CALL TRANSACTION 'VA01') in the system. In this function module, we are not populating the OIC_MOT field contained segment by hoping SAP will populate/default it while it hits CALL TRANSACTION 'VA01' of my BDC of my FM of IB IDOC. But, SAP is not defaulting/populating and throwing error message (saying 'OIC_MOT field is a mandatory input field' data is missing) and IDOC is failing, pls. let me know Wht its so? is the BDC's CALL TRANSACTION 'VA01' is not equals to ONLINE (manual ) creation of sales order?
    Thank you

    Hi
    Several transactions can ba a different behavior between online and bdc process, but if you simulate the trx by SM35 you should find out these gaps
    I don't know OIL vertical, but the main transactions have a bapi can be used insted of BDC program (BAPI_SALESORDER_CREATEFROMDAT2, but perhaps there's a particular BAPI for OIL).
    Max

  • Not Equal to Clause in BODS

    Hello Experts -
    I need to put this condition in transformation  in BODS  table1.col 1 Not Equal to table2.col2 .
    I am not able to find NOT EQUAL TO clause in BODS. I have used  !=  , But  not working.
    However equal to (=) is working fine.
    Any suggestion how I can use not equal to ? (I want it in Where Tab)
    Thanks
    R

    Rohan, please pull/drag your columns into where clause. do not simply write them. and for your condition chk it with " <> " .
    hth
    thx
    deep

  • Succession of TaskSelectionEvent.getTaskIds is not equal to user selection

    Dear all,
    My configuration is JDev 11g R1 (11.1.1.4.0) and I'm currently working at ADF DVT Project Gantts.
    At the moment a problem occurs within the TaskSelectionEvent: The order of the task Ids coming back from TaskSelectionEvent.getTaskIds are not equal to the order of my selection. I 'm selecting first task A and then task B. The method give back [B, A].
    The code snippets based on the Oracle ADF faces demo:
    JSP:
    <dvt:projectGantt id="mygantt" startTime="2008-01-01"
    endTime="2011-12-31" var="task"
    value="#{PG.model}"
    tooltipKeys="#{PG.tooltipKeys}"
    tooltipKeyLabels="#{PG.tooltipLabels}"
    dataChangeListener="#{PG.handleDataChanged}"
    actionListener="#{PG.handleAction}"
    partialTriggers="ctb2"
    taskSelectionListener="{PG.handleSelectedTask}">
    </dvt:projectGantt>
    Java:
    private List selectedTaskIds;
    public void handleSelectedTask(TaskSelectionEvent evt)
    selectedTaskIds = evt.getTaskIds();
    What am I doing wrong?
    Thank you in advance.
    Best regards,
    Tom

    For the use case where tasks need to be linked (user clicks the "Link" icon in toolbar after selecting tasks), getTaskIds() in handleDataChanged() would return ids in the order tasks were selected.

  • OBIEE Answe: Error when using "is not equal to/is not in" option in filters

    Hi there,
    I have a report with a column that uses EVALUATE function. I want to filter the results of the report by the values of this column. There's no problem when I use "is equal to/is in" option in the filter options. However with everything the same, when I try to apply "is not equal to/is not in" option I got an error message reading :
    "Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value @{pv_Period_End}{@{system.currentTime}[YYYY-MM-DD]} from @{pv_Period_End}{@{system.currentTime}[YYYY-MM-DD]} does not match the specified format. (HY000)"
    The column is the following funciton:
    CAST(EVALUATE('pob.Get_PP_Status(%1, %2)',"ПРЕПИСКА".PP_ID, DATE '@{pv_Period_End}{@{system.currentTime}[YYYY-MM-DD]}' ) AS CHAR(500))
    Do you any ideas where the problem might be?
    Kind regards,
    Danail

    Thru note 1909504 the Function Module FI_TAX_CALCULATION was changed and caused the error on the system of my customer.
    Hope that helps.
    Regards
    Udo

  • Unable to Create "Not Equal to" condition in Variable creation

    Hi ,
    I am getting an error while creating variable at report level,
    Well, my condition at variable creation is ----> sum(A) where [country] <> " x" ...(It is showing the results when the country is equal to x) and the converse for the same ... If I use [country] = "x" .. It is taking as country not equal to x ..
    Please suggest me on this..
    Thanks in advance ....

    Hi ,
    I am getting an error while creating variable at report level,
    Well, my condition at variable creation is ----> sum(A) where [country] <> " x" ...(It is showing the results when the country is equal to x) and the converse for the same ... If I use [country] = "x" .. It is taking as country not equal to x ..
    Please suggest me on this..
    Thanks in advance ....

  • Rounding off Issue (Net Value not equal to Net Price * quantity)

    Dear Gurus,
    Here is an interesting issue.The default calculation done in the pricing procedure is two decimal places.Now we consider a real scneario,consider the net value of 324 quantities of an item calculated is 36,049.86 .When it is divided by quantity  the resulting value of net price is 111.265 but the system shows 111.27 by rounding it off.
    Now here comes the problem,my client needs the rate to be shown on the order script to be two decimal places and the net value should be equal  quantity * net price.So if we apply this,
    324 * 111.27 = 36051.48
    But the net value calculated by the system is 36,049.86.So it can be consluded that:
    "Quantity * Net Price Shown is not Equal to Net Value calculated by the System"
    Need an urgent resolution,project is stuck on this
    Regards,
    Sam Ahmed
    Edited by: Lakshmipathi on Nov 3, 2011 12:14 PM
    Please dont add URGENT in subject or in your post

    Here is the pricing procedure,
    We start with the amount condition types
                                            Unit Price        Units Condition Value
    ZMRP     MRP                     1,700.00           10     PAC     55,080.00      
    ZTRP     Trade Price     1,445.00           10     PAC     46,818.00      
    ZDPR     Dist. Price     1,445.00           10     PAC     46,818.00         (GL)
    Using Trade Price we apply the product discount of 23%
    ZPRD     Product Discount     23.000-     %                    10,768.14-
    Then we send discount amount to the gl by using condition type ZDIS
    ZDIS      Discount Value     100.000-     %           10,768.14-      (GL)
    tHE RESULTING NET VALUE IS  36,049.86      as 46818.00 - 10,768.14
         Order Item value     111.27      1     PAC     36,049.86      
    And the Net Price is 111.27

  • In a purchase order for 3 GR's Quantity does not equal the value

    Hi,
    I have found the difference in one purchase order, there have been 3 GRs where the Qty does not equal the Value.  How has this happened?
    Any guesses why the difference has come.
    Thanks&regards,
    Veena

    Hi Vishal,
    In po history for agt 3 Gr's  Quantity does not equal the values. I hope the difference is Movement types. But exactly where to check this movements i am not getting.
    Can you tell me this which T.code.
    Tx,

  • =Time.isTimeWindowOpenNow - is there a NOT EQUAL option?

    Hi,
    I am trying to stop a job in a chain from running on a Friday for example.
    As a precondition I basically need the opposite of =Time.isTimeWindowOpenNow or I need a option to do a NOT EQUAL to expression.
    Is there a format to use to set a precondition like this?
    (I am using the free version of CPS so I cannot set up custom Time Windows)
    Thanks,
    Adriaan

    Hello Adriaan,
    This function actually exists for days in the week, very useful in static recurring situations. But you know you are more flexible with time windows in terms of compensations for holidays etc.
    Lets get to it though :-):
    =Time.isDayOfWeekInSetNow('_XXXXX_') allows you to specify the days in the week the function should return true. The String contains 7 characters, every _ specifies a day you are not interested in, every X specifies a day you are interested in. The String goes from Sunday to Saturday, so my example specifies the working days.
    Regards Gerben

  • Delivery cost is not equal to actual cost in sales order

    I met a strange phenomenon is the sale cost in SO is not equal to the cost in delivery order.
    I order 3 PCS material and each cost is 43.87 and the total cost is 131.61.
    However when I finished PGI the FI document shows the cost is 131.62. the diff is 0.01
    I don't know how the diff comes.
    Do you know the reason for the above issue?
    Thank you very much for your help.
    Yang

    have you checked whether there are different pricing conditions?
    in Sales order, the price is calculated based on the pricing date in the order, if you then create a new delivery, the price is re-calculated with the delivery date, but the sales order still has the old pricing information.
    Check the pricing log of the sales order and invoice (tab "conditions") to see, which pricing condition is used.
    Or is it possible that your order uses a foreign currency? SO maybe the exchange rate has changed since creating the order.
    Regards
    Ralf

  • KE5Z drilldown report does not equal grr3 report values

    Hello,
    We have a grr3 report where the COGS line is based on functional area and account ranges.  The total displayed on the GRR3 report for the COGS cell matches the values I would expect based on the specified account and functional area restrictions assigned to that cell.  When I drill into the KE5Z report (Profit Center: Actual Line Items), which is identified as a receiver report, the summed value of the "In Company Code Currency" field does not equal what is displayed in GRR3.  The GRR3 report is returning results in the same currency as the company code currency that the report is being executed for so that is not the problem.  During my investigation it looks like the functional area restrictions are not being accounted for when I drill into KE5Z.  Any recommendations on why the restrictions identified for the cell in the GRR3 report would not be carried through to the KE5Z results?  I have been playing with this for hours and have run out of ideas.  I can't determine why the COGS cell value is different than the actual line items sum.  Any help would be greatly appreciated.
    Thanks,
    Jordan

    Hi Jordan,
    in my experience the report-report interface can only pass through selections independently.
    To give an example: I had a report painter report with line 1 that had a selection on two characteristics (say cost element A and cost center B) then a second line with selection cost element C and cost center D selected and finally a line with the sum of the two lines above.
    Now when I jump to a connected line item report by double-clicking on the line with the sum, the parameters passed on are:
    cost centers: B, D
    cost element: A, C
    Therefore, the sum of my line items is not equal to the sum that I departed from, as I get line items with cost element A and cost center D, for example, a combination that was excluded from my original report.
    I hope I made the point clear.
    Another possibility is of course, that the receiving report has additional selection active (in the form used in the dril down report) that were not present in the original report
    Regards
    Nikolas
    Edited by: Nikolas John on Mar 24, 2011 9:21 AM

  • Update Record Field if Value Not Equal

    Hello All,
    I am using Toad for Oracle 10. I have a MERGE INTO Process that updates tbl_requisition based on FK - fk_allotment_id that equals parent table tbl_allotment PK - pk_allotment_id. Both tables have create, update and deletes triggers. The process is executed when a Apply Changes/update button is clicked from tbl_allotment. So, all the record data from tbl_allotment updates tbl_requisition record if the fk and pk keys are equal. My problem is if a record is updated within tbl_requisition. Now the record from tbl_requisition is different from tbl_allotment. If any value is updated from tbl_allotment for the matching pk_allotment_id = fk_allotment_id record from tbl_requisition. tbl_allotment record data will override the updated value within tbl_requisition. I would like to only update the values that were updated/changed and are not equal from tbl_allotment to tbl_requisition. Can anyone assist me with this?
    Begin
    MERGE INTO tbl_requisition req
    USING tbl_allotment alt
    ON (req.fk_allotment_id = alt.pk_allotment_id)
    WHEN MATCHED THEN
    UPDATE SET
         req.FK_JOBCODE_ID = alt.FK_JOBCODE_ID,
         req.FK_JOBCODE_DESCR = alt.FK_JOBCODE_DESCR,
         req.FK_JOBCODE_PAYRANGE = alt.FK_JOBCODE_PAYRANGE,
         req.FK_PAY_RANGE_LOW_YEARLY = alt.FK_PAY_RANGE_LOW_YEARLY,
         req.FK_DEPARTMENT_ID = alt.FK_DEPARTMENT_ID,
         req.FK_DIVISION_ID = alt.FK_DIVISION_ID,
         req.FK_NUMBER_OF_POSITIONS = alt.NUMBER_OF_POSITIONS,
         req.FK_DEPARTMENT_NAME = alt.FK_DEPARTMENT_NAME,
         req.FK_DIVISION_NAME = alt.FK_DIVISION_NAME,
         req.REPORT_UNDER = alt.REPORT_UNDER;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        dbms_output.put_line('No data found');
    End; Thanks for reading this thread and I hope someone can provide some assistance. If the create tables or anything is needed that is not a problem to provide.

    Thanks for responding Frank and providing the EXCEPTION information also. Here are my create tables and insert statement. I changed the child table from tbl_requisition to tbl_allotment_temp, same process though.
    CREATE TABLE  "TBL_ALLOTMENT"
       (     "PK_ALLOTMENT_ID" NUMBER,
         "FK_DEPARTMENT_ID" VARCHAR2(5),
         "FK_DIVISION_ID" VARCHAR2(100),
         "FK_JOBCODE_ID" NUMBER,
         "FK_JOBCODE_DESCR" VARCHAR2(100),
         "FK_JOBCODE_PAYRANGE" NUMBER(*,0),
         "FK_PAY_RANGE_LOW_YEARLY" NUMBER(*,0),
         "NUMBER_OF_POSITIONS" NUMBER,
          CONSTRAINT "PK_ALLOTMENT_ID" PRIMARY KEY ("PK_ALLOTMENT_ID") ENABLE
    CREATE TABLE  "TBL_ALLOTMENT_TEMP"
       (     "PK_ALLOTMENT_TEMP_ID" NUMBER,
         "FK_DEPARTMENT_ID" VARCHAR2(5),
         "FK_DIVISION_ID" VARCHAR2(100),
         "FK_JOBCODE_ID" NUMBER,
         "FK_JOBCODE_DESCR" VARCHAR2(100),
         "FK_JOBCODE_PAYRANGE" NUMBER(*,0),
         "FK_PAY_RANGE_LOW_YEARLY" NUMBER(*,0),
         "NUMBER_OF_POSITIONS" NUMBER,
          CONSTRAINT "PK_ALLOTMENT_TEMP_ID" PRIMARY KEY ("PK_ALLOTMENT_TEMP_ID") ENABLE
    INSERT INTO tbl_allotment
    (FK_DEPARTMENT_ID, FK_DIVISION_ID, FK_JOBCODE_ID, FK_JOBCODE_DESCR,
    FK_JOBCODE_PAYRANGE, FK_PAY_RANGE_LOW_YEARLY, NUMBER_OF_POSITIONS)
    values
    (00002, 0000220000, 100408, 'Revenue Analyst',
      2210, 38389, 5);Once data is created for tbl_allotment, this insert statement inserts the data to tbl_allotment_temp.
    INSERT INTO tbl_allotment_temp(
         PK_ALLOTMENT_TEMP_ID,
         FK_JOBCODE_ID,
         FK_JOBCODE_DESCR,
         FK_JOBCODE_PAYRANGE,
         FK_PAY_RANGE_LOW_YEARLY,
         FK_DEPARTMENT_ID,
         FK_DIVISION_ID,
         NUMBER_OF_POSITIONS)
        VALUES (
         :P3_PK_ALLOTMENT_ID,
         :P3_FK_JOBCODE_ID,
         :P3_FK_JOBCODE_DESCR,
         :P3_FK_JOBCODE_PAYRANGE,
         :P3_FK_PAY_RANGE_LOW_YEARLY,
         :P3_FK_DEPARTMENT_ID,
         :P3_FK_DIVISION_ID,
         :P3_NUMBER_OF_POSITIONS);Once any update occurs to tbl_allotment, this process updates tbl_allotment_temp based on temp.pk_allotment_temp_id = alt.pk_allotment_id.
    Begin
    MERGE INTO tbl_allotment_temp temp
    USING tbl_allotment alt
    ON (temp.pk_allotment_temp_id = alt.pk_allotment_id)
    WHEN MATCHED THEN
    UPDATE SET
         temp.FK_DEPARTMENT_ID = NVL (alt.FK_DEPARTMENT_ID, temp.FK_DEPARTMENT_ID),
         temp.FK_DIVISION_ID = NVL (alt.FK_DIVISION_ID, temp.FK_DIVISION_ID),
         temp.FK_JOBCODE_ID = NVL (alt.FK_JOBCODE_ID,    temp.FK_JOBCODE_ID),
         temp.FK_JOBCODE_DESCR = NVL (alt.FK_JOBCODE_DESCR, temp.FK_JOBCODE_DESCR),
         temp.FK_JOBCODE_PAYRANGE = NVL (alt.FK_JOBCODE_PAYRANGE, temp.FK_JOBCODE_PAYRANGE),
         temp.FK_PAY_RANGE_LOW_YEARLY = NVL (alt.FK_PAY_RANGE_LOW_YEARLY, temp.FK_PAY_RANGE_LOW_YEARLY),
         temp.NUMBER_OF_POSITIONS = NVL (alt.NUMBER_OF_POSITIONS, temp.NUMBER_OF_POSITIONS);
    End;Once the data is created within tbl_allotment the data is also inserted within tbl_allotment_temp. If tbl_allotment_temp.NUMBER_OF_POSITIONS value is changed from 5 to 10 is fine. The problem is when a update occurs within tbl_allotment and the updated field is not NUMBER_OF_POSITIONS. The changed field values from tbl_allotment should only update the field data within tbl_allotment_temp.
    UPDATE tbl_allotment_temp
    SET
    NUMBER_OF_POSITIONS = 10
    UPDATE tbl_allotment
    SET
    FK_JOBCODE_DESCR = 'Revenue Test'Now within tbl_allotment_temp only field FK_JOBCODE_DESCR should be updated to Revenue Test but my MERGE INTO process will update all the field values. So the updated NUMBER_OF_POSITIONS value 10 will now be 5. I would only like to update any changed value from tbl_allotment to tbl_allotment_temp. If any record value from tbl_allotment_temp was changed that value should not be updated from the MERGE INTO Process within tbl_allotment unless those values have been updated within tbl_allotment. Let me know if this is not clear so I can clarity more Frank.
    Edited by: Charles A on Aug 29, 2011 8:41 AM

  • Bapi Fm BAPI_INCOMINGINVOICE_CREATE Giving error *Balance is not equal to .

    Dear All,
    Note: Cin as implemetned.
                   Get error from Fm BAPI_INCOMINGINVOICE_CREATE  is Balance is not equal to zero.
    Have passed the correct inputs to the Fm its Invoice is creting ,while the only case Cenvat comes based in the PO/Vendor that time  error is generating.
    Passing values : HEADER LEVEL : Grand total value (item + tax value + cenvat value).
                                item level : total value of item price.
                                tax account : bed,escess, bcs. cenvat value and taxcode. 
    For rest of the case which is not having in the Cenvat some value type passed invoice no is generating.
    Please Suggest me to come out from this issues. How to pass the value in case cenvat.
    Regards,
    Santosh
    Edited by: santosh jajur on Mar 10, 2010 10:43 AM
    Edited by: santosh jajur on Mar 10, 2010 10:44 AM

    Hi
    I encountered Same problem in different BAPI.
    It been solved by turning one of sums to negative.
    I don't familiar with this specific BAPI but mayby this will help to you to.
    Best Regards
    Yossi Rozenberg

Maybe you are looking for

  • Error while inserting data in SQL Server.

    Hi', I am using SOA 11.1.1.5 I am inserting data using DB adapter in MS SQL Server. Some times I get below error. Error Message: {http://schemas.oracle.com/bpel/extension}bindingFault Fault ID     rrr/xxx!1.1*soa_313bd437-7bb9-41c6-a719-d1775b9afc4b/

  • Mail's Basic Functionality

    As a recent Switcher, I have been looking at all the various software packages on offer, trying to figure out which ones will serve my needs best. I used to be an Outlook user on Windows, and have been using Entourage since it is very similar, but am

  • IMac 20" - Gradient on display

    I have recently bought a second hand iMac - (20" 2.4Ghz Intel Core Duo - Aluminium). All was great for the first day untill I did my first bit of design on it. The design had a thick red stripe at the top and bottom of the page. I was confused to see

  • Automatically turn filters on or off at a scheduled time

    Hi there, Is it possible for a Blackberry (I have a 9780)  to automatically turn email filters on or off at a scheduled time during night?  This is to allow alerting notification start without me having to manually do it.  (I'll be asleep ) (I want t

  • Why can't I find my back up music from my iPad on my mac?

    I updated my ipad which had a itunes british account and I have my American itunes account.  I would like to have my music that was on my ipad back on my ipad.  I am very upset.  I did back it up.  I don't know where it is.