ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
df1b2pow.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  */
11 #include <df1b2fun.h>
12 
17 double ADpow_fun(double x,double y)
18 {
19  return pow(x,y);
20 }
21 
26 double AD_pow_1(double x,double y)
27 {
28  return y*pow(x,y-1);
29 }
30 
35 double AD_pow_2(double x,double y)
36 {
37  return pow(x,y)*log(x);
38 }
39 
44 double AD_pow_22(double x,double y)
45 {
46  return pow(x,y)*square(log(x));
47 }
48 
53 double AD_pow_122(double x,double y)
54 {
55  double xy1=pow(x,y-1.0);
56  double lx=log(x);
57  return xy1*lx*(y*lx + 2.0);
58 }
59 
64 double AD_pow_12(double x,double y)
65 {
66  double xy1=pow(x,y-1.0);
67  return xy1*(1.0 + y*log(x));
68 }
69 
74 double AD_pow_11(double x,double y)
75 {
76  return (y-1.0)*y*pow(x,y-2.0);
77 }
78 
83 double AD_pow_111(double x,double y)
84 {
85  return (y-2.0)*(y-1.0)*y*pow(x,y-3.0);
86 }
87 
92 double AD_pow_112(double x,double y)
93 {
94  return pow(x,y-2)*(2.0*y-1.0 + y*(y-1)*log(x) + x);
95 }
96 
101 double AD_pow_222(double x,double y)
102 {
103  return pow(x,y)*cube(log(x));
104 }
105 
110  AD_pow_222);
111 /*
112 df1b2variable pow(const df1b2variable& x,const df1b2variable& y)
113 {
114  return ADf1b2_pow(x,y);
115 }
116 */
double AD_pow_1(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:26
df1b2function2 ADf1b2_pow(ADpow_fun, AD_pow_1, AD_pow_2, AD_pow_11, AD_pow_12, AD_pow_22, AD_pow_111, AD_pow_112, AD_pow_122, AD_pow_222)
double AD_pow_12(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:64
#define x
double AD_pow_22(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:44
double ADpow_fun(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:17
d3_array cube(const d3_array &m)
Description not yet available.
Definition: d3arr5.cpp:17
double AD_pow_222(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:101
Description not yet available.
Definition: df1b2fun.h:431
double AD_pow_111(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:83
Description not yet available.
double AD_pow_122(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:53
double AD_pow_2(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:35
double AD_pow_11(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:74
double square(const double value)
Return square of value; constant object.
Definition: d3arr4.cpp:16
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Definition: d3arr2a.cpp:13
double AD_pow_112(double x, double y)
Description not yet available.
Definition: df1b2pow.cpp:92
d3_array pow(const d3_array &m, int e)
Description not yet available.
Definition: d3arr6.cpp:17