(*  arctanh_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the hyperbolic arctangent function *)
(*    at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  23 June 2007 *)
(*  Author:  John Burkardt *)

xvec = {-5/10, 0, 1/1000, 1/10, 2/10, 3/10, 4/10, 5/10,  6/10, 7/10, 8/10, 9/10, 99/100, 999/1000 , 999999/1000000};
fvec = {};
num = Length [ xvec ];

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

fileout=OpenWrite["/Users/burkardt/public_html/math_src/test_values/arctanh_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  arctanh_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];