gammasgn.c
Go to the documentation of this file.
1 #include "mconf.h"
2 
3 double gammasgn(double x)
4 {
5  double fx;
6 
7  if (isnan(x)) {
8  return x;
9  }
10  if (x > 0) {
11  return 1.0;
12  }
13  else {
14  fx = floor(x);
15  if (x - fx == 0.0) {
16  return 0.0;
17  }
18  else if ((int)fx % 2) {
19  return -1.0;
20  }
21  else {
22  return 1.0;
23  }
24  }
25 }
gammasgn
double gammasgn(double x)
Definition: gammasgn.c:3
fx
const double fx
Definition: testSmartStereoFactor_iSAM2.cpp:47
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
isnan
#define isnan(X)
Definition: main.h:93
mconf.h
floor
const EIGEN_DEVICE_FUNC FloorReturnType floor() const
Definition: ArrayCwiseUnaryOps.h:481


gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:02:23