Whilst creating a balance sheet for a lotto syndicate, I encountered this phenomenon;    Note the negative zero value in D5.  With no formatting, its actual value is -0.0000000000000230926389122033 even though all other numbers in the sheet have no more than one or two decimal places.  The formula in D5 (as it is in all of column D) is;  =IF(A5="Bank",D4,IF(A5="Lotto",D4+B5,D4-B5))   If I replace the formula with a simple =D4-B5 it returns a true zero, so the tiny value seems to be coming from the nested IF.  But why?  And can it be avoided?  Example workbook available here:
95377
Firstly I do not want to round my numbers, I am using base 10 figures so excel should have no bother doing simple add and subtract.  A|  665.110000000000000000000000000000 B|  4.990000000000000000000000000000 C|  =a1+b1 D|  670.790000000000000000000000000000 E|  1,335.890000000000000000000000000000 F|  =e1-(c1+d1)   I should get -5 however F1  returns   -4.999999999999770000000000000000   It is a financial document therefore I want to avoid rounding, more to the point. Why should I need to? I've put cell formatting to Currency with 2 decimal placed and I will get the correct display value but for all calculations I will still get -4.9999...7 which leads to further errors with conditional formatting etc.
79450
Okay so I have been having a problem and would really appreciate any help. I have posted a table below with the aim of making this as simple/precise as possible.  Value          %              Rounded %     Direction 10     1.515151515151520%       2%              Up 20     3.030303030303030%       3%             Down 30     4.545454545454550%       5%              Up 40     6.060606060606060%       6%             Down 50     7.575757575757580%       8%              Up 60     9.090909090909090%       9%             Down 70    10.606060606060600%      11%              Up 80    12.121212121212100%      12%             Down 90    13.636363636363600%      14%              Up 100   15.151515151515200%      15%             Down 110   16.666666666666700%      17%              Up T660        102%       Table explanation: Value is a number (total=660). The % is the percentage of the total ((value/660)*100%). Rounded is the % rounded at the percentage level rather than rounding the total. Direction is whether the rounding is up or down.  (row begining with T, = Totals)  Problem: I understand why I am getting 102%. I am creating a report that uses percentages and I want the rounded percentages to add up to 100% but be as mathematically accurate as possible.  Is it possible to determine which decimals in the % column are most significant to the overall increase in the total percentage?  Is there some universal equation that can be derived to perform this?  I know that this is pretty vague, so please comment if you need any clarification, but any help would be appreciated.   Thank you!
89135
I'm trying to convert a percentage: The original percentage represents how bad the condition of a asset is (in other words, a high number is bad). I would like to convert the percentage to represent how good the condition of an asset is (in other words, a high number is good). To do this, I can simply subtract the original percentage from 1 to get the desired percentage. Example:  1 - 0.25 = 0.75  My question is: What is this called in mathematics? As far as I can tell, this is not the same thing as .
36370
This is probably a simple answer but I can't find it.  I have a table with a column of integers and I want to ensure that when a row is inserted that the value in this column is greater than zero.  I could do this on the code side but thought it would be best to enforce it on the table.  Thanks!  I was in error with my last comment all is good now.
117193
Do we need to be careful when comparing a double value against zero?  if ( someAmount &lt;= 0){ ..... }
113604
I was messing around with my TI-84 Plus Silver Edition calculator and discovered that it will actually give me values when taking the factorial of any number $n/2$ where $n$ is any integer greater than $-2$. Why does this happen? I thought factorials were only defined for positive integers and $0$, so what is my calculator doing to get the answer $3.32335097$ when I enter $2.5!$? Is there actually a definition of $2.5!$ or is my calculator just being weird? How is the factorial function implemented?  I understand the binary implications of $2.5$, so that could possibly have something to do with it. I get a domain error when trying to take the factorial of $-1, 2.3, e$, and any number that is not of the form $n/2$ where $n$ is any integer greater than $-2$.
76844
Scientific talks have their own culture, reporting the results, typically for me, in a table of the following form  1.7333    1.6472    1.5418    1.4682    1.5740 1.1525    1.2878    1.2652    1.3511    1.5102 1.2181    1.1500    1.2220    1.2425    1.5699 0.9786    1.1051    1.1472    1.3096    1.6757 0.9569    0.9190    1.0433    1.2924    1.4867   There is clearly a(n almost perfectly) monotonic pattern for rows and columns. Now for the naked eye, this is not the most quick way of capturing informing.  I would like numbers that bigger in absolute value, to appear differently (either green vs red or light vs dark) than smaller numbers, such that the pattern becomes clear instantly.  Is there a way of programming this in LaTeX?
93546
I've recently started to think about this, and I'm sure a couple of you out there have, too.  In Algebra, we learned that $|x|\geq0$, no matter what number you plug in for $x$. For example: $$|-5|=5\geq0$$  We also learned that $x^2\geq0$. For example: $$(-5)^2=25\geq0$$ The exception for the $x^2$ rule is imaginary numbers (which we learn later on in Algebra II). Imaginary numbers are unique, in that their square is a negative number. For example: $$4i^2=-4$$ These imaginary numbers can be used when finding the "missing" roots of a polynomial equation.  My question to you is this: Is there any number whose absolute value is negative, and how could it be used?
111701
I'm messing around with some C code using floats, and I'm getting 1.#INF00, -1.#IND00 and -1.#IND when I try to print floats in the screen. What does those values mean?  I believe that 1.#INF00 means positive infinity, but what about -1.#IND00 and -1.#IND? I also saw sometimes this value: 1.$NaN which is Not a Number, but what causes those strange values and how can those help me with debugging?  I'm using  which I believe uses  representation for float point numbers.  Can someone list all those invalid values and what they mean?
5370
I was surprised when I heard zero is plural, and even 1.00001 is plural.  Then, what about following numbers ?  (1) 1.00  which means the value measured  between 0.995-1.004, having possibility that it was exactly 1.  (2) 0.99999.....  which is mathematically equal to 1. Also, are others that are mathemattically equal to 1 than this, treated completely same as 1?  (3) -1  Is this singular? Or negative numbers are generally plural?  (4) i = square root of -1  I know it's weird to count things with imaginary numbers, nonetheless, if you were to count, which form, plural or singular, would you be to use?  That's it.
82915
For example, the standard division symbol '/' rounds to zero:  &gt;&gt;&gt; 4 / 100 0   However, I want it to return 0.04. What do I use?
110392
I need a function that returns $0$ if the given number is negative, and otherwise doesn't change the number.  Example: $$y(-5)=0,\ y(-2)=0,\ y(0)=0,\ y(3)=3,\ y(2566)=2566.$$  Does such a function exist?
28318
I'm trying to format numbers. Examples:  1     =&gt; 1 12    =&gt; 12 123   =&gt; 123 1234  =&gt; 1,234 12345 =&gt; 12,345   It strikes as a fairly common thing to do but I can't figure out which filter I'm supposed to use.  Edit: If you've a generic Python way to do this, I'm happy adding a formatted field in my model.
92907
I see in many Brazilian sites that, if you get a number and subtract it by its reverse, you will have zero or a multiple of nine. For example:  22 - 22 = 0 51 - 15 = 36 (multiple of 9) 444 - 444 = 0 998 - 899 = 99 (multiple of 9) 1350 - 0531 = 819 (multiple of 9) 654321 - 123456 = 530865 (multiple of 9)   I wrote this Python code to test a range of numbers:   import math  for i in range(1, 1000001):     inverse = int(str(i)[::-1])     result = int(math.fabs(i - inverse))      if result != 0 and result % 9 != 0 :         print(result)   for that range it seems to be true. But I wasn't able to find any similiar type of "mathematical curiosity" in English language sites.  If it is true, is there explanation to that? Because the sites that spread that information, does not provide any explanation.
2587
A question that has been puzzling me for quite some time now:  Why is the value of the Riemann Zeta function equal to $0$ for every even negative number?  I assume that even negative refers to the real part of the number, while its imaginary part is $0$.  So consider $-2$ for example:  $f(-2) =  \sum_{n=1}^{\infty}\frac{1}{n^{-2}} =  \frac{1}{1^{-2}}+\frac{1}{2^{-2}}+\frac{1}{3^{-2}}+\dots =  1^2+2^2+3^2+\dots =  \infty$  What am I missing here?
71281
Is this considered bad style  $$2 = \sqrt{4} &lt; \sqrt{16} = 4?$$  It seems as though this is not strictly correct, since $2 = \sqrt{4}$ is a logical proposition which represents boolean value (true or false). A boolean value cannot be less than $\sqrt{16}$.  On the other hand, I am sure that most people will correctly interpret this as shorthand for $2 = \sqrt{4},$ $\sqrt{4} &lt; \sqrt{16},$ and $\sqrt{16} = 4$
116840
I am trying to display data similar to coinmarketcap with prices for coins, some above 1$ in which case they are rounded to 2 zeroes, some below 1$ in which case they have 4 digits following the decimal. I saw a bunch of posts here where people have suggested to use right alignment for numeric applications/prices  Approach 1 Decimal aligned   1. $13,700.05  2.      $0.0048   Approach 2 Right aligned   1. $13700.05  2.   $0.0048   Which of these approaches do you suggest? Thank you for your time