ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fvar_op8.cpp
Go to the documentation of this file.
1 
9 #include "fvar.hpp"
10 
19 {
21 
22  double x=value(v1);
23  double x2=x*x;
24 
25  RETURN_PTR->v->x=x2*x;
27  &(RETURN_PTR->v->x), &(v1.v->x), 3.0*x2);
28 
29  return *RETURN_PTR;
30 }
39 {
41 
42  double x=value(v1);
43  double x2=x*x;
44 
45  RETURN_PTR->v->x=x2*x2;
47  &(RETURN_PTR->v->x), &(v1.v->x), 4.0*x2*x);
48 
49  return *RETURN_PTR;
50 }
void default_evaluation2(void)
Description not yet available.
Definition: def_eval.cpp:136
Base class for dvariable.
Definition: fvar.hpp:1315
#define x
d3_array cube(const d3_array &m)
Description not yet available.
Definition: d3arr5.cpp:17
void set_gradient_stack(void(*func)(void), double *dep_addr, double *ind_addr1=NULL, double mult1=0, double *ind_addr2=NULL, double mult2=0)
Description not yet available.
Definition: fvar.hpp:1045
static dvariable * next_RETURN_PTR()
Definition: gradstrc.cpp:457
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double_and_int * v
pointer to the data
Definition: fvar.hpp:1333
dvector value(const df1_one_vector &v)
Definition: df11fun.cpp:69
static _THREAD grad_stack * GRAD_STACK1
Fundamental data type for reverse mode automatic differentiation.
Definition: fvar.hpp:1518
double fourth(const double m)
Fourth power of a number; constant objects.
Definition: dvector.cpp:704
double x
< value of the variable
Definition: fvar.hpp:195