/* xivtrg.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.) * ------------------------------------------------------------------------ */ #include "xpre.h" #include struct xpr xatan(struct xpr z) { struct xpr s,f; int k,m; if((k=xex(&z))=bias){ z=xdiv(one,z); m=1;} else m=0; f=dubtox(atan(xtodub(z))); s=xadd(one,xmul(z,z),0); for(k=0; k