Please answer the below question

profileNICK363

Demonstrate the Limitations in Precision of Floating Point Numbers (8 points) For this assignment, you will use a programming language of your choice to demonstrate how a lack of precision in floating point numbers can lead to incorrect results. Do the following:

 

• Determine two sequences of floating point mathematical operations that should yield the same result (e.g., 1.0 + 1.0 = 2.0 and 3.0 – 1.0 = 2.0). 

• In a programming language of your choice, perform those operations and store the results in two variables.


 • Check the variables for equivalence. If the computer determines they are equal, repeat the process with different (more complex) sequences of operations until you have two variables that should be equal in value, but the computer determines that they are not due to truncation or round-off. 


Submit a Word document with screenshots of your code and running program showing the results. 


Format your submission according to the APA style guide. Remember that all work should be your own original work and assistance received from any source and any references used must be authorized and properly documented

    • 7 years ago
    • 30
    Answer(2)

    Purchase the answer to view it

    blurred-text
    • attachment
      Nick.docx

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      Order10186798.docx