ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
vcumdcau.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include <fvar.hpp>
00012 
00017 dvariable cumd_cauchy(const prevariable& x)
00018 {
00019   dvariable t;
00020   const double r2=sqrt(2.0);
00021   t=atan(x/r2);
00022   return (0.5 + t/PI);
00023 }
00024 
00029 dvariable kludge_cumd_cauchy(const prevariable& x)
00030 {
00031   const double r2=sqrt(2.0);
00032   dvariable t=atan(x/r2);
00033   return (0.5 + t/PI);
00034 }
00035 
00040 dvariable inv_cumd_cauchy(const prevariable& x)
00041 {
00042   const double r2=sqrt(2.0);
00043   return (r2*tan(PI*(x-0.5)));
00044 }