Department of Mathematics

Math 583: Mathematical Hacking


  1. Start a script that assigns the integer 123456789012345678901234567890 to a variable a. How many digits is that? What is \(2^64\)?
  2. Make a function called f that maps x to 1+x-x. What is f(1)? What is f(1e10)? What is f(1e20)?
  3. Make a function called dq that evaluates the difference quotient that estimates the derivative of \(g(x)=x^2\) at 1 for a given step \(h\) In other words, the function should be $$\text{dq}(h) = \frac{(1+h)^2-1^2}h.$$ Evaluate \(\text{dq}(0.1)\), \(\text{dq}(10^{-8})\), \(\text{dq}(10^{-12})\), and \(\text{dq}(10^{-16})\).

Welcome to Math 583, Hacking Mathematics.

Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us
Copyright © 2009-15 Kevin Cooper