How does a computer interpret real numbers?Permuting natural numbersWhat advanced math topics are recommended for computer science?Can a computer count to infinity?Representing Computations on Transcendental NumbersHow to find a subset of numbers such that its average is close to the average of the full set?What precisely differentiates Computer Science from Mathematics in theoretical context?Mathematics topics or fields that increase computer programming proficiency?How does maths consistency impacts on computer science?“Mathematical Physics”'s equivalent for Computer ScienceHow to generate evenly distributed random numbers from the tics of a Geiger Counter?

Is there a RAID 0 Equivalent for RAM?

Store Credit Card Information in Password Manager?

What if you are holding an Iron Flask with a demon inside and walk into Antimagic Field?

Strong empirical falsification of quantum mechanics based on vacuum energy density?

Why does a simple loop result in ASYNC_NETWORK_IO waits?

Multiplicative persistence

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?

Biological Blimps: Propulsion

Calculating total slots

PTIJ: Haman's bad computer

Fear of getting stuck on one programming language / technology that is not used in my country

Why can Carol Danvers change her suit colours in the first place?

Does the Linux kernel need a file system to run?

Unexpected behavior of the procedure `Area` on the object 'Polygon'

putting logo on same line but after title, latex

How to create table with 2D function values?

Why Shazam when there is already Superman?

How should I address a possible mistake to co-authors in a submitted paper

How much character growth crosses the line into breaking the character

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

How should I respond when I lied about my education and the company finds out through background check?

Do the primes contain an infinite almost arithmetic progression?

Why is short-wave infrared portion of electromagnetic spectrum so sensitive to fire?

Why did the EU agree to delay the Brexit deadline?



How does a computer interpret real numbers?


Permuting natural numbersWhat advanced math topics are recommended for computer science?Can a computer count to infinity?Representing Computations on Transcendental NumbersHow to find a subset of numbers such that its average is close to the average of the full set?What precisely differentiates Computer Science from Mathematics in theoretical context?Mathematics topics or fields that increase computer programming proficiency?How does maths consistency impacts on computer science?“Mathematical Physics”'s equivalent for Computer ScienceHow to generate evenly distributed random numbers from the tics of a Geiger Counter?













1












$begingroup$


I understand that the modern day digital computer works on the binary number system. I can also get, that the binary representation can be converted to rational numbers.



But I want to know how does the present day computational model interpret real numbers.



For eg:




On a daily basis we can see that a computer can plot graphs. But here, graphs may be continuous entities. What is the
mathematical basis, that transforms a discrete (or countable, at most)
like the binary system to something mathematically continuous like a
say, the graph of $f(x) = x$.











share|cite|improve this question









$endgroup$











  • $begingroup$
    Possible duplicate of this Wikipedia article: en.wikipedia.org/wiki/Floating-point_arithmetic
    $endgroup$
    – John Dvorak
    5 hours ago










  • $begingroup$
    Aside from floating-point approximations, there are systems that deal with the reals as mathematical entities, most notably computer algebra systems and theorem provers. Representing a particular real number "directly" (for a certain interpretation of "directly") is restricted to the computable numbers.
    $endgroup$
    – Jeroen Mostert
    5 hours ago










  • $begingroup$
    IEEE 754 is the answer.
    $endgroup$
    – Jasper
    4 hours ago















1












$begingroup$


I understand that the modern day digital computer works on the binary number system. I can also get, that the binary representation can be converted to rational numbers.



But I want to know how does the present day computational model interpret real numbers.



For eg:




On a daily basis we can see that a computer can plot graphs. But here, graphs may be continuous entities. What is the
mathematical basis, that transforms a discrete (or countable, at most)
like the binary system to something mathematically continuous like a
say, the graph of $f(x) = x$.











share|cite|improve this question









