(* arcsin_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the arc sine *)
(*    function at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  12 June 2007 *)
(*  Author:  John Burkardt *)

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

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

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