#*****************************************************************************80 # ## d1mach_test reports the constants returned by d1mach. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 05 February 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "d1mach_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " d1mach(i) evaluates the i-th machine constant.\n" ) cat ( " associated with real double precision computer arithmetic.\n" ) source ( "/home/burkardt/public_html/r_src/machine/d1mach.R" ) cat ( "\n" ) cat ( " Assume that double precision numbers are stored\n" ) cat ( " with a mantissa of T digits in base B, with an\n" ) cat ( " exponent whose value must lie between EMIN and EMAX.\n" ) cat ( "\n" ) cat ( " For input arguments of 1 <= I <= 5,\n" ) cat ( " D1MACH will return the following values:\n" ) cat ( "\n" ) cat ( " D1MACH(1) = B^(EMIN-1), smallest positive magnitude = ", d1mach ( 1 ), "\n" ) cat ( " D1MACH(2) = B^EMAX*(1-B^(-T)), the largest magnitude = ", d1mach(2), "\n" ) cat ( " D1MACH(3) = B^(-T), the smallest relative spacing = ", d1mach(3), "\n" ) cat ( " D1MACH(4) = B^(1-T), the largest relative spacing = ", d1mach(4), "\n" ) cat ( " D1MACH(5) = log10(B) = ", d1mach(5), "\n" )