/* tspbes.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ /* Test: Spherical Bessel Functions jspbes yspbes kspbes */ #include "ccmath.h" #include void main(void) { double (*funs)(int,double); double x,dx,xmx,f,s; char t[2]; int n,i; printf(" Test of Spherical Bessel Functions\n"); xmx=10.; dx=0.5; for(i=0; i<4 ;++i){ switch(i){ case 0: t[0]='j'; x=0.; n=0; funs=jspbes; printf(" j(n,x)\n"); break; case 1: t[0]='y'; x=0.5; n=1; funs=yspbes; printf(" y(n,x)\n"); break; case 2: t[0]='k'; x=0.5; n=1; funs=kspbes; printf(" k(n,x)\n"); break; case 3: t[0]='e'; x=0.5; n=1; funs=kspbes; printf(" k(n,-x)\n"); break; } if(t[0]=='e') s= -1; else s=1; for(; x