the Sweet Smell of Burning Fur (plonq) wrote,
the Sweet Smell of Burning Fur
plonq

  • Location:
  • Mood:

1 = 2

When does -40 = -41? When you copy a formula over from version 3.1 of some software to version 4.0 of the same.

I not write the formulas that created those numbers, and if I had, I'd have written them differently anyway. The fact remains that the software that we are using to produce this report has changed the way it handles its rounding from one version to the next.

The formula is taking a performance metric from one year and subtracting it from the previous year to show the variance year over year. When I expanded the two base numbers, this is what I got:

This year: 14.450
Last year: 54.941

When you subtract last year from this year, you get -40.491

The current version of the software correctly rounds that down to 40 when we strip away the decimal places. But wait, when we round all three numbers we get 14 - 55 = -40. In the old version it yielded -41.

What this tells me is that the old version of the software was probably rounding the numbers before it did the subtraction, rather than doing it at the end. In their own, stupid ways, both versions of the software are correct.

And I am left with a report that yields different results from the same source data, depending on which program I use to produce it.

It will be labour intensive, but the only solution I can see at the moment is to redo the formulae and truncate each term, rather than truncating at the end. That should only take most of tomorrow.
Tags: maths
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments