Terminology: algebraic structure for âfloating pointâ arithmetic
Clash Royale CLAN TAG#URR8PPP
up vote
9
down vote
favorite
"floating point arithmetic" is a terminology that refer to the arithmetic perform over (finite) representation of real number. See the wikipedia article for more details.
In the formal specification of floating point arithmetic (that should be used by all the major programming languages), it is specified that a "Not A number" (NaN) value should be a number.
If we abstract the fact that floating point arithmetic care only of finitely many values and abstract a bit, we get a sort of arithmetic arithmetic over $mathbbRcuptextrmNaN$ with $textrmNaN$ being a zero for any arithmetic operation. Formally, for all $x$,
$$xtimes textrmNaN = x +ÃÂ textrmNaN = fracx0 = frac00= cdots =textrmNaN$$
Is there any algebraic structures $(E,+,times)$ having axioms allowing this or is it just to arbitrary to have been introduced even in weird part of algebra?
computer-science
add a comment |Â
up vote
9
down vote
favorite
"floating point arithmetic" is a terminology that refer to the arithmetic perform over (finite) representation of real number. See the wikipedia article for more details.
In the formal specification of floating point arithmetic (that should be used by all the major programming languages), it is specified that a "Not A number" (NaN) value should be a number.
If we abstract the fact that floating point arithmetic care only of finitely many values and abstract a bit, we get a sort of arithmetic arithmetic over $mathbbRcuptextrmNaN$ with $textrmNaN$ being a zero for any arithmetic operation. Formally, for all $x$,
$$xtimes textrmNaN = x +ÃÂ textrmNaN = fracx0 = frac00= cdots =textrmNaN$$
Is there any algebraic structures $(E,+,times)$ having axioms allowing this or is it just to arbitrary to have been introduced even in weird part of algebra?
computer-science
4
Just to point out: Floating point arithmetic is rather horrible from an algebraic perspective. It does not even have associativity of addition, not to speak of any other nice properties.
â Arno
11 hours ago
Sure, I abstract my way out of that and just care about this NaN value for this reason.
â C.P.
11 hours ago
4
$x/0 = infty$ rather than NaN in floating point (for $x>0$, $-infty$ for $x < 0$)
â J.J. Green
11 hours ago
3
Also remember that NaN != NaN, which probably breaks all sorts of other axioms.
â HP Williams
8 hours ago
1
You will find an introductory discussion about the operations on floating point numbers in the relevant chapter of âÂÂthe Art of Computer Programmingâ (Knuth). As @arno pointed out, from an algebraic perspective, it is a rather horrible world. Besides the actual operations, the interesting structure to study is the representation error of the number and the statistical properties of this. (For instance, given the distribution of inputs for a program or formula it could be tractable to compute the distribution of the error in the output.)
â Michael Le Barbier Grünewald
6 hours ago
add a comment |Â
up vote
9
down vote
favorite
up vote
9
down vote
favorite
"floating point arithmetic" is a terminology that refer to the arithmetic perform over (finite) representation of real number. See the wikipedia article for more details.
In the formal specification of floating point arithmetic (that should be used by all the major programming languages), it is specified that a "Not A number" (NaN) value should be a number.
If we abstract the fact that floating point arithmetic care only of finitely many values and abstract a bit, we get a sort of arithmetic arithmetic over $mathbbRcuptextrmNaN$ with $textrmNaN$ being a zero for any arithmetic operation. Formally, for all $x$,
$$xtimes textrmNaN = x +ÃÂ textrmNaN = fracx0 = frac00= cdots =textrmNaN$$
Is there any algebraic structures $(E,+,times)$ having axioms allowing this or is it just to arbitrary to have been introduced even in weird part of algebra?
computer-science
"floating point arithmetic" is a terminology that refer to the arithmetic perform over (finite) representation of real number. See the wikipedia article for more details.
In the formal specification of floating point arithmetic (that should be used by all the major programming languages), it is specified that a "Not A number" (NaN) value should be a number.
If we abstract the fact that floating point arithmetic care only of finitely many values and abstract a bit, we get a sort of arithmetic arithmetic over $mathbbRcuptextrmNaN$ with $textrmNaN$ being a zero for any arithmetic operation. Formally, for all $x$,
$$xtimes textrmNaN = x +ÃÂ textrmNaN = fracx0 = frac00= cdots =textrmNaN$$
Is there any algebraic structures $(E,+,times)$ having axioms allowing this or is it just to arbitrary to have been introduced even in weird part of algebra?
computer-science
computer-science
edited 11 hours ago
Martin Sleziak
2,75432028
2,75432028
asked 12 hours ago
C.P.
23824
23824
4
Just to point out: Floating point arithmetic is rather horrible from an algebraic perspective. It does not even have associativity of addition, not to speak of any other nice properties.
â Arno
11 hours ago
Sure, I abstract my way out of that and just care about this NaN value for this reason.
â C.P.
11 hours ago
4
$x/0 = infty$ rather than NaN in floating point (for $x>0$, $-infty$ for $x < 0$)
â J.J. Green
11 hours ago
3
Also remember that NaN != NaN, which probably breaks all sorts of other axioms.
â HP Williams
8 hours ago
1
You will find an introductory discussion about the operations on floating point numbers in the relevant chapter of âÂÂthe Art of Computer Programmingâ (Knuth). As @arno pointed out, from an algebraic perspective, it is a rather horrible world. Besides the actual operations, the interesting structure to study is the representation error of the number and the statistical properties of this. (For instance, given the distribution of inputs for a program or formula it could be tractable to compute the distribution of the error in the output.)
â Michael Le Barbier Grünewald
6 hours ago
add a comment |Â
4
Just to point out: Floating point arithmetic is rather horrible from an algebraic perspective. It does not even have associativity of addition, not to speak of any other nice properties.
â Arno
11 hours ago
Sure, I abstract my way out of that and just care about this NaN value for this reason.
â C.P.
11 hours ago
4
$x/0 = infty$ rather than NaN in floating point (for $x>0$, $-infty$ for $x < 0$)
â J.J. Green
11 hours ago
3
Also remember that NaN != NaN, which probably breaks all sorts of other axioms.
â HP Williams
8 hours ago
1
You will find an introductory discussion about the operations on floating point numbers in the relevant chapter of âÂÂthe Art of Computer Programmingâ (Knuth). As @arno pointed out, from an algebraic perspective, it is a rather horrible world. Besides the actual operations, the interesting structure to study is the representation error of the number and the statistical properties of this. (For instance, given the distribution of inputs for a program or formula it could be tractable to compute the distribution of the error in the output.)
â Michael Le Barbier Grünewald
6 hours ago
4
4
Just to point out: Floating point arithmetic is rather horrible from an algebraic perspective. It does not even have associativity of addition, not to speak of any other nice properties.
â Arno
11 hours ago
Just to point out: Floating point arithmetic is rather horrible from an algebraic perspective. It does not even have associativity of addition, not to speak of any other nice properties.
â Arno
11 hours ago
Sure, I abstract my way out of that and just care about this NaN value for this reason.
â C.P.
11 hours ago
Sure, I abstract my way out of that and just care about this NaN value for this reason.
â C.P.
11 hours ago
4
4
$x/0 = infty$ rather than NaN in floating point (for $x>0$, $-infty$ for $x < 0$)
â J.J. Green
11 hours ago
$x/0 = infty$ rather than NaN in floating point (for $x>0$, $-infty$ for $x < 0$)
â J.J. Green
11 hours ago
3
3
Also remember that NaN != NaN, which probably breaks all sorts of other axioms.
â HP Williams
8 hours ago
Also remember that NaN != NaN, which probably breaks all sorts of other axioms.
â HP Williams
8 hours ago
1
1
You will find an introductory discussion about the operations on floating point numbers in the relevant chapter of âÂÂthe Art of Computer Programmingâ (Knuth). As @arno pointed out, from an algebraic perspective, it is a rather horrible world. Besides the actual operations, the interesting structure to study is the representation error of the number and the statistical properties of this. (For instance, given the distribution of inputs for a program or formula it could be tractable to compute the distribution of the error in the output.)
â Michael Le Barbier Grünewald
6 hours ago
You will find an introductory discussion about the operations on floating point numbers in the relevant chapter of âÂÂthe Art of Computer Programmingâ (Knuth). As @arno pointed out, from an algebraic perspective, it is a rather horrible world. Besides the actual operations, the interesting structure to study is the representation error of the number and the statistical properties of this. (For instance, given the distribution of inputs for a program or formula it could be tractable to compute the distribution of the error in the output.)
â Michael Le Barbier Grünewald
6 hours ago
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
10
down vote
accepted
The abstract picture here is that of adjoining an undefined or bottom element to a (partial) algebra. Doing this to a total algebra is boring, but it is a useful trick to turn partial algebras into total ones.
One just picks an element $bot$ not in the carrier set, and extends the operations as follows: Any operation applied to a tuple outside its original domain yields $bot$, including any tuple containing a $bot$ somewhere.
The structure you are describing is then just the $1$-point totalirization of the partial algebra $(mathbbR,+,times,/)$. The algebras arising in such a manner will hardly ever have very familiar properties. In particular, I don't think people name them directly, and would rather speak about the underlying partial algebras.
Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
â C.P.
11 hours ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
10
down vote
accepted
The abstract picture here is that of adjoining an undefined or bottom element to a (partial) algebra. Doing this to a total algebra is boring, but it is a useful trick to turn partial algebras into total ones.
One just picks an element $bot$ not in the carrier set, and extends the operations as follows: Any operation applied to a tuple outside its original domain yields $bot$, including any tuple containing a $bot$ somewhere.
The structure you are describing is then just the $1$-point totalirization of the partial algebra $(mathbbR,+,times,/)$. The algebras arising in such a manner will hardly ever have very familiar properties. In particular, I don't think people name them directly, and would rather speak about the underlying partial algebras.
Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
â C.P.
11 hours ago
add a comment |Â
up vote
10
down vote
accepted
The abstract picture here is that of adjoining an undefined or bottom element to a (partial) algebra. Doing this to a total algebra is boring, but it is a useful trick to turn partial algebras into total ones.
One just picks an element $bot$ not in the carrier set, and extends the operations as follows: Any operation applied to a tuple outside its original domain yields $bot$, including any tuple containing a $bot$ somewhere.
The structure you are describing is then just the $1$-point totalirization of the partial algebra $(mathbbR,+,times,/)$. The algebras arising in such a manner will hardly ever have very familiar properties. In particular, I don't think people name them directly, and would rather speak about the underlying partial algebras.
Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
â C.P.
11 hours ago
add a comment |Â
up vote
10
down vote
accepted
up vote
10
down vote
accepted
The abstract picture here is that of adjoining an undefined or bottom element to a (partial) algebra. Doing this to a total algebra is boring, but it is a useful trick to turn partial algebras into total ones.
One just picks an element $bot$ not in the carrier set, and extends the operations as follows: Any operation applied to a tuple outside its original domain yields $bot$, including any tuple containing a $bot$ somewhere.
The structure you are describing is then just the $1$-point totalirization of the partial algebra $(mathbbR,+,times,/)$. The algebras arising in such a manner will hardly ever have very familiar properties. In particular, I don't think people name them directly, and would rather speak about the underlying partial algebras.
The abstract picture here is that of adjoining an undefined or bottom element to a (partial) algebra. Doing this to a total algebra is boring, but it is a useful trick to turn partial algebras into total ones.
One just picks an element $bot$ not in the carrier set, and extends the operations as follows: Any operation applied to a tuple outside its original domain yields $bot$, including any tuple containing a $bot$ somewhere.
The structure you are describing is then just the $1$-point totalirization of the partial algebra $(mathbbR,+,times,/)$. The algebras arising in such a manner will hardly ever have very familiar properties. In particular, I don't think people name them directly, and would rather speak about the underlying partial algebras.
answered 11 hours ago
Arno
1,2491020
1,2491020
Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
â C.P.
11 hours ago
add a comment |Â
Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
â C.P.
11 hours ago
Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
â C.P.
11 hours ago
Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
â C.P.
11 hours ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathoverflow.net%2fquestions%2f312389%2fterminology-algebraic-structure-for-floating-point-arithmetic%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
4
Just to point out: Floating point arithmetic is rather horrible from an algebraic perspective. It does not even have associativity of addition, not to speak of any other nice properties.
â Arno
11 hours ago
Sure, I abstract my way out of that and just care about this NaN value for this reason.
â C.P.
11 hours ago
4
$x/0 = infty$ rather than NaN in floating point (for $x>0$, $-infty$ for $x < 0$)
â J.J. Green
11 hours ago
3
Also remember that NaN != NaN, which probably breaks all sorts of other axioms.
â HP Williams
8 hours ago
1
You will find an introductory discussion about the operations on floating point numbers in the relevant chapter of âÂÂthe Art of Computer Programmingâ (Knuth). As @arno pointed out, from an algebraic perspective, it is a rather horrible world. Besides the actual operations, the interesting structure to study is the representation error of the number and the statistical properties of this. (For instance, given the distribution of inputs for a program or formula it could be tractable to compute the distribution of the error in the output.)
â Michael Le Barbier Grünewald
6 hours ago