LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Aggregate strange calculation

    Employee
    Posted 04-17-2013 06:10

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: ThomasT

    Hi Guys.

    Could you help me and tell me what qoes wrong in the attached BRG?
    I have two almost identical data sets where the only difference should be that the values are positive in one set, and negative in the other.

    If i look at the aggs in the top and bottom, the give me the same result(apart from the positive/negative part).

    Combined, the result should be 0 but it isnt?

    Aggregation.brg


  • 2.  RE: Aggregate strange calculation

    Employee
    Posted 04-17-2013 06:25

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Hi,

    I think you're running into a problem with the floating point arithmetic used by the double type.
    If you look at the result of your middle Agg Ex node, it is almost 0 (-2.94676283374e-10)

    This is just a general floating point math issue.
    A description of how this can cause confusion and rounding errors etc can be found here (and also in the BRAINScript help):
    http://community.lavastorm.com/showt...unding-nearest

    Regards,
    Tim.