(*  log10_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the logarithm base 10 *)
(*    function at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  18 June 2007 *)
(*  Author:  John Burkardt *)

xvec = { 1/100000, 1/100, 1/10, 2/10, 3/10, 4/10, 5/10, 6/10, 7/10, 8/10, 9/10, 1, 2, 3, Pi, 5, 10, 20, 100, 123456789 };
fvec = {};
num = Length [ xvec ];

Do [ { x = xvec[[i]],f = Log10[x],
fvec = Append [ fvec, f ],
      Print["  Log10[",x,"]]=",N[f,20]] },{i,1, num,1}]

fileout=OpenWrite["/Users/burkardt/public_html/math_src/test_values/log10_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  log10_values.txt"];today=DateList[];Write[fileout,"#  Created on ",today];Write[fileout,"#"];
Write[fileout,"#  x  fx"];
Write[fileout,"#"];
Do[{x=xvec[[i]];f=fvec[[i]];Write[fileout,N[x,20],"  ",N[f,20]]},{i,1,num,1}];Close[fileout];