Negative Zero?

Sometimes when I subtract a number from itself, I get a negative zero, rather 
than a simple zero.  Why is this?
0
Herbert1 (9)
4/3/2005 12:23:03 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
699 Views

Similar Articles

[PageSpeed] 1

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?


0
Don
4/3/2005 1:17:57 PM
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? 


0
fredsmith99 (155)
4/3/2005 3:58:27 PM

"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
> 
0
Herbert1 (9)
4/3/2005 6:17:03 PM
Reply:

Similar Artilces:

Formating Negative Figures in Brackets
Excel 2007 In earlier version of Excel, we could get a specific format for presenting the negative numbers in brackets and / or in red color. I could not find it in the Excel 2007. This can be done in the Custom Format. I do not have specifics for it. Can you give me the format for the same ? Why did the Excel remove this useful and oft needed feature from their new version, or am I missing something ? -- Shrikant The below might be useful http://support.microsoft.com/kb/832285 -- Jacob "Shrikant" wrote: > Excel 2007 > In earlier version of Exc...

excel truncating leading zeros
Hi, I am trying to use the import from text file into an excel sheet. I read many queries and figured out how to import the values as text without dropping the leading zeros. Please suggest a way where i can import all the values as "text" type. I want to avoid creating an array as the size of my text file varies from time to time. So i will not be sure how big the array must be. Please suggest. Thanks . regards, veena. In Step 3 on the Text Import Wizzard, select "text" in the upper righ hand corner of the screen -- ElsiePO ------------------------------------------...

Min not zero revisited
I am trying to input an array function onto my Excel sheet through VBA. I try the following code, and instead of giving me some type of error... it just skips past the rest of my code and goes straight to "End Sub" after trying to evaluate. Can someone please tell me two things... 1) what did I do wrong? and 2) why would it skip all the rest of my code and go straight to End Sub? Thanks! Matt LastRow = Cells(Rows.Count, "F").End(xlUp).Row ActiveCell.Offset(3, 0).FormulaArray = "=MIN(IF(R13C:R" & LastRow & "C)>0,R13C:R&...

Negative Allocation
I was attempting to post a batch that contained a transfer. The post failed and I recevied a message that "The serial number does not exist for this item and site". The items were moved from the source site to the destination, but the allcoated quantites in the source site are now negative. Any ideas how to fix this? Have you run the inventory reconcile process? (Utilities - Inventory - Reconcile) "Eric Capponi" wrote: > I was attempting to post a batch that contained a transfer. The post failed > and I recevied a message that "The serial number does not...

making a negative effect
I am trying to switch the black and white color of a tempalte for an invitation from black background white lettering to opposite. any help would be appreciated dctakj <dctakj@discussions.microsoft.com> was very recently heard to utter: > I am trying to switch the black and white color of a tempalte for an > invitation from black background white lettering to opposite. any > help would be appreciated Printing this on white paper will be expensive because of the amount of ink used. Printing this in black paper will be (virtually) impossible. Now that's under your belt,...

