全 14 件のコメント

[–]meinaccount 9ポイント10ポイント  (0子コメント)

This leads to some identity crises though, unless you change the rules of what is allowed by your operations, but that sort of defeats the purpose.

Consider

[;8/0=N_8 \implies N_8\times0=8 \implies N_8\times(0+0)=8 \implies 2N_8\times0=8 \implies N_8\times0=4 \implies 8=4;]

[–]zifyoip 8ポイント9ポイント  (0子コメント)

What is 2 × N8?

[–]RetraRoyale 2ポイント3ポイント  (1子コメント)

So the problem you solve is that you can now divide by zero? And how was that ever a problem in the first place? What the heck am I supposed to do with a result like N8?

[–]killdudes 2ポイント3ポイント  (0子コメント)

nasermahmoud, you might want to look at the existing algebra of wheels. They don't do what you want, but if you read up on the subject it will help you understand why your N cannot do what you want either.

[–]timshoaf 2ポイント3ポイント  (6子コメント)

We have been doing this in most computer applications of number systems for quite some time... We use a null value or we use NaN to represent the results of division by 0 so that the set of Z union NaN or R union NaN is then closed under the operations of multiplication and division.

[–]zifyoip 3ポイント4ポイント  (4子コメント)

Closed, yes, but not a field.

[–]timshoaf -4ポイント-3ポイント  (3子コメント)

And yet, for computer purposes, we don't particularly care that the mapping for NaN under the operations are bijective. In (almost) all cases, we just want to not have to deal with having to catch and deal with exceptions when this occurs and it is not a critical calculation. (Such as ignoring these errors in a graphing library when you just want some really generic code to generate a sample space and then evaluate the function on the grid etc.)

Don't get me wrong I love the guarantees and utility that proper applications of abstract algebra provides, but I think the reason it hasn't caught on is twofold: a.) it isn't (generally) that important, and b.) most programmers don't know the math so they stick to the well we'll just deal with an exception method.

[–]zifyoip 7ポイント8ポイント  (1子コメント)

What I was pointing out is that OP seems to be claiming to have built a field, because division by zero in OP's system is apparently reversible: 8 / 0 = N8 and 0 × N8 = 8.

This is not true of NaN.

Now, you cannot have division by zero in a field, so OP's system must violate one or more of the field axioms. I imagine that OP doesn't realize this, and that's why I am seeking more information by asking what 2 × N8 is.

the reason it hasn't caught on

I don't know what you mean when you say that abstract algebra "hasn't caught on." That's like saying that physics "hasn't caught on." Abstract algebra is the study of systems that exist whether you like them or not.

If you mean that many systems of numbers in computing are not fields, well, that's true; that fact causes some problems but makes other problems easier to deal with, and for many purposes it's a fair compromise. It is important, however, to realize that these number systems aren't fields. People expect them to be fields, but they aren't. For example, floating-point addition is not associative, and this is very surprising for many people, because people think of associativity as a fundamental property of numbers (because it's one of the field axioms).

On the other hand, unsigned integer arithmetic is used all the time, and that's a ring—it's straight-up modular arithmetic.

Division by zero still raises an exception in integer arithmetic. NaN is a feature of floating-point arithmetic only (specifically IEEE floating point).

[–]timshoaf -1ポイント0ポイント  (0子コメント)

I am not saying abstract algebra hasn't caught on, haha, oh god no, quite the opposite. My interests are largely in machine learning and statistics so there is a certainly an amount of algebraic topology there when dealing with inference and limit theorems over different manifolds etc.

I am saying the use of formal nomenclature and applications (such as the design of a floating point representation different from IEEE 754) hasn't really taken off. I mean Twitter has some nice libraries, and there are hundreds of libraries for that purpose, but the common computing languages don't particularly try very hard to adhere to these things. Haskell has monads built in, and they are easy to work with in other functional languages, but despite java 8s attempt at adding things like this, there hasn't been much of a concerted effort to add this stuff in C++ or Python etc. That is what I was getting at, not that the field itself is nascent or anything like that.

What it sounded like was the OP was trying to introduce a concept of utilizing an additional element in an attempt to side step the issues of division by zero, and my retort was that we do this kind of thing all the time--though I was trying to be nice about it.

[–]Random-Mathematician -2ポイント-1ポイント  (3子コメント)

It doesn't work mathematically.

Example:

N8 * 0 = 8

2 * N8 * 0 = 2 * 8 => N8 * 0 =16

8 =/= 16

[–]time_doesnt_exist 2ポイント3ポイント  (2子コメント)

You've only proved that it's not associative through multiplication.

[–]killdudes 1ポイント2ポイント  (1子コメント)

But that doesn't work mathematically either. He gives rules for a value "N8", but not for "8N". If multiplication isn't associative, that's a big problem.

[–]time_doesnt_exist 1ポイント2ポイント  (0子コメント)

I'm not saying any of this makes sense, I'm saying the user I replied to doesn't prove that what what OP is saying doesn't work mathematically just by proving it is not associative by multiplication. It may cause problems, but it doesn't rule it out.