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?

Invalid date error by date command

What exact color does ozone gas have?

Does Doodling or Improvising on the Piano Have Any Benefits?

What is Cash Advance APR?

Strong empirical falsification of quantum mechanics based on vacuum energy density

Mimic lecturing on blackboard, facing audience

Extract more than nine arguments that occur periodically in a sentence to use in macros in order to typset

Can I say "fingers" when referring to toes?

Add big quotation marks inside my colorbox

Angel of Condemnation - Exile creature with second ability

PTIJ: Haman's bad computer

Has any country ever had 2 former presidents in jail simultaneously?

Multiplicative persistence

Did arcade monitors have same pixel aspect ratio as TV sets?

What are the advantages of simplicial model categories over non-simplicial ones?

Are Captain Marvel's powers affected by Thanos' actions in Infinity War

Does malloc reserve more space while allocating memory?

Why is so much work done on numerical verification of the Riemann Hypothesis?

Biological Blimps: Propulsion

Quoting Keynes in a lecture

System.QueryException unexpected token

How does a computer interpret real numbers?

Terse Method to Swap Lowest for Highest?

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



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
    8 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
    7 hours ago










  • $begingroup$
    IEEE 754 is the answer.
    $endgroup$
    – Jasper
    7 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
    8 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
    7 hours ago










  • $begingroup$
    IEEE 754 is the answer.
    $endgroup$
    – Jasper
    7 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 8 hours ago









evil_potatoevil_potato

698189




698189











  • $begingroup$
    Possible duplicate of this Wikipedia article: en.wikipedia.org/wiki/Floating-point_arithmetic
    $endgroup$
    – John Dvorak
    8 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
    7 hours ago










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
















  • $begingroup$
    Possible duplicate of this Wikipedia article: en.wikipedia.org/wiki/Floating-point_arithmetic
    $endgroup$
    – John Dvorak
    8 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
    7 hours ago










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















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




$begingroup$
Possible duplicate of this Wikipedia article: en.wikipedia.org/wiki/Floating-point_arithmetic
$endgroup$
– John Dvorak
8 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
7 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
7 hours ago












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




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










2 Answers
2






active

oldest

votes


















5












$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$








  • 1




    $begingroup$
    +1. For folks interested in more information about your second paragraph, some good search terms are symbolic computation and computer algebra.
    $endgroup$
    – ruakh
    51 mins ago


















1












$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









    5












    $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$








    • 1




      $begingroup$
      +1. For folks interested in more information about your second paragraph, some good search terms are symbolic computation and computer algebra.
      $endgroup$
      – ruakh
      51 mins ago















    5












    $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$








    • 1




      $begingroup$
      +1. For folks interested in more information about your second paragraph, some good search terms are symbolic computation and computer algebra.
      $endgroup$
      – ruakh
      51 mins ago













    5












    5








    5





    $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 7 hours ago









    David RicherbyDavid Richerby

    68.9k15105194




    68.9k15105194







    • 1




      $begingroup$
      +1. For folks interested in more information about your second paragraph, some good search terms are symbolic computation and computer algebra.
      $endgroup$
      – ruakh
      51 mins ago












    • 1




      $begingroup$
      +1. For folks interested in more information about your second paragraph, some good search terms are symbolic computation and computer algebra.
      $endgroup$
      – ruakh
      51 mins ago







    1




    1




    $begingroup$
    +1. For folks interested in more information about your second paragraph, some good search terms are symbolic computation and computer algebra.
    $endgroup$
    – ruakh
    51 mins ago




    $begingroup$
    +1. For folks interested in more information about your second paragraph, some good search terms are symbolic computation and computer algebra.
    $endgroup$
    – ruakh
    51 mins ago











    1












    $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$

















      1












      $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$















        1












        1








        1





        $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 5 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

            Reverse int within the 32-bit signed integer range: [−2^31, 2^31 − 1]Combining two 32-bit integers into one 64-bit integerDetermine if an int is within rangeLossy packing 32 bit integer to 16 bitComputing the square root of a 64-bit integerKeeping integer addition within boundsSafe multiplication of two 64-bit signed integersLeetcode 10: Regular Expression MatchingSigned integer-to-ascii x86_64 assembler macroReverse the digits of an Integer“Add two numbers given in reverse order from a linked list”

            Category:Fedor von Bock Media in category "Fedor von Bock"Navigation menuUpload mediaISNI: 0000 0000 5511 3417VIAF ID: 24712551GND ID: 119294796Library of Congress authority ID: n96068363BnF ID: 12534305fSUDOC authorities ID: 034604189Open Library ID: OL338253ANKCR AUT ID: jn19990000869National Library of Israel ID: 000514068National Thesaurus for Author Names ID: 341574317ReasonatorScholiaStatistics

            Kiel Indholdsfortegnelse Historie | Transport og færgeforbindelser | Sejlsport og anden sport | Kultur | Kendte personer fra Kiel | Noter | Litteratur | Eksterne henvisninger | Navigationsmenuwww.kiel.de54°19′31″N 10°8′26″Ø / 54.32528°N 10.14056°Ø / 54.32528; 10.14056Oberbürgermeister Dr. Ulf Kämpferwww.statistik-nord.deDen danske Stats StatistikKiels hjemmesiderrrWorldCat312794080n790547494030481-4