+ Reply to Thread
Results 1 to 4 of 4

Negative Zero?

  1. #1
    Herbert
    Guest

    Negative Zero?

    Sometimes when I subtract a number from itself, I get a negative zero, rather
    than a simple zero. Why is this?

  2. #2
    Don Guillett
    Guest

    Re: Negative Zero?

    probably a small diff somewhere in the 15 digits of the number

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    "Herbert" <Herbert@discussions.microsoft.com> wrote in message
    news:9517F5D9-3A15-4A97-93E1-B442A948E3E0@microsoft.com...
    > Sometimes when I subtract a number from itself, I get a negative zero,

    rather
    > than a simple zero. Why is this?




  3. #3
    Fred Smith
    Guest

    Re: Negative Zero?

    It means that your result is less than zero, but not within the precision
    you are displaying. For example, if the result is -0.00000000142, and your
    number format is two decimal places, you will see -0.00. Subtracting a
    number from itself often results in something other than true zero because
    computers convert to binary to do computations. Binary conversions are not
    perfect when extended to 15 decimal places.

    --
    Regards,
    Fred
    Please reply to newsgroup, not e-mail


    "Herbert" <Herbert@discussions.microsoft.com> wrote in message
    news:9517F5D9-3A15-4A97-93E1-B442A948E3E0@microsoft.com...
    > Sometimes when I subtract a number from itself, I get a negative zero,
    > rather
    > than a simple zero. Why is this?




  4. #4
    Herbert
    Guest

    Re: Negative Zero?



    "Fred Smith" wrote:

    > It means that your result is less than zero, but not within the precision
    > you are displaying. For example, if the result is -0.00000000142, and your
    > number format is two decimal places, you will see -0.00. Subtracting a
    > number from itself often results in something other than true zero because
    > computers convert to binary to do computations. Binary conversions are not
    > perfect when extended to 15 decimal places.
    >
    > --
    > Regards,
    > Fred
    > Please reply to newsgroup, not e-mail
    >
    >
    > "Herbert" <Herbert@discussions.microsoft.com> wrote in message
    > news:9517F5D9-3A15-4A97-93E1-B442A948E3E0@microsoft.com...
    > > Sometimes when I subtract a number from itself, I get a negative zero,
    > > rather
    > > than a simple zero. Why is this?

    >
    > Fred:

    Thanks so much for your answer. It very well addresses my problem, and I am
    grateful.

    Best regards,
    Herbert
    >


+ Reply to 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