User Tools

Site Tools


gibson:teaching:fall-2016:math753:hw1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gibson:teaching:fall-2016:math753:hw1 [2016/09/13 07:53]
gibson
gibson:teaching:fall-2016:math753:hw1 [2016/09/15 08:07] (current)
gibson
Line 7: Line 7:
   * Work through the HW1 Julia notebook. Provide answers to the questions by filling in the cells with verbal answers or Julia code as appropriate (following [[:​gibson:​teaching:​fall-2016:​math753:​notebook-workflow | these instructions]]). ​   * Work through the HW1 Julia notebook. Provide answers to the questions by filling in the cells with verbal answers or Julia code as appropriate (following [[:​gibson:​teaching:​fall-2016:​math753:​notebook-workflow | these instructions]]). ​
   * Clean up or remove any mistakes you made along the way so that the notebook is polished and easy to read.   * Clean up or remove any mistakes you made along the way so that the notebook is polished and easy to read.
-  * Convert the HW1 Julia notebook file to something that Canvas can handle, either compressing it with  +  * Convert the HW1 Julia notebook file to something that Canvas can handle, either compressing it with [[https://​en.wikipedia.org/​wiki/​Zip_(file_format) | zip]] (using something like [[http://​www.7-zip.org/​|7-zip]] (free) or [[http://​www.winzip.com/​win/​en/​index.htm | winzip]] (%%$$%%)), or by simply change the ''​.ipynb''​ file extention to ''​.txt''​.
-[[https://​en.wikipedia.org/​wiki/​Zip_(file_format) | zip]] (using something like [[http://​www.7-zip.org/​|7-zip] (free) or [[http://​www.winzip.com/​win/​en/​index.htm | winzip]] ($$)), or by simply change the ''​.ipynb''​ file extention to ''​.txt''​.+
   * Upload your ''​.zip''​ or ''​.txt''​ HW1 Julia notebook file to the Math 753 Canvas website.   * Upload your ''​.zip''​ or ''​.txt''​ HW1 Julia notebook file to the Math 753 Canvas website.
  
  
 +A PDF of the Julia notebook is available so you can view the assignment in a browser, without Julia. ​
 +{{:​gibson:​teaching:​fall-2016:​math753:​math753-hw1-floatingpoint.pdf|(HW1 viewable as PDF)}}
  
  
 +====== update to HW1, 9/15/2016 ======
 + 
  
-A PDF of the Julia notebook is available so you can view the assignment in a browser, without Julia+**Due date: ** changed to Friday 9/16 at midnight.
  
 +**Problem 4:** The syntax for inputting a 16-bit float is ''​Float16(9.4)'',​ not ''​9.0f0''​. The latter produces a 32-bit float.
  
-{{:gibson:​teaching:fall-2016:​math753:​math753-hw1-floatingpoint.pdf|(HW1 viewable ​as PDF)}}+**Problem 6:** This one's proving challenging for people. Some hints: 
 + 
 +How many of the 7s will survive when ''​x = 4778 + 3.77777e-10''​ is computed in 16 digits? Same for ''​y''​.  
 +Once you have those rounded numbers, how many significant digits will survive in the floating=point computations $x+y$, $x-y$, etc.? If you can't figure this out, go ahead and do the computations in 64 bits and see if you can explain the answers you get. 
 + 
 +If you want to compare the 64-bit calculations to something more accurate, use Julia'​s 256-bit ''​BigFloat''​ type. There are two ways to get a ''​BigFloat''​. 
 + 
 +<​code>​ 
 +julia> BigFloat(9.4) 
 +9.400000000000000355271367880050092935562133789062500000000000000000000000000000 
 + 
 +julia> big(9.4) 
 +9.400000000000000355271367880050092935562133789062500000000000000000000000000000 
 +</​code>​ 
 + 
 +Observe, however, that though we have 80 digits of precision in a ''​BigFloat'',​ we've produced 9.4 accurate only to 16 digits. This is because you type 9.4, it's interpreted ​as a 64-bit float before it's handed off to the ''​BigFloat''​ type. To get an accurate 9.4, you can do this 
 + 
 +<​code>​ 
 +julia> big(94.0)/​big(10.0)^1 
 +9.399999999999999999999999999999999999999999999999999999999999999999999999999945  
 +</​code>​
  
    
gibson/teaching/fall-2016/math753/hw1.1473778422.txt.gz · Last modified: 2016/09/13 07:53 by gibson