I post there firstly and can not find the preview option. Thus, I do not sure what will happen as result when I will press the Post Message button
Therefore I apologize for any oddities in the text :j
Hi Sander, I like math too and when I had faced the Associative property violation first I was wondered very much.
SQL
Associative property
When the orderin which the same operation is performed in a single formula is unimportant for the outcome of that formula we say that the operation is associative. For example (1 + 2) + 3 = 1 + (2 + 3). It doesn’t matter if we first evaluate 1 + 2andthenadd3or first evaluate 2 + 3andadd it to1, the outcome is always 6.
There: http://www.cyberforum.ru/blogs/212894/blog3515.html[^]
I tried to explain on how the program can avoid that problem. The text that is related with the subject is located at the bottom of the page that is pointed by the link.
When we talk about the computer calculations and computer algebra we do not mean general algebra. But because it is still a branch of mathematics that makes sense to assume that if something is not always true, it is simply not true.
Otherwise, you need to strictly specify the conditions in which this statement is true. Now it can be argued that the associativity of computer calculations is not executed.
Attantion! I have posted the link to avoid of paste the such a big text. But, now I have to retype it here:
preamble: This text is a part of text that tells about the program "aneasycalc" and totally shown by the link.
In school mathematics, we were taught that the operation of equal priority can be performed from left to right as they result does not depend on the order of execution. Such an algorithm is called a naive implementation.
The naive algorithm assumes the sequence of operations equal priority: Left-to-right for all but the exponentiation. This leads to the fact that such expression:
1 + 1e-20 - 1 equals 0.
This is because the naive algorithm performs the addition operation from left to right and:
1 + 1е-20 = 1, since usually the number of significant digits does not more than 15.
And the next operation:
1-1=0.
That means, there is a loss of accuracy. However, there may be more serious consequences. For example:
1e308 * 1e308 / 1e308 in accordance with the naive algorithm equals infinite, as modern desktop systems, as a rule, can not work with numbers larger than numbers with exponent +308.
Those portions of the text that relate to the program "aneasycalc" solution of this task skipped and they can be found following by the link.
Hi Sander, thanks again for this one. Can't wait to read the next one.
Just a minor precision, when you are talking about multiplication's commutativity, you should make clear that you are talking about real numbers (or one of their subsets) multiplication. Multiplication for matrices & hypercomplex numbers is not commutative, for example.
Hi Sander, thanks again for this one. Can't wait to read the next one.
Thanks!
I'm really enjoying this series and I can't wait to write the next one either
phil.o wrote:
when you are talking about multiplication's commutativity, you should make clear that you are talking about real numbers (or one of their subsets) multiplication
You're right, I'll fix it when I have some time this weekend
when you are talking about multiplication's commutativity, you should make clear that you are talking about real numbers (or one of their subsets) multiplication.