Closed Thread
Results 1 to 5 of 5

Logic Test ?

  1. #1
    Zeno
    Guest

    Logic Test ?

    In Excel A1=1.2675-1.2664=.0011
    B1=1.2664-1.2653=.0011
    Ask A1=B1, result is False; why?

  2. #2
    Marcelo
    Guest

    RE: Logic Test ?

    hi Zeno,

    try to use round to see it as true
    the results of the formula are:

    a1 = 0,0011000000000001
    b1 = 0,0010999999999998

    so they are not equal.

    use =round((1.2675-1.2664),4)
    and =round((1.2664-1.2653),4)

    hth
    regards from Brazil
    Marcelo

    "Zeno" escreveu:

    > In Excel A1=1.2675-1.2664=.0011
    > B1=1.2664-1.2653=.0011
    > Ask A1=B1, result is False; why?


  3. #3
    CC
    Guest

    RE: Logic Test ?

    If
    A1=1.2675-1.2664=.0011 = FALSE
    B1=1.2664-1.2653=.0011 = FALSE
    A1=B1 = [FALSE = FALSE] = TRUE
    if
    A1=1.2675-1.2664
    B1=1.2664-1.2653
    A1=B1 = [.0011 = .0011] = FALSE



    "Zeno" wrote:

    > In Excel A1=1.2675-1.2664=.0011
    >
    > Ask A1=B1, result is False; why?


  4. #4
    David Biddulph
    Guest

    Re: Logic Test ?

    "Zeno" <[email protected]> wrote in message
    news:[email protected]...
    > In Excel A1=1.2675-1.2664=.0011
    > B1=1.2664-1.2653=.0011
    > Ask A1=B1, result is False; why?


    Because these numbers can't be represented exactly in binary.

    http://www.cpearson.com/excel/rounding.htm
    --
    David Biddulph



  5. #5
    Jerry W. Lewis
    Guest

    RE: Logic Test ?

    The math (and logic) is exactly right, given unavoidable approximations to
    the original numbers.

    Most terminating decimal fractions (including .2675 .2774 .2653 and .0011)
    are nonterminating binary fractions that can only be approximated, much as
    1/3 can only be approximated as a decimal number. You are seeing the binary
    equivalent of
    2/3 - 1/3 = 0.6667 - 0.3333 = 0.3334 <> 0.3333

    As documented in Excel's Help for "Excel specifications and limits" subtopic
    "Calculation specifications", the approximations used may not be exact beyond
    15 digits. You cancelled 3 of those 15 digits in the subtraction, revealing
    residue of the original approximations.

    You can use the D2D function at
    http://groups.google.com/group/micro...06871cf92f8465
    To see the actual decimal values of the approximations involved.

    Jerry

    "Zeno" wrote:

    > In Excel A1=1.2675-1.2664=.0011
    > B1=1.2664-1.2653=.0011
    > Ask A1=B1, result is False; why?


Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1