Terminology: algebraic structure for “floating point” arithmetic

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
9
down vote

favorite
1












"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?










share|cite|improve this question



















  • 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















up vote
9
down vote

favorite
1












"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?










share|cite|improve this question



















  • 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













up vote
9
down vote

favorite
1









up vote
9
down vote

favorite
1






1





"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?










share|cite|improve this question















"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






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








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













  • 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











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.






share|cite|improve this answer




















  • Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
    – C.P.
    11 hours ago










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "504"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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






























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.






share|cite|improve this answer




















  • Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
    – C.P.
    11 hours ago














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.






share|cite|improve this answer




















  • Thanks, it was a bit expected. I am used to partial monoids and this kind of operations for them.
    – C.P.
    11 hours ago












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.






share|cite|improve this answer












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.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










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
















  • 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

















 

draft saved


draft discarded















































 


draft saved


draft discarded














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













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?