List of all members | Static Public Member Functions
casadi::BinaryOperation< OP_COPYSIGN > Struct Reference

Copysign. More...

#include <calculus.hpp>

Detailed Description

Definition at line 888 of file calculus.hpp.

Static Public Member Functions

template<typename T >
static void fcn (const T &x, const T &y, T &f)
 
template<typename T >
static void der (const T &x, const T &y, const T &f, T *d)
 

Member Function Documentation

◆ der()

template<typename T >
static void casadi::BinaryOperation< OP_COPYSIGN >::der ( const T &  x,
const T &  y,
const T &  f,
T *  d 
)
inlinestatic

Definition at line 890 of file calculus.hpp.

890  {
891  T e = 1; d[0]=copysign(e, y)*sign(x); d[1]=0;}
double sign(double x)
Sign function, note that sign(nan) == nan.
Definition: calculus.hpp:270

References casadi::sign(), and casadi::T.

◆ fcn()

template<typename T >
static void casadi::BinaryOperation< OP_COPYSIGN >::fcn ( const T &  x,
const T &  y,
T &  f 
)
inlinestatic

Definition at line 889 of file calculus.hpp.

889 { f = copysign(x, y);}

The documentation for this struct was generated from the following file: