(*  sin_integral_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the sine integral *)
(*    function at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  09 February 2006 *)
(*  Author:  John Burkardt *)

xvec = {5/10, 6/10, 7/10, 8/10, 9/10, 1, 12/10, 14/10, 16/10, 18/10, 2, 25/10, 30/10, 35/10, 40/10, 45/10};
fvec = {};
num = Length [ xvec ];

Do [ { x = xvec[[i]], f = SinIntegral[x] ,
fvec = Append [ fvec, f ],
      Print["  Si[",x,"]=",N[f,16]] },{i,1,num,1}]

fileout=OpenWrite["C:\\Documents and Settings\\burkardt\\Desktop\\Misc\\mathematica\\sin_integral_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  sin_integral_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,16],"  ",N[f,16]]},{i,1,num,1}];Close[fileout];