/* tdrspbes.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: drspbes j -> dj(v,x)/dx k -> dk(v,x)/dx y -> dy(v,x)/dx The order n for each derivative can be altered by resetting n within the switch statement. */ #include "ccmath.h" #include void main(void) { double x,dx,xmx,f; char t[2]; int n,m; printf(" Sperical Bessel Function Derivative Test\n"); xmx=11.; dx=2.; for(m=0; m<4 ;++m){ switch(m){ case 0: printf(" dj(n,x)/dx\n"); t[0]='j'; n=0; x=0.; break; case 1: printf(" dy(n,x)/dx\n"); t[0]='y'; n=3; x=2.; break; case 2: printf(" dk(n,x)/dx\n"); t[0]='k'; n=2; x=2.; break; case 3: printf(" dk(n,x)/dx\n"); t[0]='k'; n= -4; x=2.; break; } printf(" order = %d\n",n); for(; x