File: link.h

package info (click to toggle)
mpsolve 3.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,100 kB
  • sloc: ansic: 25,748; sh: 4,925; cpp: 3,155; makefile: 914; python: 407; yacc: 158; lex: 85; xml: 41
file content (89 lines) | stat: -rw-r--r-- 2,753 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/***********************************************************
**            Link library for MT, MPC and GMP            **
**                      Version 1.0                       **
**                                                        **
**             Written by Giuseppe Fiorentino             **
**                 (fiorent@dm.unipi.it)                  **
***********************************************************/

/**
 * @file
 * @brief Functions used to pass the data back and forth between
 * multiprecision and floating point.
 */

#ifndef __LINK_H__
#define __LINK_H__

/* needed header files */
#include <mps/mt.h>
#include <mps/mpc.h>

#ifdef __cplusplus
extern "C" {
#endif

/***********************************************************
**              link functions                            **
***********************************************************/

/**
 * @brief Set the Multiprecision value <code>f</code> with the value
 * stored in <code>e</code>.
 *
 * @param f The multiprecision floating point number to set.
 * @param e The RDPE value to set in <code>f</code>.
 */
void mpf_set_rdpe (mpf_t f, rdpe_t e);

/**
 * @brief Get the RDPE version of the Multiprecision value <code>f</code>.
 *
 * @param e The RDPE where the value of <code>f</code> will be stored.
 * @param f The multiprecision floating point number to extract the value from.
 */
void mpf_get_rdpe (rdpe_t e, mpf_t f);

/**
 * @brief Set the Multiprecision value <code>mc</code> with the value
 * stored in <code>c</code>.
 *
 * @param mc The multiprecision complex number to set.
 * @param c The <code>cplx_t</code> value to set in <code>mc</code>.
 */
void mpc_set_cplx (mpc_t mc, cplx_t c);

/**
 * @brief Get the <code>cplx_t</code> version of the Multiprecision value <code>mc</code>.
 *
 * @param c The <code>cplx_t</code> where the value of <code>mc</code> will be stored.
 * @param mc The multiprecision complex number to extract the value from.
 */
void mpc_get_cplx (cplx_t c, mpc_t mc);

/**
 * @brief Set the Multiprecision value <code>mc</code> with the value
 * stored in <code>c</code>.
 *
 * @param mc The multiprecision complex number to set.
 * @param c The CDPE value to set in <code>mc</code>.
 */
void mpc_set_cdpe (mpc_t mc, cdpe_t c);

/**
 * @brief Get the CDPE version of the Multiprecision value <code>mc</code>.
 *
 * @param c The CDPE where the value of <code>mc</code> will be stored.
 * @param mc The multiprecision complex number to extract the value from.
 */
void mpc_get_cdpe (cdpe_t c, mpc_t mc);

#ifdef __cplusplus
}
#endif

#endif

/***********************************************************
**                                                        **
***********************************************************/