Error in AVERAGE(IF...) formula; involves Zero Value and Blank Cells
Hi there, I am getting an error in this formula: =AVERAGE(IF(($Y13:AH13<>0)*($Y$10:AH$10<>0),$Y13:AH13/$Y$10:AH $10))*100 Excel states that a value used in the formula is of the wrong data type, and the calculation steps underlines the first ($Y13:AH13 and results in #Value!<>0. The long-hand way of typing it is (up to column AG): =(((Y13/Y$10)+(Z13/Z$10)+(AA13/AA$10)+(AB13/AB$10)+(AC13/AC$10)+(AD13/ AD$10)+(AE13/AE$10)+(AF13/AF$10)+(AG13/AG$10))*100)/ COUNT(Y13,Z13,AA13,AB13,AC13,AD13,AE13,AF13,AG13) The data values, which are student scores on assignments, are currently ...

Negative Expenses
I'm using Money 2007 Premium but have had this problem in the last several versions as well. Why is it that if I record a negative expensive, it is not reflected in the reports? An example: Let's say I go out to dinner with a friend. We receive the check and I pay by credit card and my friend pays me with cash to cover his/her part. I record the restaurant in the Food: Dining Out category in my credit card account and then record that I received the cash in my Cash account and classify it as a negative expense to the same category. However, when I view the reports, only the pos...

HQid is zero at HQ and Store
We have been having a lot of reporting problems lately and I found out that the HqId at the store levels are 0. Also there are items in the HQ database that also have a HQId of 0. We use Retail Realm Matrix Creator and items that are created automatically have an HQId of 0. I need to update the item table at the stores but I need to make sure all items at HQ have a HQID. Can I assign martixed items at HQ with HQIds without having to create all the items again? I'm sure all I have to do is update the item table at the store level to correct everything once I know that all the item...

Zip code loses leading zero Mail Merge from Excel to Word Labels
Even though formatted as zip codes, I cannot get the leading zero to show in my zip codes when using Word mail merge to create address labels. Example: 04103 shows up on the label as 4103 Debra Dalgleish posted this to a similar question: There's an article on the Microsoft web site that might help you: Answer Box: Numbers don't merge right in Word http://office.microsoft.com/en-ca/assistance/HA011164951033.aspx And if you prefer the old Mail Merge helper, Word MVP Suzanne Barnhill has instructions here: http://home.earthlink.net/~wordfaqs/CustomizingWord2002.htm abou...

Negative Zero?
Sometimes when I subtract a number from itself, I get a negative zero, rather than a simple zero. Why is this? 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? It means that your result is less than zero, but not within the precision you are displaying. For example, ...

Determine the number of bits in a negative number
I'd like to determine the number of bits (the position of the highest on bit) in a negative number (say -1) without using knowledge of its type. Valid operations would be AND, OR, XOR, negation, and one's compliment can be done as: 'Get a -1 of the same type as myvar Dim minus1: minus1 = myvar - (myvar + 1) Dim onesComp: onesComp = myvar XOR minus1 You could also use multiplication or division by 2 or other mathematical operators/functions, but then sign extension comes into play. The standard solution is to presume the answer given the type of the variable, but...

Excel Formula Negative/Negative =+%
I am trying to write a formula to correct negative %..... Example....-500 2005 -400 for 2004 Variance = -100 Variance % is showing 25% should be (-)25%......How to write formula? "BigDon" <BigDon@discussions.microsoft.com> wrote in message news:B10D8375-FCE5-49A9-9A5D-3DD2C39C5868@microsoft.com... > > I am trying to write a formula to correct negative %..... > Example....-500 2005 -400 for 2004 Variance = -100 > > Variance % is showing 25% should be (-)25%......How to write > formula? > Hi, First, I would suggest considering whether you actually want ...

Quote product line should allow for negative extended amounts.
Quote product lines should allow for negative amounts. A situation where this is required is when dealing with bulk discounts. We want the ability to apply a product line with a negative value and have the overall quote value reflect this change. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agre...

negative numbers in smartlists
When generating my items usage in a smartlist the quantity comes up xxxx-. Excel does not recognize this field as a number. Consequently, I can't do a calculation on this field in Excel. Is this a formatting that can be changed up front in GP? If not, is there an easy way to reformat the fields in Excel? Ok -- I have discovered that on at least 1 other person's workstation the number comes in as a number when running this smartlist. A GP formatting question? ...

negative dates or times are displayed as # # # #
I have two cells that carry two different times as follow cell A1 has 00:05:00 cell A2 has 00:04:00 cell A3 should display the difference in negative way(-00:01:00). I only get ##### instead of the answer in cell A3 and a message reads (negative dates or times are displayed as # # # #) Your help will be much appricated. thanks That's what Excel does; it cannot work with negative time/dates You could try =ABS(A2-A1) and have a flag in an adjacent cell =IF(A2<A1,"Neg","Pos") best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email &quo...

Balances negative
I accepted a downloaded transaction today and Money 2004 crashed on me. When I restarted, I noticed that my checking account balance was negative and several unsent electronic billpay transactions had materialized. The only backup I had seems to not work (damn floppies). Ive tried both a quick and standard repair as well as deleting my IE temp files. Any ideas? I need help!!! I forgot to add that when I view all transactions in the register, everything looks fine. It's when I switch to View unreconciled transactions that the balance screws up. Tommy Becker wrote: > I ac...

smartlist negative number for returns
I am trying to create a smartlist that would return the soptype return and invoice but have the return amount appear as a negative number. I was able to return both doctypes with search type set to 'match one or more'. I am having trouble making the returns appear as negative amouts. Would I need smartlist builder? Yes. In SLB you can create a calculated field that will take the amount and multiply by -1. Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com The Dynamics GP Blogster at http://dynamicsgpblogster.b...

Convert positive # to negative
Hi, I heard that there is a smart icon that lets you convert a range with negative numbers to positive numbers and vice versa. Could someone tell me how to do it? Thanks for your help. Regards, BGN2 -- bgn2 ------------------------------------------------------------------------ bgn2's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=25774 View this thread: http://www.excelforum.com/showthread.php?threadid=401361 Hi, Am not aware of this icon, but you can type -1 in any cell, copy that cell, select the range you need and choose Edit->Paste Special and ...

How to format negative currency as red with a negative sign?
I prefer positive numbers which are currency to be black, and negative numbers which are currency to be displayed in red along with the negative sign. Do you have to use a "Custom" format to accomplish that? If so, do you know what that would be? Thanks in advance. Hi, I run XL2000, so not sure if this will be the same for your version. Select your cell, then Format > Cells On the Number tab, select currency. You will see a list of options as to how negative numbers are displayed. In my version, the one you want is 4th. Regards - Dave. $#,##0.00;[Red]-$#,##0.00 Just replace ...

Negative to zero code
I went in and formatted a cell to: 0;"0";0 so that all negative numbers will be converted to zero. I have a textbox on a userform that I need to do the same thing. What code would I use? I tried this but it doesn't work: txtRemain.Value = Format(txtRemain.Value, "#,#00;""0""") Any help would be greatly appriciated. Thanks, ~Gabe This worked for me: Sub gh() Sheets(1).TextBox1.Text = 123.751 MsgBox "OK" Sheets(1).TextBox1.Text = _ Format(Sheet1.TextBox1.Text, "#,##0.00") End Sub &quo...

In excel, how can i get rid of the zero when a formula is used, b.
I'm trying to find out how to get rid of a zero when a formula is used, but there has not been any data entered in that row yet. For example, as simple as copying another cell, you put =b11, if nothing has been entered in b11 yet, it shows a zero, but I dont' want it to show anything... help! Hi =IF(B11="","",B11) =IF(OR(A2="",B2=""),"",A2*B2) etc. Arvi Laanemets "cburgess57" <cburgess57@discussions.microsoft.com> wrote in message news:6043DCAE-7F2D-4C3B-A2B6-46D088772344@microsoft.com... > I'm trying t...

negative reciprocal
Is there a math.h function for finding the negative reciprocal of a fraction? Ideally something like: int nNumerator = 4; int nDenominator= 2; int nNewNumerator; int nNewDenomintator; magic(nNumerator, nDenominator, nNewNumerator, nNewDenomintator); nNewNumerator = -2; nNewDenomintator = 4; Thanks "markww" <markww@gmail.com> wrote in message news:1158988223.213218.318370@i3g2000cwc.googlegroups.com... > Is there a math.h function for finding the negative reciprocal of a > fraction? Ideally something like: > > int nNumerator = 4; > ...

INDIRECT function returns a zero instead of a blank
Hi, I'm using the INDIRECT function to allow me to plot a series that spans several worksheets, as suggested here: http://peltiertech.com/Excel/ChartsHowTo/ChartFromDiffSheets.html My problem is that whereas some values are actually zero, others are blank; INDIRECT displays both as zero values. Is there a way to prevent this from happening? You could have something like: =IF(your_formula="","",your_formula) Hope this helps. Pete On May 14, 12:42 pm, Paul <paulmjk...@gmail.com> wrote: > Hi, > > I'm using the INDIRECT function to allow me to pl...

Change Number to a negative in VBA
Hi I currently have a range of numbers which need to be change from a positive into a negative however I am not aware of the cell reference as the rows can be more or less. Does anyone know how to change a range of numbers from a positive into a negative using VBA. I actually need the number to be negative not just the format. Thanks Noemi Noemi If numbers are in Activecell column.......... Sub test() Dim rcel As Range Dim Rng As Range Set Rng = Range(ActiveCell, Cells(Rows.Count, _ ActiveCell.Column).End(xlUp)) For Each rcel In Rng If rcel.Value <> ""...

how do i hide negative values in excel
I can hide zeroes but I also need to hide negative values as well. How can I get negatives values to hide? Select the range (or column) A) Use Format|Conditional Formatting Specify "Cell value", "Is less than" "0" and make the font white (or colour of cell background) that it disappears or B) use Format | Custom Format using something like $#,##0.00;"" best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "ccarolla" <ccarolla@discussions.microsoft.com> wrote in message news:B93420D3-05BD-4A84-8EC0-C1...