A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Negative Zero?



 
 
Thread Tools Display Modes
  #1  
Old April 3rd, 2005, 01:23 PM
Herbert
external usenet poster
 
Posts: n/a
Default Negative Zero?

Sometimes when I subtract a number from itself, I get a negative zero, rather
than a simple zero. Why is this?
  #2  
Old April 3rd, 2005, 02:17 PM
Don Guillett
external usenet poster
 
Posts: n/a
Default

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

--
Don Guillett
SalesAid Software

"Herbert" wrote in message
...
Sometimes when I subtract a number from itself, I get a negative zero,

rather
than a simple zero. Why is this?



  #3  
Old April 3rd, 2005, 04:58 PM
Fred Smith
external usenet poster
 
Posts: n/a
Default

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" wrote in message
...
Sometimes when I subtract a number from itself, I get a negative zero,
rather
than a simple zero. Why is this?



  #4  
Old April 3rd, 2005, 07:17 PM
Herbert
external usenet poster
 
Posts: n/a
Default



"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" wrote in message
...
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
multiplying a negative time value by a monetary rate apogee General Discussion 1 June 13th, 2004 12:37 AM
Negative numbers in formulas Bob Phillips Worksheet Functions 5 January 13th, 2004 05:13 PM
Negative dates or times are displayed as #### John Sheakley Worksheet Functions 1 September 30th, 2003 03:38 AM


All times are GMT +1. The time now is 04:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.