PPL  1.2
checked_ext_defs.hh
Go to the documentation of this file.
1 /* Checked extended arithmetic functions.
2  Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
3  Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com)
4 
5 This file is part of the Parma Polyhedra Library (PPL).
6 
7 The PPL is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 The PPL is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
20 
21 For the most up-to-date information see the Parma Polyhedra Library
22 site: http://bugseng.com/products/ppl/ . */
23 
24 #ifndef PPL_checked_ext_defs_hh
25 #define PPL_checked_ext_defs_hh 1
26 
27 #include "checked_defs.hh"
28 
29 namespace Parma_Polyhedra_Library {
30 
31 namespace Checked {
32 
33 template <typename To_Policy, typename From_Policy, typename To, typename From>
34 Result assign_ext(To& to, const From& from, Rounding_Dir dir);
35 
36 template <typename Policy, typename Type>
37 Result sgn_ext(const Type& x);
38 
39 template <typename Policy1, typename Policy2, typename Type1, typename Type2>
40 Result cmp_ext(const Type1& x, const Type2& y);
41 
42 template <typename To_Policy, typename From_Policy, typename To, typename From>
43 Result neg_ext(To& to, const From& x, Rounding_Dir dir);
44 
45 template <typename To_Policy, typename From_Policy, typename To, typename From>
46 Result abs_ext(To& to, const From& x, Rounding_Dir dir);
47 
48 template <typename To_Policy, typename From1_Policy, typename From2_Policy,
49  typename To, typename From1, typename From2>
50 Result add_ext(To& to, const From1& x, const From2& y, Rounding_Dir dir);
51 
52 template <typename To_Policy, typename From1_Policy, typename From2_Policy,
53  typename To, typename From1, typename From2>
54 Result sub_ext(To& to, const From1& x, const From2& y, Rounding_Dir dir);
55 
56 template <typename To_Policy, typename From1_Policy, typename From2_Policy,
57  typename To, typename From1, typename From2>
58 Result mul_ext(To& to, const From1& x, const From2& y, Rounding_Dir dir);
59 
60 template <typename To_Policy, typename From1_Policy, typename From2_Policy,
61  typename To, typename From1, typename From2>
62 Result div_ext(To& to, const From1& x, const From2& y, Rounding_Dir dir);
63 
64 template <typename To_Policy, typename From1_Policy, typename From2_Policy,
65  typename To, typename From1, typename From2>
66 Result rem_ext(To& to, const From1& x, const From2& y, Rounding_Dir dir);
67 
68 template <typename To_Policy, typename From1_Policy, typename From2_Policy,
69  typename To, typename From1, typename From2>
70 Result add_mul_ext(To& to, const From1& x, const From2& y, Rounding_Dir dir);
71 
72 template <typename To_Policy, typename From1_Policy, typename From2_Policy,
73  typename To, typename From1, typename From2>
74 Result sub_mul_ext(To& to, const From1& x, const From2& y, Rounding_Dir dir);
75 
76 template <typename To_Policy, typename From_Policy, typename To, typename From>
77 Result sqrt_ext(To& to, const From& x, Rounding_Dir dir);
78 
79 template <typename To_Policy, typename From1_Policy, typename From2_Policy,
80  typename To, typename From1, typename From2>
81 Result gcd_ext(To& to, const From1& x, const From2& y, Rounding_Dir dir);
82 
83 template <typename To1_Policy, typename To2_Policy, typename To3_Policy,
84  typename From1_Policy, typename From2_Policy,
85  typename To1, typename To2, typename To3,
86  typename From1, typename From2>
87 Result gcdext_ext(To1& to, To2& s, To3& t, const From1& x, const From2& y,
88  Rounding_Dir dir);
89 
90 template <typename To_Policy, typename From1_Policy, typename From2_Policy,
91  typename To, typename From1, typename From2>
92 Result lcm_ext(To& to, const From1& x, const From2& y, Rounding_Dir dir);
93 
94 template <typename Policy, typename Type>
95 Result output_ext(std::ostream& os, const Type& x,
96  const Numeric_Format& format, Rounding_Dir dir);
97 
98 template <typename Policy, typename Type>
99 Result input_ext(Type& x, std::istream& is, Rounding_Dir dir);
100 
101 } // namespace Checked
102 
103 } // namespace Parma_Polyhedra_Library
104 
105 #include "checked_ext_inlines.hh"
106 
107 #endif // !defined(PPL_checked_ext_defs_hh)
Result gcd_ext(To &to, const From1 &x, const From2 &y, Rounding_Dir dir)
Result sub_mul_ext(To &to, const From1 &x, const From2 &y, Rounding_Dir dir)
Result lcm_ext(To &to, const From1 &x, const From2 &y, Rounding_Dir dir)
Result sqrt_ext(To &to, const From &x, Rounding_Dir dir)
Result sub_ext(To &to, const From1 &x, const From2 &y, Rounding_Dir dir)
Rounding_Dir
Rounding directions for arithmetic computations.
Result add_ext(To &to, const From1 &x, const From2 &y, Rounding_Dir dir)
From bool Type Type Rounding_Dir To
Result output_ext(std::ostream &os, const Type &x, const Numeric_Format &format, Rounding_Dir dir)
Result add_mul_ext(To &to, const From1 &x, const From2 &y, Rounding_Dir dir)
Result neg_ext(To &to, const From &x, Rounding_Dir dir)
From bool Type Type Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir unsigned Rounding_Dir unsigned Rounding_Dir unsigned Rounding_Dir Rounding_Dir To2
Result div_ext(To &to, const From1 &x, const From2 &y, Rounding_Dir dir)
Result mul_ext(To &to, const From1 &x, const From2 &y, Rounding_Dir dir)
From bool Type Type Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir unsigned Rounding_Dir unsigned Rounding_Dir unsigned Rounding_Dir Rounding_Dir To1
From bool Type Type Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir From1
The entire library is confined to this namespace.
Definition: version.hh:61
Result gcdext_ext(To1 &to, To2 &s, To3 &t, const From1 &x, const From2 &y, Rounding_Dir dir)
Result abs_ext(To &to, const From &x, Rounding_Dir dir)
From bool Type Type Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir From2
From bool Type Type Rounding_Dir From
Result cmp_ext(const Type1 &x, const Type2 &y)
Result input_ext(Type &x, std::istream &is, Rounding_Dir dir)
Result assign_ext(To &to, const From &from, Rounding_Dir dir)
From bool Type Type Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir Rounding_Dir unsigned Rounding_Dir unsigned Rounding_Dir unsigned Rounding_Dir Rounding_Dir To3
Result rem_ext(To &to, const From1 &x, const From2 &y, Rounding_Dir dir)