dd_real.c
Go to the documentation of this file.
1 /*
2  * src/double2.cc
3  *
4  * This work was supported by the Director, Office of Science, Division
5  * of Mathematical, Information, and Computational Sciences of the
6  * U.S. Department of Energy under contract numbers DE-AC03-76SF00098 and
7  * DE-AC02-05CH11231.
8  *
9  * Copyright (c) 2003-2009, The Regents of the University of California,
10  * through Lawrence Berkeley National Laboratory (subject to receipt of
11  * any required approvals from U.S. Dept. of Energy) All rights reserved.
12  *
13  * By downloading or using this software you are agreeing to the modified
14  * BSD license "BSD-LBNL-License.doc" (see LICENSE.txt).
15  */
16 /*
17  * Contains implementation of non-inlined functions of double-double
18  * package. Inlined functions are found in dd_real_inline.h.
19  */
20 
21 /*
22  * This code taken from v2.3.18 of the qd package.
23 */
24 
25 
26 #include <float.h>
27 #include <limits.h>
28 #include <math.h>
29 #include <stdlib.h>
30 
31 #include "dd_real.h"
32 
33 #define _DD_REAL_INIT(A, B) {{A, B}}
34 
35 const double DD_C_EPS = 4.93038065763132e-32; // 2^-104
36 const double DD_C_MIN_NORMALIZED = 2.0041683600089728e-292; // = 2^(-1022 + 53)
37 
38 /* Compile-time initialization of const double2 structs */
39 
41  _DD_REAL_INIT(1.79769313486231570815e+308, 9.97920154767359795037e+291);
43  _DD_REAL_INIT(1.7976931080746007281e+308, 9.97920154767359795037e+291);
44 const int _DD_C_NDIGITS = 31;
45 
46 const double2 DD_C_ZERO = _DD_REAL_INIT(0.0, 0.0);
47 const double2 DD_C_ONE = _DD_REAL_INIT(1.0, 0.0);
48 const double2 DD_C_NEGONE = _DD_REAL_INIT(-1.0, 0.0);
49 
51  _DD_REAL_INIT(6.283185307179586232e+00, 2.449293598294706414e-16);
53  _DD_REAL_INIT(3.141592653589793116e+00, 1.224646799147353207e-16);
55  _DD_REAL_INIT(1.570796326794896558e+00, 6.123233995736766036e-17);
57  _DD_REAL_INIT(7.853981633974482790e-01, 3.061616997868383018e-17);
59  _DD_REAL_INIT(1.963495408493620697e-01, 7.654042494670957545e-18);
61  _DD_REAL_INIT(2.356194490192344837e+00, 9.1848509936051484375e-17);
62 
63 const double2 DD_C_E =
64  _DD_REAL_INIT(2.718281828459045091e+00, 1.445646891729250158e-16);
66  _DD_REAL_INIT(6.931471805599452862e-01, 2.319046813846299558e-17);
68  _DD_REAL_INIT(2.302585092994045901e+00, -2.170756223382249351e-16);
69 
70 #ifdef DD_C_NAN_IS_CONST
71 const double2 DD_C_NAN = _DD_REAL_INIT(NAN, NAN);
72 const double2 DD_C_INF = _DD_REAL_INIT(INFINITY, INFINITY);
73 const double2 DD_C_NEGINF = _DD_REAL_INIT(-INFINITY, -INFINITY);
74 #endif /* NAN */
75 
76 
77 /* This routine is called whenever a fatal error occurs. */
78 static volatile int errCount = 0;
79 void
80 dd_error(const char *msg)
81 {
82  errCount++;
83  /* if (msg) { */
84  /* fprintf(stderr, "ERROR %s\n", msg); */
85  /* } */
86 }
87 
88 
89 int
91 {
92  int i = 0;
93  double y;
94  if (x == 0.0) {
95  return INT_MIN;
96  }
97  if (isinf(x) || isnan(x)) {
98  return INT_MAX;
99  }
100 
101  y = fabs(x);
102  if (y < 1.0) {
103  while (y < 1.0) {
104  y *= 2.0;
105  i++;
106  }
107  return -i;
108  } else if (y >= 2.0) {
109  while (y >= 2.0) {
110  y *= 0.5;
111  i++;
112  }
113  return i;
114  }
115  return 0;
116 }
117 
118 /* ######################################################################## */
119 /* # Exponentiation */
120 /* ######################################################################## */
121 
122 /* Computes the square root of the double-double number dd.
123  NOTE: dd must be a non-negative number. */
124 
125 double2
127 {
128  /* Strategy: Use Karp's trick: if x is an approximation
129  to sqrt(a), then
130 
131  sqrt(a) = a*x + [a - (a*x)^2] * x / 2 (approx)
132 
133  The approximation is accurate to twice the accuracy of x.
134  Also, the multiplication (a*x) and [-]*x can be done with
135  only half the precision.
136  */
137  double x, ax;
138 
139  if (dd_is_zero(a))
140  return DD_C_ZERO;
141 
142  if (dd_is_negative(a)) {
143  dd_error("(dd_sqrt): Negative argument.");
144  return DD_C_NAN;
145  }
146 
147  x = 1.0 / sqrt(a.x[0]);
148  ax = a.x[0] * x;
149  return dd_add_d_d(ax, dd_sub(a, dd_sqr_d(ax)).x[0] * (x * 0.5));
150 }
151 
152 /* Computes the square root of a double in double-double precision.
153  NOTE: d must not be negative. */
154 
155 double2
156 dd_sqrt_d(double d)
157 {
158  return dd_sqrt(dd_create_d(d));
159 }
160 
161 /* Computes the n-th root of the double-double number a.
162  NOTE: n must be a positive integer.
163  NOTE: If n is even, then a must not be negative. */
164 
165 double2
166 dd_nroot(const double2 a, int n)
167 {
168  /* Strategy: Use Newton iteration for the function
169 
170  f(x) = x^(-n) - a
171 
172  to find its root a^{-1/n}. The iteration is thus
173 
174  x' = x + x * (1 - a * x^n) / n
175 
176  which converges quadratically. We can then find
177  a^{1/n} by taking the reciprocal.
178  */
179  double2 r, x;
180 
181  if (n <= 0) {
182  dd_error("(dd_nroot): N must be positive.");
183  return DD_C_NAN;
184  }
185 
186  if (n % 2 == 0 && dd_is_negative(a)) {
187  dd_error("(dd_nroot): Negative argument.");
188  return DD_C_NAN;
189  }
190 
191  if (n == 1) {
192  return a;
193  }
194  if (n == 2) {
195  return dd_sqrt(a);
196  }
197 
198  if (dd_is_zero(a))
199  return DD_C_ZERO;
200 
201  /* Note a^{-1/n} = exp(-log(a)/n) */
202  r = dd_abs(a);
203  x = dd_create_d(exp(-log(r.x[0]) / n));
204 
205  /* Perform Newton's iteration. */
206  x = dd_add(
208  DD_STATIC_CAST(double, n)))));
209  if (a.x[0] < 0.0) {
210  x = dd_neg(x);
211  }
212  return dd_inv(x);
213 }
214 
215 /* Computes the n-th power of a double-double number.
216  NOTE: 0^0 causes an error. */
217 
218 double2
219 dd_npwr(const double2 a, int n)
220 {
221  double2 r = a;
222  double2 s = DD_C_ONE;
223  int N = abs(n);
224  if (N == 0) {
225  if (dd_is_zero(a)) {
226  dd_error("(dd_npwr): Invalid argument.");
227  return DD_C_NAN;
228  }
229  return DD_C_ONE;
230  }
231 
232  if (N > 1) {
233  /* Use binary exponentiation */
234  while (N > 0) {
235  if (N % 2 == 1) {
236  s = dd_mul(s, r);
237  }
238  N /= 2;
239  if (N > 0) {
240  r = dd_sqr(r);
241  }
242  }
243  }
244  else {
245  s = r;
246  }
247 
248  /* Compute the reciprocal if n is negative. */
249  if (n < 0) {
250  return dd_inv(s);
251  }
252 
253  return s;
254 }
255 
256 double2
257 dd_npow(const double2 a, int n)
258 {
259  return dd_npwr(a, n);
260 }
261 
262 double2
263 dd_pow(const double2 a, const double2 b)
264 {
265  return dd_exp(dd_mul(b, dd_log(a)));
266 }
267 
268 /* ######################################################################## */
269 /* # Exp/Log functions */
270 /* ######################################################################## */
271 
272 static const double2 inv_fact[] = {
273  {{1.66666666666666657e-01, 9.25185853854297066e-18}},
274  {{4.16666666666666644e-02, 2.31296463463574266e-18}},
275  {{8.33333333333333322e-03, 1.15648231731787138e-19}},
276  {{1.38888888888888894e-03, -5.30054395437357706e-20}},
277  {{1.98412698412698413e-04, 1.72095582934207053e-22}},
278  {{2.48015873015873016e-05, 2.15119478667758816e-23}},
279  {{2.75573192239858925e-06, -1.85839327404647208e-22}},
280  {{2.75573192239858883e-07, 2.37677146222502973e-23}},
281  {{2.50521083854417202e-08, -1.44881407093591197e-24}},
282  {{2.08767569878681002e-09, -1.20734505911325997e-25}},
283  {{1.60590438368216133e-10, 1.25852945887520981e-26}},
284  {{1.14707455977297245e-11, 2.06555127528307454e-28}},
285  {{7.64716373181981641e-13, 7.03872877733453001e-30}},
286  {{4.77947733238738525e-14, 4.39920548583408126e-31}},
287  {{2.81145725434552060e-15, 1.65088427308614326e-31}}
288 };
289 //static const int n_inv_fact = sizeof(inv_fact) / sizeof(inv_fact[0]);
290 
291 /* Exponential. Computes exp(x) in double-double precision. */
292 
293 double2
295 {
296  /* Strategy: We first reduce the size of x by noting that
297 
298  exp(kr + m * log(2)) = 2^m * exp(r)^k
299 
300  where m and k are integers. By choosing m appropriately
301  we can make |kr| <= log(2) / 2 = 0.347. Then exp(r) is
302  evaluated using the familiar Taylor series. Reducing the
303  argument substantially speeds up the convergence. */
304 
305  const double k = 512.0;
306  const double inv_k = 1.0 / k;
307  double m;
308  double2 r, s, t, p;
309  int i = 0;
310 
311  if (a.x[0] <= -709.0) {
312  return DD_C_ZERO;
313  }
314 
315  if (a.x[0] >= 709.0) {
316  return DD_C_INF;
317  }
318 
319  if (dd_is_zero(a)) {
320  return DD_C_ONE;
321  }
322 
323  if (dd_is_one(a)) {
324  return DD_C_E;
325  }
326 
327  m = floor(a.x[0] / DD_C_LOG2.x[0] + 0.5);
328  r = dd_mul_pwr2(dd_sub(a, dd_mul_dd_d(DD_C_LOG2, m)), inv_k);
329 
330  p = dd_sqr(r);
331  s = dd_add(r, dd_mul_pwr2(p, 0.5));
332  p = dd_mul(p, r);
333  t = dd_mul(p, inv_fact[0]);
334  do {
335  s = dd_add(s, t);
336  p = dd_mul(p, r);
337  ++i;
338  t = dd_mul(p, inv_fact[i]);
339  } while (fabs(dd_to_double(t)) > inv_k * DD_C_EPS && i < 5);
340 
341  s = dd_add(s, t);
342 
343  s = dd_add(dd_mul_pwr2(s, 2.0), dd_sqr(s));
344  s = dd_add(dd_mul_pwr2(s, 2.0), dd_sqr(s));
345  s = dd_add(dd_mul_pwr2(s, 2.0), dd_sqr(s));
346  s = dd_add(dd_mul_pwr2(s, 2.0), dd_sqr(s));
347  s = dd_add(dd_mul_pwr2(s, 2.0), dd_sqr(s));
348  s = dd_add(dd_mul_pwr2(s, 2.0), dd_sqr(s));
349  s = dd_add(dd_mul_pwr2(s, 2.0), dd_sqr(s));
350  s = dd_add(dd_mul_pwr2(s, 2.0), dd_sqr(s));
351  s = dd_add(dd_mul_pwr2(s, 2.0), dd_sqr(s));
352  s = dd_add(s, DD_C_ONE);
353 
354  return dd_ldexp(s, DD_STATIC_CAST(int, m));
355 }
356 
357 double2
358 dd_exp_d(const double a)
359 {
360  return dd_exp(dd_create(a, 0));
361 }
362 
363 
364 /* Logarithm. Computes log(x) in double-double precision.
365  This is a natural logarithm (i.e., base e). */
366 double2
368 {
369  /* Strategy. The Taylor series for log converges much more
370  slowly than that of exp, due to the lack of the factorial
371  term in the denominator. Hence this routine instead tries
372  to determine the root of the function
373 
374  f(x) = exp(x) - a
375 
376  using Newton iteration. The iteration is given by
377 
378  x' = x - f(x)/f'(x)
379  = x - (1 - a * exp(-x))
380  = x + a * exp(-x) - 1.
381 
382  Only one iteration is needed, since Newton's iteration
383  approximately doubles the number of digits per iteration. */
384  double2 x;
385 
386  if (dd_is_one(a)) {
387  return DD_C_ZERO;
388  }
389 
390  if (a.x[0] <= 0.0) {
391  dd_error("(dd_log): Non-positive argument.");
392  return DD_C_NAN;
393  }
394 
395  x = dd_create_d(log(a.x[0])); /* Initial approximation */
396 
397  /* x = x + a * exp(-x) - 1.0; */
399  return x;
400 }
401 
402 
403 double2
405 {
406  double2 ans;
407  double la, elam1, ll;
408  if (a.x[0] <= -1.0) {
409  return DD_C_NEGINF;
410  }
411  la = log1p(a.x[0]);
412  elam1 = expm1(la);
413  ll = log1p(a.x[1] / (1 + a.x[0]));
414  if (a.x[0] > 0) {
415  ll -= (elam1 - a.x[0])/(elam1+1);
416  }
417  ans = dd_add_d_d(la, ll);
418  return ans;
419 }
420 
421 double2
423 {
424  return dd_div(dd_log(a), DD_C_LOG10);
425 }
426 
427 double2
428 dd_log_d(double a)
429 {
430  return dd_log(dd_create(a, 0));
431 }
432 
433 
434 static const double2 expm1_numer[] = {
435  {{-0.028127670288085938, 1.46e-37}},
436  {{0.5127815691121048, -4.248816580490825e-17}},
437  {{-0.0632631785207471, 4.733650586348708e-18}},
438  {{0.01470328560687425, -4.57569727474415e-20}},
439  {{-0.0008675686051689528, 2.340010361165805e-20}},
440  {{8.812635961829116e-05, 2.619804163788941e-21}},
441  {{-2.596308786770631e-06, -1.6196413688647164e-22}},
442  {{1.422669108780046e-07, 1.2956999470135368e-23}},
443  {{-1.5995603306536497e-09, 5.185121944095551e-26}},
444  {{4.526182006900779e-11, -1.9856249941108077e-27}}
445 };
446 
447 static const double2 expm1_denom[] = {
448  {{1.0, 0.0}},
449  {{-0.4544126470907431, -2.2553855773661143e-17}},
450  {{0.09682713193619222, -4.961446925746919e-19}},
451  {{-0.012745248725908178, -6.0676821249478945e-19}},
452  {{0.001147361387158326, 1.3575817248483204e-20}},
453  {{-7.370416847725892e-05, 3.720369981570573e-21}},
454  {{3.4087499397791556e-06, -3.3067348191741576e-23}},
455  {{-1.1114024704296196e-07, -3.313361038199987e-24}},
456  {{2.3987051614110847e-09, 1.102474920537503e-25}},
457  {{-2.947734185911159e-11, -9.4795654767864e-28}},
458  {{1.32220659910223e-13, 6.440648413523595e-30}}
459 };
460 
461 //
462 // Rational approximation of expm1(x) for -1/2 < x < 1/2
463 //
464 static double2
466 {
467  const double2 Y = dd_create(1.028127670288086, 0.0);
468  const double2 num = dd_polyeval(expm1_numer, 9, x);
469  const double2 den = dd_polyeval(expm1_denom, 10, x);
470  return dd_add(dd_mul(x, Y), dd_mul(x, dd_div(num, den)));
471 }
472 
473 //
474 // This is a translation of Boost's `expm1_imp` for quad precision
475 // for use with double2.
476 //
477 
478 #define LOG_MAX_VALUE 709.782712893384
479 
480 double2
482 {
483  double2 a = dd_abs(x);
484  if (dd_hi(a) > 0.5) {
485  if (dd_hi(a) > LOG_MAX_VALUE) {
486  if (dd_hi(x) > 0) {
487  return DD_C_INF;
488  }
489  return DD_C_NEGONE;
490  }
491  return dd_sub_dd_d(dd_exp(x), 1.0);
492  }
493  return expm1_rational_approx(x);
494 }
495 
496 
497 double2
498 dd_rand(void)
499 {
500  static const double m_const = 4.6566128730773926e-10; /* = 2^{-31} */
501  double m = m_const;
502  double2 r = DD_C_ZERO;
503  double d;
504  int i;
505 
506  /* Strategy: Generate 31 bits at a time, using lrand48
507  random number generator. Shift the bits, and reapeat
508  4 times. */
509 
510  for (i = 0; i < 4; i++, m *= m_const) {
511  // d = lrand48() * m;
512  d = rand() * m;
513  r = dd_add_dd_d(r, d);
514  }
515 
516  return r;
517 }
518 
519 /* dd_polyeval(c, n, x)
520  Evaluates the given n-th degree polynomial at x.
521  The polynomial is given by the array of (n+1) coefficients. */
522 
523 double2
524 dd_polyeval(const double2 *c, int n, const double2 x)
525 {
526  /* Just use Horner's method of polynomial evaluation. */
527  double2 r = c[n];
528  int i;
529 
530  for (i = n - 1; i >= 0; i--) {
531  r = dd_mul(r, x);
532  r = dd_add(r, c[i]);
533  }
534 
535  return r;
536 }
537 
538 /* dd_polyroot(c, n, x0)
539  Given an n-th degree polynomial, finds a root close to
540  the given guess x0. Note that this uses simple Newton
541  iteration scheme, and does not work for multiple roots. */
542 
543 double2
544 dd_polyroot(const double2 *c, int n, const double2 x0, int max_iter,
545  double thresh)
546 {
547  double2 x = x0;
548  double2 f;
549  double2 *d = DD_STATIC_CAST(double2 *, calloc(sizeof(double2), n));
550  int conv = 0;
551  int i;
552  double max_c = fabs(dd_to_double(c[0]));
553  double v;
554 
555  if (thresh == 0.0) {
556  thresh = DD_C_EPS;
557  }
558 
559  /* Compute the coefficients of the derivatives. */
560  for (i = 1; i <= n; i++) {
561  v = fabs(dd_to_double(c[i]));
562  if (v > max_c) {
563  max_c = v;
564  }
565  d[i - 1] = dd_mul_dd_d(c[i], DD_STATIC_CAST(double, i));
566  }
567  thresh *= max_c;
568 
569  /* Newton iteration. */
570  for (i = 0; i < max_iter; i++) {
571  f = dd_polyeval(c, n, x);
572 
573  if (fabs(dd_to_double(f)) < thresh) {
574  conv = 1;
575  break;
576  }
577  x = dd_sub(x, (dd_div(f, dd_polyeval(d, n - 1, x))));
578  }
579  free(d);
580 
581  if (!conv) {
582  dd_error("(dd_polyroot): Failed to converge.");
583  return DD_C_NAN;
584  }
585 
586  return x;
587 }
DD_C_PI2
const double2 DD_C_PI2
Definition: dd_real.c:54
DD_C_NAN
#define DD_C_NAN
Definition: dd_real.h:105
dd_mul_pwr2
static double2 dd_mul_pwr2(const double2 a, double b)
Definition: dd_real_idefs.h:398
DD_C_ONE
const double2 DD_C_ONE
Definition: dd_real.c:47
dd_log1p
double2 dd_log1p(const double2 a)
Definition: dd_real.c:404
DD_C_LOG10
const double2 DD_C_LOG10
Definition: dd_real.c:67
external::detail::conv
PyObject * conv(PyObject *o)
Definition: test_pytypes.cpp:20
dd_real.h
double2
Definition: dd_real.h:74
s
RealScalar s
Definition: level1_cplx_impl.h:126
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
d
static const double d[K][N]
Definition: igam.h:11
dd_exp_d
double2 dd_exp_d(const double a)
Definition: dd_real.c:358
dd_sqrt_d
double2 dd_sqrt_d(double d)
Definition: dd_real.c:156
dd_npwr
double2 dd_npwr(const double2 a, int n)
Definition: dd_real.c:219
DD_C_PI16
const double2 DD_C_PI16
Definition: dd_real.c:58
c
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
dd_mul
static double2 dd_mul(const double2 a, const double2 b)
Definition: dd_real_idefs.h:404
b
Scalar * b
Definition: benchVecAdd.cpp:17
dd_neg
static double2 dd_neg(const double2 a)
Definition: dd_real_idefs.h:172
gtsam::Y
GaussianFactorGraphValuePair Y
Definition: HybridGaussianProductFactor.cpp:29
expm1_rational_approx
static double2 expm1_rational_approx(const double2 x)
Definition: dd_real.c:465
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
_DD_REAL_INIT
#define _DD_REAL_INIT(A, B)
Definition: dd_real.c:33
dd_pow
double2 dd_pow(const double2 a, const double2 b)
Definition: dd_real.c:263
dd_polyeval
double2 dd_polyeval(const double2 *c, int n, const double2 x)
Definition: dd_real.c:524
log
const EIGEN_DEVICE_FUNC LogReturnType log() const
Definition: ArrayCwiseUnaryOps.h:128
DD_C_E
const double2 DD_C_E
Definition: dd_real.c:63
isnan
#define isnan(X)
Definition: main.h:93
dd_div
static double2 dd_div(const double2 a, const double2 b)
Definition: dd_real_idefs.h:479
DD_C_EPS
const double DD_C_EPS
Definition: dd_real.c:35
exp
const EIGEN_DEVICE_FUNC ExpReturnType exp() const
Definition: ArrayCwiseUnaryOps.h:97
dd_error
void dd_error(const char *msg)
Definition: dd_real.c:80
DD_C_PI
const double2 DD_C_PI
Definition: dd_real.c:52
dd_inv
static double2 dd_inv(const double2 a)
Definition: dd_real_idefs.h:503
expm1_numer
static const double2 expm1_numer[]
Definition: dd_real.c:434
dd_nroot
double2 dd_nroot(const double2 a, int n)
Definition: dd_real.c:166
DD_C_ZERO
const double2 DD_C_ZERO
Definition: dd_real.c:46
dd_add_d_d
static double2 dd_add_d_d(double a, double b)
Definition: dd_real_idefs.h:286
DD_STATIC_CAST
#define DD_STATIC_CAST(T, X)
Definition: dd_real.h:69
boost::multiprecision::fabs
Real fabs(const Real &a)
Definition: boostmultiprec.cpp:119
n
int n
Definition: BiCGSTAB_simple.cpp:1
double2::x
double x[2]
Definition: dd_real.h:76
expm1
double expm1(double x)
Definition: unity.c:106
dd_expm1
double2 dd_expm1(const double2 x)
Definition: dd_real.c:481
dd_ldexp
static double2 dd_ldexp(const double2 a, int expt)
Definition: dd_real_idefs.h:259
dd_log
double2 dd_log(const double2 a)
Definition: dd_real.c:367
dd_div_dd_d
static double2 dd_div_dd_d(const double2 a, double b)
Definition: dd_real_idefs.h:491
dd_sqr_d
static double2 dd_sqr_d(double a)
Definition: dd_real_idefs.h:546
dd_to_double
static double dd_to_double(const double2 a)
Definition: dd_real_idefs.h:90
log1p
double log1p(double x)
Definition: unity.c:49
x0
static Symbol x0('x', 0)
dd_hi
static double dd_hi(const double2 a)
Definition: dd_real_idefs.h:41
DD_C_SAFE_MAX
const double2 DD_C_SAFE_MAX
Definition: dd_real.c:42
dd_npow
double2 dd_npow(const double2 a, int n)
Definition: dd_real.c:257
dd_polyroot
double2 dd_polyroot(const double2 *c, int n, const double2 x0, int max_iter, double thresh)
Definition: dd_real.c:544
dd_log_d
double2 dd_log_d(double a)
Definition: dd_real.c:428
m
Matrix3f m
Definition: AngleAxis_mimic_euler.cpp:1
dd_is_zero
static int dd_is_zero(const double2 a)
Definition: dd_real_idefs.h:65
dd_sqr
static double2 dd_sqr(const double2 a)
Definition: dd_real_idefs.h:534
dd_add
static double2 dd_add(const double2 a, const double2 b)
Definition: dd_real_idefs.h:343
DD_C_2PI
const double2 DD_C_2PI
Definition: dd_real.c:50
DD_C_NEGONE
const double2 DD_C_NEGONE
Definition: dd_real.c:48
dd_abs
static double2 dd_abs(const double2 a)
Definition: dd_real_idefs.h:244
y
Scalar * y
Definition: level1_cplx_impl.h:124
tree::f
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Definition: testExpression.cpp:218
DD_C_MIN_NORMALIZED
const double DD_C_MIN_NORMALIZED
Definition: dd_real.c:36
errCount
static volatile int errCount
Definition: dd_real.c:78
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
DD_C_NEGINF
#define DD_C_NEGINF
Definition: dd_real.h:107
dd_sub
static double2 dd_sub(const double2 a, const double2 b)
Definition: dd_real_idefs.h:360
dd_log10
double2 dd_log10(const double2 a)
Definition: dd_real.c:422
DD_C_INF
#define DD_C_INF
Definition: dd_real.h:106
dd_is_one
static int dd_is_one(const double2 a)
Definition: dd_real_idefs.h:71
_DD_C_NDIGITS
const int _DD_C_NDIGITS
Definition: dd_real.c:44
get_double_expn
int get_double_expn(double x)
Definition: dd_real.c:90
DD_C_LOG2
const double2 DD_C_LOG2
Definition: dd_real.c:65
p
float * p
Definition: Tutorial_Map_using.cpp:9
dd_sub_dd_d
static double2 dd_sub_dd_d(const double2 a, double b)
Definition: dd_real_idefs.h:366
dd_sub_d_dd
static double2 dd_sub_d_dd(double a, const double2 b)
Definition: dd_real_idefs.h:376
dd_create_d
static double2 dd_create_d(double hi)
Definition: dd_real_idefs.h:149
dd_sqrt
double2 dd_sqrt(const double2 a)
Definition: dd_real.c:126
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
dd_mul_dd_d
static double2 dd_mul_dd_d(const double2 a, double b)
Definition: dd_real_idefs.h:414
DD_C_PI4
const double2 DD_C_PI4
Definition: dd_real.c:56
DD_C_MAX
const double2 DD_C_MAX
Definition: dd_real.c:40
abs
#define abs(x)
Definition: datatypes.h:17
dd_rand
double2 dd_rand(void)
Definition: dd_real.c:498
N
#define N
Definition: igam.h:9
DD_C_3PI4
const double2 DD_C_3PI4
Definition: dd_real.c:60
align_3::t
Point2 t(10, 10)
inv_fact
static const double2 inv_fact[]
Definition: dd_real.c:272
dd_exp
double2 dd_exp(const double2 a)
Definition: dd_real.c:294
ceres::sqrt
Jet< T, N > sqrt(const Jet< T, N > &f)
Definition: jet.h:418
i
int i
Definition: BiCGSTAB_step_by_step.cpp:9
LOG_MAX_VALUE
#define LOG_MAX_VALUE
Definition: dd_real.c:478
expm1_denom
static const double2 expm1_denom[]
Definition: dd_real.c:447
dd_create
static double2 dd_create(double hi, double lo)
Definition: dd_real_idefs.h:136
floor
const EIGEN_DEVICE_FUNC FloorReturnType floor() const
Definition: ArrayCwiseUnaryOps.h:481
dd_add_dd_d
static double2 dd_add_dd_d(const double2 a, double b)
Definition: dd_real_idefs.h:294
dd_is_negative
static int dd_is_negative(const double2 a)
Definition: dd_real_idefs.h:83
pybind11.msg
msg
Definition: wrap/pybind11/pybind11/__init__.py:6
isinf
#define isinf(X)
Definition: main.h:94


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:22