$endgroup$











  • $begingroup$
    Possible duplicate of this Wikipedia article: en.wikipedia.org/wiki/Floating-point_arithmetic
    $endgroup$
    – John Dvorak
    5 hours ago










  • $begingroup$
    Aside from floating-point approximations, there are systems that deal with the reals as mathematical entities, most notably computer algebra systems and theorem provers. Representing a particular real number "directly" (for a certain interpretation of "directly") is restricted to the computable numbers.
    $endgroup$
    – Jeroen Mostert
    5 hours ago










  • $begingroup$
    IEEE 754 is the answer.
    $endgroup$
    – Jasper
    4 hours ago













1












1








1





$begingroup$


I understand that the modern day digital computer works on the binary number system. I can also get, that the binary representation can be converted to rational numbers.



But I want to know how does the present day computational model interpret real numbers.



For eg:




On a daily basis we can see that a computer can plot graphs. But here, graphs may be continuous entities. What is the
mathematical basis, that transforms a discrete (or countable, at most)
like the binary system to something mathematically continuous like a
say, the graph of $f(x) = x$.











share|cite|improve this question









$endgroup$




I understand that the modern day digital computer works on the binary number system. I can also get, that the binary representation can be converted to rational numbers.



But I want to know how does the present day computational model interpret real numbers.



For eg:




On a daily basis we can see that a computer can plot graphs. But here, graphs may be continuous entities. What is the
mathematical basis, that transforms a discrete (or countable, at most)
like the binary system to something mathematically continuous like a
say, the graph of $f(x) = x$.








mathematical-programming mathematical-foundations






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked 5 hours ago









evil_potatoevil_potato

698189




698189











  • $begingroup$
    Possible duplicate of this Wikipedia article: en.wikipedia.org/wiki/Floating-point_arithmetic
    $endgroup$
    – John Dvorak
    5 hours ago










  • $begingroup$
    Aside from floating-point approximations, there are systems that deal with the reals as mathematical entities, most notably computer algebra systems and theorem provers. Representing a particular real number "directly" (for a certain interpretation of "directly") is restricted to the computable numbers.
    $endgroup$
    – Jeroen Mostert
    5 hours ago










  • $begingroup$
    IEEE 754 is the answer.
    $endgroup$
    – Jasper
    4 hours ago
















  • $begingroup$
    Possible duplicate of this Wikipedia article: en.wikipedia.org/wiki/Floating-point_arithmetic
    $endgroup$
    – John Dvorak
    5 hours ago










  • $begingroup$
    Aside from floating-point approximations, there are systems that deal with the reals as mathematical entities, most notably computer algebra systems and theorem provers. Representing a particular real number "directly" (for a certain interpretation of "directly") is restricted to the computable numbers.
    $endgroup$
    – Jeroen Mostert
    5 hours ago










  • $begingroup$
    IEEE 754 is the answer.
    $endgroup$
    – Jasper
    4 hours ago















$begingroup$
Possible duplicate of this Wikipedia article: en.wikipedia.org/wiki/Floating-point_arithmetic
$endgroup$
– John Dvorak
5 hours ago




$begingroup$
Possible duplicate of this Wikipedia article: en.wikipedia.org/wiki/Floating-point_arithmetic
$endgroup$
– John Dvorak
5 hours ago












$begingroup$
Aside from floating-point approximations, there are systems that deal with the reals as mathematical entities, most notably computer algebra systems and theorem provers. Representing a particular real number "directly" (for a certain interpretation of "directly") is restricted to the computable numbers.
$endgroup$
– Jeroen Mostert
5 hours ago




$begingroup$
Aside from floating-point approximations, there are systems that deal with the reals as mathematical entities, most notably computer algebra systems and theorem provers. Representing a particular real number "directly" (for a certain interpretation of "directly") is restricted to the computable numbers.
$endgroup$
– Jeroen Mostert
5 hours ago












$begingroup$
IEEE 754 is the answer.
$endgroup$
– Jasper
4 hours ago




$begingroup$
IEEE 754 is the answer.
$endgroup$
– Jasper
4 hours ago










