Notes on problem 4.8

  1. The inexact->exact function can be used to convert from a floating point data type to an integer. This is really useful for the sci-exponent function in 4.8.
  2. Write sci-exponent first. Then write sci-coefficient. Then write scientific.
  3. sci-exponent involves something called change of base. If you have not done this using logarithms in a math class (or if you have forgotten how), please see the teacher for help. For those who just need a friendly reminder:
    1. log10(n) = logb(n)/logb(10)
    2. In Scheme, the natural log function, ln, not ln, but rather log. In other words, (log 29) in Scheme is ln(29) in your math class.
    3. So, if you want to compute log10(29), it is equal to logb(29)/logb(10)