Underflow

At the opposite end of the spectrum, we have already seen small numbers that cannot be represented with <#67964#><#43555#>inex<#43555#><#67964#> structures. For example,

#displaymath74074#

is not 0, but it's smaller than the smallest non-zero number we can represent. An arithemtic <#67965#><#43557#>UNDERFLOW<#43557#><#67965#> arises when we multiply two small numbers and the result is too small to fit into our class of <#67966#><#43558#>inex<#43558#><#67966#> structures:

  <#43563#>(inex*<#43563#> <#43564#>(create-inex<#43564#> <#43565#>1<#43565#> <#43566#>-1<#43566#> <#43567#>10)<#43567#>
         <#43568#>(create-inex<#43568#> <#43569#>1<#43569#> <#43570#>-1<#43570#> <#43571#>99))<#43571#> 
<#43572#>=<#43572#> <#43573#>(create-inex<#43573#> <#43574#>1<#43574#> <#43575#>-1<#43575#> <#43576#>109)<#43576#> 
which causes an error. When underflow occurs, some language implementations signal an error; others use 0 to approximate the result. An apporximation with 0 for underflow is qualitatively different from our ealier kinds of approximations. In approximating 1250 with <#67967#><#43580#>(create-inex<#43580#>\ <#43581#>12<#43581#>\ <#43582#>+1<#43582#>\ <#43583#>2)<#43583#><#67967#>, we approximated by dropping significant digits from the mantissa, but we were left with a non-zero mantissa. The result is within 10 of the number we wanted to represent. Appromixating on underflow, however, means dropping the entire mantissa. The result is not within a predictable precentage range of the true result.
<#43586#>Exercise 33.3.1<#43586#> DrScheme's inexact number system uses <#67968#><#43588#>#<#43588#><#43589#>i0<#43589#><#67968#> to approximate underflow. Determine the smallest integer <#67969#><#43590#>n<#43590#><#67969#> such that <#67970#><#43591#>(expt<#43591#>\ <#43592#>#<#43592#><#43593#>i10.<#43593#>\ <#43594#>n)<#43594#><#67970#> is still an inexact Scheme number and <#67971#><#43595#>(expt<#43595#>\ <#43596#>#<#43596#><#43597#>i10.<#43597#>\ <#43598#>(-<#43598#>\ <#43599#>n<#43599#>\ <#43600#>1))<#43600#><#67971#> is approximated with <#67972#><#43601#>0<#43601#><#67972#>. <#43602#>Hint:<#43602#> Use a function to compute <#67973#><#43603#>n<#43603#><#67973#>.~ external Solution<#67974#><#67974#>