2 Answers
2






active

oldest

votes


















4












$begingroup$

They represent continuous quantities with discrete approximations. Mostly, this is done with floating point, which is analogous to scientific notation. Essentially, they work with something like $1.xyztimes 10^k$, with some appropriate number of decimal places (and in binary, rather than decimal).



It's also possible to work with some irrational numbers directly. For example, you could create yourself an object called "$sqrt2$" without particularly worrying about what it is, except that it obeys the usual arithmetic rules and that $(sqrt2)^2=2$. So then you could compute $$(sqrt2-1)(sqrt2+1) = (sqrt2)^2 + sqrt2 - sqrt2 - 1 = 2 - 1 = 1$$
exactly, as an algebraic fact that's not susceptible to rounding errors.



Note that, if you're plotting a graph on screen, regardless of how far you zoom in, you're plotting it as discrete pixels so using an appropriate number of significant figures basically gets you everything you need.






share|cite|improve this answer









$endgroup$




















    0












    $begingroup$

    The real numbers are uncountable. The set of real numbers that can be represented in any way is countable. Therefore, almost all real numbers cannot be represented by a computer at all.



    The most common method is to store floating point numbers, which are reasonably precise approximations to real numbers that are not excessively large or small.






    share|cite|improve this answer









    $endgroup$












      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: "419"
      ;
      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',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f105923%2fhow-does-a-computer-interpret-real-numbers%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4












      $begingroup$

      They represent continuous quantities with discrete approximations. Mostly, this is done with floating point, which is analogous to scientific notation. Essentially, they work with something like $1.xyztimes 10^k$, with some appropriate number of decimal places (and in binary, rather than decimal).



      It's also possible to work with some irrational numbers directly. For example, you could create yourself an object called "$sqrt2$" without particularly worrying about what it is, except that it obeys the usual arithmetic rules and that $(sqrt2)^2=2$. So then you could compute $$(sqrt2-1)(sqrt2+1) = (sqrt2)^2 + sqrt2 - sqrt2 - 1 = 2 - 1 = 1$$
      exactly, as an algebraic fact that's not susceptible to rounding errors.



      Note that, if you're plotting a graph on screen, regardless of how far you zoom in, you're plotting it as discrete pixels so using an appropriate number of significant figures basically gets you everything you need.






      share|cite|improve this answer









      $endgroup$

















        4












        $begingroup$

        They represent continuous quantities with discrete approximations. Mostly, this is done with floating point, which is analogous to scientific notation. Essentially, they work with something like $1.xyztimes 10^k$, with some appropriate number of decimal places (and in binary, rather than decimal).



        It's also possible to work with some irrational numbers directly. For example, you could create yourself an object called "$sqrt2$" without particularly worrying about what it is, except that it obeys the usual arithmetic rules and that $(sqrt2)^2=2$. So then you could compute $$(sqrt2-1)(sqrt2+1) = (sqrt2)^2 + sqrt2 - sqrt2 - 1 = 2 - 1 = 1$$
        exactly, as an algebraic fact that's not susceptible to rounding errors.



        Note that, if you're plotting a graph on screen, regardless of how far you zoom in, you're plotting it as discrete pixels so using an appropriate number of significant figures basically gets you everything you need.






        share|cite|improve this answer









        $endgroup$















          4












          4








          4





          $begingroup$

          They represent continuous quantities with discrete approximations. Mostly, this is done with floating point, which is analogous to scientific notation. Essentially, they work with something like $1.xyztimes 10^k$, with some appropriate number of decimal places (and in binary, rather than decimal).



          It's also possible to work with some irrational numbers directly. For example, you could create yourself an object called "$sqrt2$" without particularly worrying about what it is, except that it obeys the usual arithmetic rules and that $(sqrt2)^2=2$. So then you could compute $$(sqrt2-1)(sqrt2+1) = (sqrt2)^2 + sqrt2 - sqrt2 - 1 = 2 - 1 = 1$$
          exactly, as an algebraic fact that's not susceptible to rounding errors.



          Note that, if you're plotting a graph on screen, regardless of how far you zoom in, you're plotting it as discrete pixels so using an appropriate number of significant figures basically gets you everything you need.






          share|cite|improve this answer









          $endgroup$



          They represent continuous quantities with discrete approximations. Mostly, this is done with floating point, which is analogous to scientific notation. Essentially, they work with something like $1.xyztimes 10^k$, with some appropriate number of decimal places (and in binary, rather than decimal).



          It's also possible to work with some irrational numbers directly. For example, you could create yourself an object called "$sqrt2$" without particularly worrying about what it is, except that it obeys the usual arithmetic rules and that $(sqrt2)^2=2$. So then you could compute $$(sqrt2-1)(sqrt2+1) = (sqrt2)^2 + sqrt2 - sqrt2 - 1 = 2 - 1 = 1$$
          exactly, as an algebraic fact that's not susceptible to rounding errors.



          Note that, if you're plotting a graph on screen, regardless of how far you zoom in, you're plotting it as discrete pixels so using an appropriate number of significant figures basically gets you everything you need.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered 5 hours ago









          David RicherbyDavid Richerby

          68.9k15105194




          68.9k15105194





















              0












              $begingroup$

              The real numbers are uncountable. The set of real numbers that can be represented in any way is countable. Therefore, almost all real numbers cannot be represented by a computer at all.



              The most common method is to store floating point numbers, which are reasonably precise approximations to real numbers that are not excessively large or small.






              share|cite|improve this answer









              $endgroup$

















                0












                $begingroup$

                The real numbers are uncountable. The set of real numbers that can be represented in any way is countable. Therefore, almost all real numbers cannot be represented by a computer at all.



                The most common method is to store floating point numbers, which are reasonably precise approximations to real numbers that are not excessively large or small.






                share|cite|improve this answer









                $endgroup$















                  0












                  0








                  0





                  $begingroup$

                  The real numbers are uncountable. The set of real numbers that can be represented in any way is countable. Therefore, almost all real numbers cannot be represented by a computer at all.



                  The most common method is to store floating point numbers, which are reasonably precise approximations to real numbers that are not excessively large or small.






                  share|cite|improve this answer









                  $endgroup$



                  The real numbers are uncountable. The set of real numbers that can be represented in any way is countable. Therefore, almost all real numbers cannot be represented by a computer at all.



                  The most common method is to store floating point numbers, which are reasonably precise approximations to real numbers that are not excessively large or small.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered 2 hours ago









                  gnasher729gnasher729

                  11.3k1217




                  11.3k1217



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Computer Science Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f105923%2fhow-does-a-computer-interpret-real-numbers%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Era Viking Índice Início da Era Viquingue | Cotidiano | Sociedade | Língua | Religião | A arte | As primeiras cidades | As viagens dos viquingues | Viquingues do Oeste e Leste | Fim da Era Viquingue | Fontes históricas | Referências Bibliografia | Ligações externas | Menu de navegação«Sverige då!»«Handel I vikingetid»«O que é Nórdico Antigo»Mito, magia e religião na volsunga saga Um olhar sobre a trajetória mítica do herói sigurd«Bonden var den verklige vikingen»«Vikingatiden»«Vikingatiden»«Vinland»«Guerreiras de Óðinn: As Valkyrjor na Mitologia Viking»1519-9053«Esculpindo símbolos e seres: A arte viking em pedras rúnicas»1679-9313Historia - Tema: VikingarnaAventura e Magia no Mundo das Sagas IslandesasEra Vikinge

                      What's the metal clinking sound at the end of credits in Avengers: Endgame?What makes Thanos so strong in Avengers: Endgame?Who is the character that appears at the end of Endgame?What happens to Mjolnir (Thor's hammer) at the end of Endgame?The People's Ages in Avengers: EndgameWhat did Nebula do in Avengers: Endgame?Messing with time in the Avengers: Endgame climaxAvengers: Endgame timelineWhat are the time-travel rules in Avengers Endgame?Why use this song in Avengers: Endgame Opening Logo Sequence?Peggy's age in Avengers Endgame

                      Mortes em março de 2019 Referências Menu de navegação«Zhores Alferov, Nobel de Física bielorrusso, morre aos 88 anos - Ciência»«Fallece Rafael Torija, o bispo emérito de Ciudad Real»«Peter Hurford dies at 88»«Keith Flint, vocalista do The Prodigy, morre aos 49 anos»«Luke Perry, ator de 'Barrados no baile' e 'Riverdale', morre aos 52 anos»«Former Rangers and Scotland captain Eric Caldow dies, aged 84»«Morreu, aos 61 anos, a antiga lenda do wrestling King Kong Bundy»«Fallece el actor y director teatral Abraham Stavans»«In Memoriam Guillaume Faye»«Sidney Sheinberg, a Force Behind Universal and Spielberg, Is Dead at 84»«Carmine Persico, Colombo Crime Family Boss, Is Dead at 85»«Dirigent Michael Gielen gestorben»«Ciclista tricampeã mundial e prata na Rio 2016 é encontrada morta em casa aos 23 anos»«Pagan Community Notes: Raven Grimassi dies, Indianapolis pop-up event cancelled, Circle Sanctuary announces new podcast, and more!»«Hal Blaine, Wrecking Crew Drummer, Dies at 90»«Morre Coutinho, que editou dupla lendária com Pelé no Santos»«Cantor Demétrius, ídolo da Jovem Guarda, morre em SP»«Ex-presidente do Vasco, Eurico Miranda morre no Rio de Janeiro»«Bronze no Mundial de basquete de 1971, Laís Elena morre aos 76 anos»«Diretor de Corridas da F1, Charlie Whiting morre aos 66 anos às vésperas do GP da Austrália»«Morreu o cardeal Danneels, da Bélgica»«Morreu o cartoonista Augusto Cid»«Morreu a atriz Maria Isabel de Lizandra, de "Vale Tudo" e novelas da Tupi»«WS Merwin, prize-winning poet of nature, dies at 91»«Atriz Márcia Real morre em São Paulo aos 88 anos»«Mauritanie: décès de l'ancien président Mohamed Mahmoud ould Louly»«Morreu Dick Dale, o rei da surf guitar e de "Pulp Fiction"»«Falleció Víctor Genes»«João Carlos Marinho, autor de 'O Gênio do Crime', morre em SP»«Legendary Horror Director and SFX Artist John Carl Buechler Dies at 66»«Morre em Salvador a religiosa Makota Valdina»«مرگ بازیکن‌ سابق نساجی بر اثر سقوط سنگ در مازندران»«Domingos Oliveira morre no Rio»«Morre Airton Ravagniani, ex-São Paulo, Fla, Vasco, Grêmio e Sport - Notícias»«Morre o escritor Flavio Moreira da Costa»«Larry Cohen, Writer-Director of 'It's Alive' and 'Hell Up in Harlem,' Dies at 77»«Scott Walker, experimental singer-songwriter, dead at 76»«Joseph Pilato, Day of the Dead Star and Horror Favorite, Dies at 70»«Sheffield United set to pay tribute to legendary goalkeeper Ted Burgin who has died at 91»«Morre Rafael Henzel, sobrevivente de acidente aéreo da Chapecoense»«Morre Valery Bykovsky, um dos primeiros cosmonautas da União Soviética»«Agnès Varda, cineasta da Nouvelle Vague, morre aos 90 anos»«Agnès Varda, cineasta francesa, morre aos 90 anos»«Tania Mallet, James Bond Actress and Helen Mirren's Cousin, Dies at 77»e