p1788 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +8 -0
  3. data/AUTHORS +6 -0
  4. data/LICENSE +201 -0
  5. data/NOTICE +29 -0
  6. data/README.md +65 -0
  7. data/ext/libieeep1788_copy/README +3 -0
  8. data/ext/libieeep1788_copy/p1788/AUTHORS +16 -0
  9. data/ext/libieeep1788_copy/p1788/LICENSE +202 -0
  10. data/ext/libieeep1788_copy/p1788/NOTICE +14 -0
  11. data/ext/libieeep1788_copy/p1788/decoration/decoration.hpp +265 -0
  12. data/ext/libieeep1788_copy/p1788/exception/exception.hpp +302 -0
  13. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor.hpp +3443 -0
  14. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_bool_func_impl.hpp +608 -0
  15. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_cancel_func_impl.hpp +229 -0
  16. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_class_impl.hpp +526 -0
  17. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_elem_func_impl.hpp +4533 -0
  18. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_io_impl.hpp +1421 -0
  19. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_mul_rev_to_pair_func_impl.hpp +347 -0
  20. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_num_func_impl.hpp +655 -0
  21. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_rec_bool_func_impl.hpp +146 -0
  22. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_rec_overlap_impl.hpp +188 -0
  23. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_rev_func_impl.hpp +1674 -0
  24. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_set_op_impl.hpp +216 -0
  25. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_setup_func_impl.hpp +68 -0
  26. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_util_func_impl.hpp +135 -0
  27. data/ext/libieeep1788_copy/p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_validation_func_impl.hpp +93 -0
  28. data/ext/libieeep1788_copy/p1788/infsup/base_interval.hpp +1529 -0
  29. data/ext/libieeep1788_copy/p1788/infsup/base_interval_bool_func_impl.hpp +481 -0
  30. data/ext/libieeep1788_copy/p1788/infsup/base_interval_cancel_func_impl.hpp +126 -0
  31. data/ext/libieeep1788_copy/p1788/infsup/base_interval_elem_func_impl.hpp +1581 -0
  32. data/ext/libieeep1788_copy/p1788/infsup/base_interval_io_impl.hpp +59 -0
  33. data/ext/libieeep1788_copy/p1788/infsup/base_interval_mul_rev_to_pair_func_impl.hpp +88 -0
  34. data/ext/libieeep1788_copy/p1788/infsup/base_interval_num_func_impl.hpp +345 -0
  35. data/ext/libieeep1788_copy/p1788/infsup/base_interval_rec_bool_func_impl.hpp +92 -0
  36. data/ext/libieeep1788_copy/p1788/infsup/base_interval_rec_overlap_impl.hpp +72 -0
  37. data/ext/libieeep1788_copy/p1788/infsup/base_interval_rev_func_impl.hpp +656 -0
  38. data/ext/libieeep1788_copy/p1788/infsup/base_interval_set_op_impl.hpp +126 -0
  39. data/ext/libieeep1788_copy/p1788/infsup/decorated_interval.hpp +464 -0
  40. data/ext/libieeep1788_copy/p1788/infsup/forward_declaration.hpp +66 -0
  41. data/ext/libieeep1788_copy/p1788/infsup/interval.hpp +275 -0
  42. data/ext/libieeep1788_copy/p1788/io/io_manip.hpp +531 -0
  43. data/ext/libieeep1788_copy/p1788/overlapping/overlapping.hpp +241 -0
  44. data/ext/libieeep1788_copy/p1788/p1788.hpp +45 -0
  45. data/ext/libieeep1788_copy/p1788/reduction/reduction.hpp +341 -0
  46. data/ext/libieeep1788_copy/p1788/util/io.hpp +63 -0
  47. data/ext/libieeep1788_copy/p1788/util/mixed_type_traits.hpp +140 -0
  48. data/ext/libieeep1788_copy/p1788/util/mpfr_util.hpp +77 -0
  49. data/ext/libieeep1788_copy/p1788/util/mpfr_var.hpp +119 -0
  50. data/ext/libieeep1788_copy/p1788/util/mpfr_var_impl.hpp +382 -0
  51. data/ext/libieeep1788_copy/p1788/version.hpp +34 -0
  52. data/ext/p1788/extconf.rb +49 -0
  53. data/ext/p1788/p1788.cc +3764 -0
  54. data/lib/p1788/version.rb +4 -0
  55. data/lib/p1788.rb +25 -0
  56. data/p1788.gemspec +72 -0
  57. metadata +99 -0
@@ -0,0 +1,3443 @@
1
+ //
2
+ // libieeep1788
3
+ //
4
+ // An implementation of the preliminary IEEE P1788 standard for
5
+ // interval arithmetic
6
+ //
7
+ //
8
+ // Copyright 2013 - 2015
9
+ //
10
+ // Marco Nehmeier (nehmeier@informatik.uni-wuerzburg.de)
11
+ // Department of Computer Science,
12
+ // University of Wuerzburg, Germany
13
+ //
14
+ // Licensed under the Apache License, Version 2.0 (the "License");
15
+ // you may not use this file except in compliance with the License.
16
+ // You may obtain a copy of the License at
17
+ //
18
+ // http://www.apache.org/licenses/LICENSE-2.0
19
+ //
20
+ // Unless required by applicable law or agreed to in writing, software
21
+ // distributed under the License is distributed on an "AS IS" BASIS,
22
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
+ // See the License for the specific language governing permissions and
24
+ // limitations under the License.
25
+
26
+ #ifndef LIBIEEEP1788_P1788_FLAVOR_INFSUP_SETBASED_MPFR_BIN_IEEE754_FLAVOR_HPP
27
+ #define LIBIEEEP1788_P1788_FLAVOR_INFSUP_SETBASED_MPFR_BIN_IEEE754_FLAVOR_HPP
28
+
29
+ #include <utility>
30
+ #include <limits>
31
+ #include <cfenv>
32
+ #include <cmath>
33
+ #include <iostream>
34
+ #include <algorithm>
35
+ #include <cctype>
36
+ #include <sstream>
37
+ #include <regex>
38
+
39
+ #include <gmp.h>
40
+ #include <mpfr.h>
41
+
42
+ #include "p1788/decoration/decoration.hpp"
43
+ #include "p1788/exception/exception.hpp"
44
+ #include "p1788/overlapping/overlapping.hpp"
45
+ #include "p1788/util/io.hpp"
46
+ #include "p1788/util/mpfr_util.hpp"
47
+ #include "p1788/util/mpfr_var.hpp"
48
+ #include "p1788/util/mixed_type_traits.hpp"
49
+
50
+ #include "p1788/infsup/base_interval.hpp"
51
+
52
+
53
+ //------------------------------------------------------------------------------
54
+ // MPFR infsup Flavor
55
+ //------------------------------------------------------------------------------
56
+
57
+ namespace p1788
58
+ {
59
+
60
+ namespace flavor
61
+ {
62
+
63
+ namespace infsup
64
+ {
65
+
66
+ namespace setbased
67
+ {
68
+
69
+
70
+
71
+ /// \brief tesxt
72
+ ///
73
+ /// \tparam T Type of the interval bounds
74
+ ///
75
+ ///
76
+ template<typename T>
77
+ class mpfr_bin_ieee754_flavor
78
+ {
79
+
80
+ static_assert(std::numeric_limits<T>::is_iec559, "Only IEEE 754 binary compliant types are supported!");
81
+
82
+ public:
83
+
84
+ // Typedef for the corresponding mpfr wrapper class representing the IEEE 754 binary floating point format of type T
85
+ typedef p1788::util::mpfr_var<
86
+ std::numeric_limits<T>::digits,
87
+ std::numeric_limits<T>::has_denorm != std::denorm_present ? std::numeric_limits<T>::min_exponent
88
+ : std::numeric_limits<T>::min_exponent - std::numeric_limits<T>::digits + 1,
89
+ std::numeric_limits<T>::max_exponent,
90
+ std::numeric_limits<T>::has_denorm == std::denorm_present
91
+ > mpfr_var;
92
+
93
+
94
+ /// \brief Type-structure for the internal representation of bare intervals
95
+ ///
96
+ /// It is a <c>std::pair\<T_,T_\></c> of two values of type \p T_ to store the lower (<c>first</c>) and
97
+ /// the upper (<c>second</c>) bound of an bare interval.
98
+ ///
99
+ /// \tparam T_ Type of the lower and upper bound of a bare interval.
100
+ ///
101
+ template<typename T_>
102
+ using representation_type = std::pair<T_,T_>;
103
+
104
+
105
+ /// \brief Type-structure for the internal representation of decorated intervals
106
+ ///
107
+ /// It is a <c>std::pair\<\link mpfr_bin_ieee754_flavor::representation_type representation_type\<T_\>\endlink,p1788::decoration::decoration\></c>
108
+ /// to store a bare interval of type <c>\link mpfr_bin_ieee754_flavor::representation_type representation_type\<T_\>\endlink</c> in the <c>first</c> member and the
109
+ /// the decoration of type p1788::decoration::decoration in the (<c>second</c>) member.
110
+ ///
111
+ /// \tparam T_ Type of the lower and upper bound of a decorated interval.
112
+ ///
113
+ template<typename T_>
114
+ using representation_dec_type = std::pair<representation_type<T_>, p1788::decoration::decoration>;
115
+
116
+
117
+
118
+ // -----------------------------------------------------------------------------
119
+ // Typed for internal representation
120
+ // -----------------------------------------------------------------------------
121
+
122
+ /// \brief Type for the internal representation of bare intervals
123
+ ///
124
+ /// Type-structure <c>\link mpfr_bin_ieee754_flavor::representation_type representation_type\<T\>\endlink</c>
125
+ /// distincted with with the type \p T.
126
+ ///
127
+ typedef representation_type<T> representation;
128
+
129
+ /// \brief Type for the internal representation of decorated intervals
130
+ ///
131
+ /// Type-structure <c>\link mpfr_bin_ieee754_flavor::representation_dec_type representation_dec_type\<T\>\endlink</c>
132
+ /// distincted with with the type \p T.
133
+ ///
134
+ typedef representation_dec_type<T> representation_dec;
135
+
136
+
137
+ // -----------------------------------------------------------------------------
138
+ // Setup functions
139
+ //
140
+ // p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_setup_func_impl.hpp
141
+ // -----------------------------------------------------------------------------
142
+
143
+ ///@name Setup functions
144
+ ///
145
+ ///
146
+ ///@{
147
+
148
+ /// \todo document
149
+ ///
150
+ ///
151
+ static void setup();
152
+
153
+ /// \todo document
154
+ ///
155
+ ///
156
+ static void teardown();
157
+ ///@}
158
+
159
+
160
+ // -----------------------------------------------------------------------------
161
+ // Validation functions
162
+ //
163
+ // p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_validation_func_impl.hpp
164
+ // -----------------------------------------------------------------------------
165
+
166
+ ///@name Validation functions
167
+ ///
168
+ ///
169
+ ///@{
170
+
171
+ /// \brief Checks if it is a valid representation of a bare interval.
172
+ ///
173
+ /// \param x representation of a bare interval
174
+ /// \return true if it is a valid representation and if no exception is thrown.
175
+ /// \exception p1788::exception::possibly_undefined_operation_exception Throws exception if the
176
+ /// <c>possibly_undefined_operation_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
177
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
178
+ /// \note if it is an invalid representation \link p1788::exception::signal_invalid_operand() \endlink
179
+ /// is called to signal an invalid operand.
180
+ static bool is_valid(representation const& x);
181
+
182
+ /// \brief Checks if it is a valid representation of a decorated interval.
183
+ ///
184
+ /// \param x representation of a decorated interval
185
+ /// \return true if it is a valid representation and if no exception is thrown.
186
+ /// \exception p1788::exception::possibly_undefined_operation_exception Throws exception if the
187
+ /// <c>possibly_undefined_operation_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
188
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
189
+ /// \note if it is an invalid representation \link p1788::exception::signal_invalid_operand() \endlink
190
+ /// is called to signal an invalid operand.
191
+ static bool is_valid(representation_dec const& x);
192
+
193
+
194
+ ///@}
195
+
196
+
197
+
198
+ // -----------------------------------------------------------------------------
199
+ // Utility functions
200
+ //
201
+ // p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_util_func_impl.hpp
202
+ // -----------------------------------------------------------------------------
203
+
204
+ ///@name Utility functions
205
+ ///
206
+ ///
207
+ ///@{
208
+
209
+ /// \brief Converts a floating point number of type \p T_ to a floating point number of type \p T using rounding to \f$-\infty\f$.
210
+ ///
211
+ /// \tparam T_ Type of the original number format.
212
+ /// \pre \p T_ hast to fulfill the requirements of IEC559 / IEEE754, see \c std::numeric_limits::is_iec559.
213
+ ///
214
+ /// \param x Value in the original number format \p T_.
215
+ ///
216
+ /// \return Largest number of type \p T \f$\leq\f$ \p x. It returns -0.0 in case of a zero. NaNs are propagated.
217
+ ///
218
+ /// \note Round toward negative follows the IEEE754 specification.
219
+ ///
220
+ ///
221
+ template<typename T_>
222
+ static T convert_rndd(T_ x);
223
+
224
+ /// \brief Converts a floating point number of type \p T_ to the closest floating point number of type \p T.
225
+ ///
226
+ /// \tparam T_ Type of the original number format.
227
+ /// \pre \p T_ hast to fulfill the requirements of IEC559 / IEEE754, see \c std::numeric_limits::is_iec559.
228
+ ///
229
+ /// \param x Value in the original number format \p T_.
230
+ ///
231
+ /// \return Closest number of type \p T to the number \p x.
232
+ /// If \p x lies exactly in the middle of two consecutive numbers of type \p T than it is rounded to the one with least significant equal to zero.
233
+ /// It returns +0.0 in case of a zero. NaNs are propagated.
234
+ ///
235
+ /// \note Round to nearest follows the IEEE754 specification.
236
+ ///
237
+ ///
238
+ template<typename T_>
239
+ static T convert_rndn(T_ x);
240
+
241
+ /// \brief Converts a floating point number of type \p T_ to a floating point number of type \p T using rounding to \f$+\infty\f$.
242
+ ///
243
+ /// \tparam T_ Type of the original number format.
244
+ /// \pre \p T_ hast to fulfill the requirements of IEC559 / IEEE754, see \c std::numeric_limits::is_iec559.
245
+ ///
246
+ /// \param x Value in the original number format \p T_.
247
+ ///
248
+ /// \return Smallest number of type \p T \f$\geq\f$ \p x. It returns +0.0 in case of a zero. NaNs are propagated.
249
+ ///
250
+ /// \note Round toward positive follows the IEEE754 specification.
251
+ /// template<typename T_>
252
+ ///
253
+ template<typename T_>
254
+ static T convert_rndu(T_ x);
255
+
256
+ /// \brief Converts an interval representation of type \p mpfr_bin_ieee754_flavor<T_>::representation to
257
+ /// an interval representation of type \p mpfr_bin_ieee754_flavor<T>::representation by using the interval hull (outward rounding).
258
+ ///
259
+ /// \tparam T_ Type of the number format of the original bound type.
260
+ /// \pre \p T_ hast to fulfill the requirements of IEC559 / IEEE754, see \c std::numeric_limits::is_iec559.
261
+ ///
262
+ /// \param x Interval representation with the original bound type \p T_.
263
+ ///
264
+ /// \return Tightest interval representation with bound type \p T containing \p x. Basically it returns
265
+ /// the interval representation [\link convert_rndd \endlink (\f$\underline{x}\f$), \link convert_rndu \endlink (\f$\overline{x}\f$)].
266
+ /// This means that if \p x is not a valid interval representation then the returned result is only a pair of
267
+ /// numbers with no specific meaning which is
268
+ /// computed by the two functions \link convert_rndd \endlink and \link convert_rndu \endlink .
269
+ ///
270
+ /// \note \ref pageAccuracy "Accuracy:" Tightest
271
+ /// \note Outward rounding uses round toward negative and positive which follow the IEEE754 specification.
272
+ ///
273
+ ///
274
+ template<typename T_>
275
+ static representation convert_hull(representation_type<T_> const& x);
276
+
277
+ /// \brief Converts an decorated interval representation of type \p mpfr_bin_ieee754_flavor<T_>::representation_dec to
278
+ /// an decorated interval representation of type \p mpfr_bin_ieee754_flavor<T>::representation_dec by using the interval hull (outward rounding).
279
+ ///
280
+ /// \tparam T_ Type of the number format of the original bound type.
281
+ /// \pre \p T_ hast to fulfill the requirements of IEC559 / IEEE754, see \c std::numeric_limits::is_iec559.
282
+ ///
283
+ /// \param x Decorated interval representation with the original bound type \p T_.
284
+ ///
285
+ /// \return Tightest decorated interval representation with bound type \p T containing \p x.
286
+ /// If the old decoration was <c>com</c> and the returning interval is unbounded than the decoration is <c>dac</c>,
287
+ /// otherwise the decoration is unchanged. The bare interval part basically is computed
288
+ /// as the bare interval representation [\link convert_rndd \endlink (\f$\underline{x}\f$), \link convert_rndu \endlink (\f$\overline{x}\f$)].
289
+ /// This means that if the pare interval part of \p x is not a valid interval representation then the computed bare interval part
290
+ /// is only a pair of numbers with no specific meaning.
291
+ ///
292
+ /// \note \ref pageAccuracy "Accuracy:" Tightest
293
+ /// \note Outward rounding uses round toward negative and positive which follow the IEEE754 specification.
294
+ ///
295
+ ///
296
+ template<typename T_>
297
+ static representation_dec convert_hull(representation_dec_type<T_> const& x);
298
+
299
+ ///@}
300
+
301
+
302
+
303
+ // -----------------------------------------------------------------------------
304
+ // Constructors, Methods, Interval constants
305
+ //
306
+ // p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_class_impl.hpp
307
+ // -----------------------------------------------------------------------------
308
+
309
+
310
+ ///@name Interval constants
311
+ ///
312
+ ///
313
+ ///@{
314
+
315
+ /// \brief Returns a \link mpfr_bin_ieee754_flavor::representation representation\endlink for an empty bare interval
316
+ ///
317
+ /// \return representation(NaN, NaN)
318
+ static representation empty();
319
+
320
+ /// \brief Returns a \link mpfr_bin_ieee754_flavor::representation_dec representation_dec\endlink for an empty decorated interval
321
+ ///
322
+ /// \return representation_dec(representation(NaN, NaN), \link p1788::decoration::decoration trv\endlink)
323
+ static representation_dec empty_dec();
324
+
325
+
326
+ /// \brief Returns a \link mpfr_bin_ieee754_flavor::representation representation\endlink for an entire bare interval
327
+ ///
328
+ /// \return representation(\f$-\infty\f$, \f$+\infty\f$)
329
+ static representation entire();
330
+
331
+ /// \brief Returns a \link mpfr_bin_ieee754_flavor::representation_dec representation_dec\endlink for an entire decorated interval
332
+ ///
333
+ /// \return representation_dec(representation(\f$-\infty\f$, \f$+\infty\f$), \link p1788::decoration::decoration dac\endlink)
334
+ static representation_dec entire_dec();
335
+
336
+
337
+ /// \brief Returns a \link mpfr_bin_ieee754_flavor::representation_dec representation_dec\endlink for an ill-formend decorated interval (Not an Interval)
338
+ ///
339
+ /// \return representation_dec(representation(NaN, NaN), \link p1788::decoration::decoration ill\endlink)
340
+ static representation_dec nai();
341
+
342
+
343
+ ///@}
344
+
345
+
346
+ ///@name Interval constructors
347
+ ///
348
+ ///
349
+ ///@{
350
+
351
+
352
+ /// \brief
353
+ ///
354
+ /// \param lower T
355
+ /// \param upper T
356
+ /// \return representation
357
+ ///
358
+ ///
359
+ static representation nums_to_interval(T lower, T upper);
360
+
361
+ /// \brief
362
+ ///
363
+ /// \param lower T
364
+ /// \param upper T
365
+ /// \return representation_dec
366
+ ///
367
+ ///
368
+ static representation_dec nums_to_decorated_interval(T lower, T upper);
369
+
370
+ // Mixed type
371
+ /// \brief
372
+ ///
373
+ /// \param
374
+ /// \param
375
+ /// \return
376
+ ///
377
+ ///
378
+ template<typename L_, typename U_>
379
+ static representation nums_to_interval(L_ lower, U_ upper);
380
+
381
+ /// \brief
382
+ ///
383
+ /// \param
384
+ /// \param
385
+ /// \return
386
+ ///
387
+ ///
388
+ template<typename L_, typename U_>
389
+ static representation_dec nums_to_decorated_interval(L_ lower, U_ upper);
390
+
391
+ // Kind of SetDec
392
+ /// \brief
393
+ ///
394
+ /// \param lower T
395
+ /// \param upper T
396
+ /// \param dec p1788::decoration::decoration
397
+ /// \return representation_dec
398
+ ///
399
+ ///
400
+ static representation_dec nums_dec_to_decorated_interval(T lower, T upper, p1788::decoration::decoration dec);
401
+
402
+ /// \brief
403
+ ///
404
+ /// \param
405
+ /// \param
406
+ /// \return
407
+ ///
408
+ ///
409
+ template<typename L_, typename U_>
410
+ static representation_dec nums_dec_to_decorated_interval(L_ lower, U_ upper, p1788::decoration::decoration dec);
411
+
412
+ // Literal
413
+ /// \brief
414
+ ///
415
+ /// \param str std::string const&
416
+ /// \return representation
417
+ ///
418
+ ///
419
+ static representation text_to_interval(std::string const& str);
420
+
421
+ /// \brief
422
+ ///
423
+ /// \param str std::string const&
424
+ /// \return representation_dec
425
+ ///
426
+ ///
427
+ static representation_dec text_to_decorated_interval(std::string const& str);
428
+
429
+ // Copy
430
+ /// \brief
431
+ ///
432
+ /// \param other representation const&
433
+ /// \return representation
434
+ ///
435
+ ///
436
+ static representation copy(representation const& other);
437
+
438
+ /// \brief
439
+ ///
440
+ /// \param other representation_dec const&
441
+ /// \return representation_dec
442
+ ///
443
+ ///
444
+ static representation_dec copy(representation_dec const& other);
445
+
446
+ /// \brief
447
+ ///
448
+ /// \param
449
+ /// \param
450
+ /// \return
451
+ ///
452
+ ///
453
+ template<typename T_>
454
+ static representation convert_type(representation_type<T_> const& other);
455
+
456
+ /// \brief
457
+ ///
458
+ /// \param
459
+ /// \param
460
+ /// \return
461
+ ///
462
+ ///
463
+ template<typename T_>
464
+ static representation_dec convert_type(representation_dec_type<T_> const& other);
465
+
466
+ // intervalPart
467
+ /// \brief
468
+ ///
469
+ /// \param other representation_dec const&
470
+ /// \return representation
471
+ ///
472
+ ///
473
+ static representation interval_part(representation_dec const& other);
474
+
475
+ /// \brief
476
+ ///
477
+ /// \param
478
+ /// \param
479
+ /// \return
480
+ ///
481
+ ///
482
+ template<typename T_>
483
+ static representation interval_part(representation_dec_type<T_> const& other);
484
+
485
+ // newDec
486
+ /// \brief
487
+ ///
488
+ /// \param other representation const&
489
+ /// \return representation_dec
490
+ ///
491
+ ///
492
+ static representation_dec new_dec(representation const& other);
493
+
494
+ /// \brief
495
+ ///
496
+ /// \param
497
+ /// \param
498
+ /// \return
499
+ ///
500
+ ///
501
+ template<typename T_>
502
+ static representation_dec new_dec(representation_type<T_> const& other);
503
+
504
+ // setDec
505
+ /// \brief
506
+ ///
507
+ /// \param other representation const&
508
+ /// \param dec p1788::decoration::decoration
509
+ /// \return representation_dec
510
+ ///
511
+ ///
512
+ static representation_dec set_dec(representation const& other, p1788::decoration::decoration dec);
513
+
514
+ /// \brief
515
+ ///
516
+ /// \param
517
+ /// \param
518
+ /// \return
519
+ ///
520
+ ///
521
+ template<typename T_>
522
+ static representation_dec set_dec(representation_type<T_> const& other, p1788::decoration::decoration dec);
523
+
524
+ ///@}
525
+
526
+ static p1788::decoration::decoration decoration_part(representation_dec const& x);
527
+
528
+
529
+
530
+
531
+ // -----------------------------------------------------------------------------
532
+ // Input and output
533
+ // -----------------------------------------------------------------------------
534
+
535
+
536
+ //template<typename T_, typename CharT, typename Traits>
537
+ //friend std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>&, typename mpfr_bin_ieee754_flavor<T_>::representation_type const&);
538
+
539
+ ///@name Input and output
540
+ ///
541
+ ///
542
+ ///@{
543
+
544
+ /// \todo TODO
545
+ ///
546
+ ///
547
+ template< typename CharT, typename Traits >
548
+ static std::basic_ostream<CharT, Traits>& operator_interval_to_text(
549
+ std::basic_ostream<CharT, Traits>& os,
550
+ representation const& x);
551
+
552
+ /// \todo TODO
553
+ ///
554
+ ///
555
+ template< typename CharT, typename Traits >
556
+ static std::basic_ostream<CharT, Traits>& operator_interval_to_text(
557
+ std::basic_ostream<CharT, Traits>& os,
558
+ representation_dec const& x);
559
+
560
+ /// \todo TODO
561
+ ///
562
+ ///
563
+ template< typename CharT, typename Traits >
564
+ static std::basic_istream<CharT, Traits>& operator_text_to_interval(
565
+ std::basic_istream<CharT, Traits>& is,
566
+ representation& x);
567
+
568
+ /// \todo TODO
569
+ ///
570
+ ///
571
+ template< typename CharT, typename Traits >
572
+ static std::basic_istream<CharT, Traits>& operator_text_to_interval(
573
+ std::basic_istream<CharT, Traits>& is,
574
+ representation_dec& x);
575
+
576
+ ///@}
577
+
578
+ // -----------------------------------------------------------------------------
579
+ // Set operations
580
+ //
581
+ // p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_set_op_impl.hpp
582
+ // -----------------------------------------------------------------------------
583
+
584
+ ///@name Set operations
585
+ ///
586
+ ///
587
+ ///@{
588
+
589
+ /// \todo Docu, Test
590
+ ///
591
+ ///
592
+ static representation intersection(representation const& x,
593
+ representation const& y);
594
+
595
+
596
+ /// \todo Docu, Test
597
+ ///
598
+ ///
599
+ template<typename T1, typename T2>
600
+ static representation intersection(representation_type<T1> const& x,
601
+ representation_type<T2> const& y);
602
+
603
+ /// \todo Docu, Test
604
+ ///
605
+ ///
606
+ static representation_dec intersection(representation_dec const& x,
607
+ representation_dec const& y);
608
+
609
+ /// \todo Docu, Test
610
+ ///
611
+ ///
612
+ template<typename T1, typename T2>
613
+ static representation_dec intersection(representation_dec_type<T1> const& x,
614
+ representation_dec_type<T2> const& y);
615
+
616
+ /// \todo Docu, Test
617
+ ///
618
+ ///
619
+ static representation convex_hull(representation const& x,
620
+ representation const& y);
621
+
622
+ /// \todo Docu, Test
623
+ ///
624
+ ///
625
+ template<typename T1, typename T2>
626
+ static representation convex_hull(representation_type<T1> const& x,
627
+ representation_type<T2> const& y);
628
+
629
+ /// \todo Docu, Test
630
+ ///
631
+ ///
632
+ static representation_dec convex_hull(representation_dec const& x,
633
+ representation_dec const& y);
634
+
635
+ /// \todo Docu, Test
636
+ ///
637
+ ///
638
+ template<typename T1, typename T2>
639
+ static representation_dec convex_hull(representation_dec_type<T1> const& x,
640
+ representation_dec_type<T2> const& y);
641
+
642
+ ///@}
643
+
644
+ // -----------------------------------------------------------------------------
645
+ // Numeric functions on intervals
646
+ //
647
+ // p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_num_func_impl.hpp
648
+ // -----------------------------------------------------------------------------
649
+
650
+ ///@name Numeric functions on intervals
651
+ ///
652
+ ///
653
+ ///@{
654
+
655
+
656
+ /// \brief Infimum of a bare interval representation
657
+ ///
658
+ /// \param x Interval representation
659
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
660
+ /// \li \f$+\infty\f$ if \p x is empty
661
+ /// \li -0 if the lower bound of \p x is zero
662
+ /// \li lower bound of \p x otherwise
663
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
664
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
665
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
666
+ static T inf(representation const& x);
667
+
668
+ /// \brief Mixed-type version of <c>\link mpfr_bin_ieee754_flavor::inf(representation const& x) inf\endlink</c>.
669
+ ///
670
+ /// \tparam T_ Bound type of the input interval representation
671
+ /// \param x Interval representation
672
+ /// \return Result of <c>\link mpfr_bin_ieee754_flavor::inf(representation const& x) inf\endlink</c> converted
673
+ /// to the type \p T using rounding to \f$-\infty\f$.
674
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
675
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
676
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
677
+ template<typename T_>
678
+ static T inf(representation_type<T_> const& x);
679
+
680
+
681
+ /// \brief Infimum of a decorated interval representation
682
+ ///
683
+ /// \param x Decorated interval representation
684
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
685
+ /// \li NaN if \p x is NaI
686
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::inf(representation const& x) inf\endlink</c>
687
+ /// called with the bare interval part otherwise
688
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
689
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
690
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
691
+ static T inf(representation_dec const& x);
692
+
693
+ /// \brief Mixed-type version of the infimum of a decorated interval representation.
694
+ ///
695
+ /// \tparam T_ Bound type of the input interval representation
696
+ /// \param x Decorated interval representation
697
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
698
+ /// \li NaN if \p x is NaI
699
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::inf(representation_type<T_> const& x) inf\endlink</c>
700
+ /// called with the bare interval part otherwise
701
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
702
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
703
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
704
+ template<typename T_>
705
+ static T inf(representation_dec_type<T_> const& x);
706
+
707
+ /// \brief Supremum of a bare interval representation
708
+ ///
709
+ /// \param x Interval representation
710
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
711
+ /// \li \f$-\infty\f$ if \p x is empty
712
+ /// \li +0 if the upper bound of \p x is zero
713
+ /// \li upper bound of \p x otherwise
714
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
715
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
716
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
717
+ static T sup(representation const& x);
718
+
719
+ /// \brief Mixed-type version of <c>\link mpfr_bin_ieee754_flavor::sup(representation const& x) sup\endlink</c>.
720
+ ///
721
+ /// \tparam T_ Bound type of the input interval representation
722
+ /// \param x Interval representation
723
+ /// \return Result of <c>\link mpfr_bin_ieee754_flavor::sup(representation const& x) sup\endlink</c> converted
724
+ /// to the type \p T using rounding to \f$+\infty\f$.
725
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
726
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
727
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
728
+ template<typename T_>
729
+ static T sup(representation_type<T_> const& x);
730
+
731
+ /// \brief Supremum of a decorated interval representation
732
+ ///
733
+ /// \param x Decorated interval representation
734
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
735
+ /// \li NaN if \p x is NaI
736
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::sup(representation const& x) sup\endlink</c>
737
+ /// called with the bare interval part otherwise
738
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
739
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
740
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
741
+ static T sup(representation_dec const& x);
742
+
743
+ /// \brief Mixed-type version of the supremum of a decorated interval representation.
744
+ ///
745
+ /// \tparam T_ Bound type of the input interval representation
746
+ /// \param x Decorated interval representation
747
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
748
+ /// \li NaN if \p x is NaI
749
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::sup(representation_type<T_> const& x) sup\endlink</c>
750
+ /// called with the bare interval part otherwise
751
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
752
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
753
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
754
+ template<typename T_>
755
+ static T sup(representation_dec_type<T_> const& x);
756
+
757
+ /// \brief Midpoint of a bare interval representation
758
+ ///
759
+ /// \param x Interval representation
760
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
761
+ /// \li NaN if \p x is empty
762
+ /// \li +0 if \p x is entire
763
+ /// \li finite negative number with largest magnitude of type \p T if \f$\underline{x} = -\infty\f$ and \f$\overline{x}\f$ is finite
764
+ /// \li finite positive number with largest magnitude of type \p T if \f$\underline{x}\f$ is finite and \f$\overline{x} = +\infty\f$
765
+ /// \li \f$(\underline{x} + \overline{x}) / 2\f$ rounded to the nearest number of type \p T if \f$\underline{x}, \overline{x}\f$ are both finite.
766
+ /// It returns +0.0 in case of a zero
767
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
768
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
769
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
770
+ static T mid(representation const& x);
771
+
772
+ /// \brief Mixed-type version of the midpoint of a bare interval representation
773
+ ///
774
+ /// \tparam T_ Bound type of the input interval representation
775
+ /// \param x Interval representation
776
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
777
+ /// \li NaN if \p x is empty
778
+ /// \li +0 if \p x is entire
779
+ /// \li finite negative number with largest magnitude of type \p T if \f$\underline{x} = -\infty\f$ and \f$\overline{x}\f$ is finite
780
+ /// \li finite positive number with largest magnitude of type \p T if \f$\underline{x}\f$ is f inite and \f$\overline{x} = +\infty\f$
781
+ /// \li \f$(\underline{x} + \overline{x}) / 2\f$ rounded to the nearest number of type \p T if \f$\underline{x}, \overline{x}\f$ are both finite.
782
+ /// It returns +0.0 in case of a zero
783
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
784
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
785
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
786
+ template<typename T_>
787
+ static T mid(representation_type<T_> const& x);
788
+
789
+ /// \brief Midpoint of a decorated interval representation
790
+ ///
791
+ /// \param x Decorated interval representation
792
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
793
+ /// \li NaN if \p x is NaI
794
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::mid(representation const& x) mid\endlink</c>
795
+ /// called with the bare interval part otherwise
796
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
797
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
798
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
799
+ static T mid(representation_dec const& x);
800
+
801
+ /// \brief Mixed-type version of the midpoint of a decorated interval representation.
802
+ ///
803
+ /// \tparam T_ Bound type of the input interval representation
804
+ /// \param x Decorated interval representation
805
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
806
+ /// \li NaN if \p x is NaI
807
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::mid(representation_type<T_> const& x) mid\endlink</c>
808
+ /// called with the bare interval part otherwise
809
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
810
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
811
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
812
+ template<typename T_>
813
+ static T mid(representation_dec_type<T_> const& x);
814
+
815
+ /// \brief Radius of a bare interval representation
816
+ ///
817
+ /// \param x Interval representation
818
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
819
+ /// \li NaN if \p x is empty
820
+ /// \li smallest number of type \p T such that \f$mid(x) - rad(x) \leq \underline{x}\f$ and \f$\overline{x} \leq mid(x) + rad(x)\f$, otherwise.
821
+ /// It returns +0.0 in case of a zero
822
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
823
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
824
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
825
+ static T rad(representation const& x);
826
+
827
+ /// \brief Mixed-type version of <c>\link mpfr_bin_ieee754_flavor::rad(representation const& x) rad\endlink</c>.
828
+ ///
829
+ /// \tparam T_ Bound type of the input interval representation
830
+ /// \param x Interval representation
831
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
832
+ /// \li NaN if \p x is empty
833
+ /// \li smallest number of type \p T such that \f$mid(x) - rad(x) \leq \underline{x}\f$ and \f$\overline{x} \leq mid(x) + rad(x)\f$, otherwise.
834
+ /// It returns +0.0 in case of a zero
835
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
836
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
837
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
838
+ template<typename T_>
839
+ static T rad(representation_type<T_> const& x);
840
+
841
+ /// \brief Radius of a decorated interval representation
842
+ ///
843
+ /// \param x Decorated interval representation
844
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
845
+ /// \li NaN if \p x is NaI
846
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::rad(representation const& x) rad\endlink</c>
847
+ /// called with the bare interval part otherwise
848
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
849
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
850
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
851
+ static T rad(representation_dec const& x);
852
+
853
+ /// \brief Mixed-type version of the radius of a decorated interval representation.
854
+ ///
855
+ /// \tparam T_ Bound type of the input interval representation
856
+ /// \param x Decorated interval representation
857
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
858
+ /// \li NaN if \p x is NaI
859
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::rad(representation_type<T_> const& x) rad\endlink</c>
860
+ /// called with the bare interval part otherwise
861
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
862
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
863
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
864
+ template<typename T_>
865
+ static T rad(representation_dec_type<T_> const& x);
866
+
867
+ /// \brief Midpoint and radius of a bare interval representation
868
+ ///
869
+ /// \param x Interval representation
870
+ /// \return <c>std::pair<T,T></c> containing the results of <c>\link mpfr_bin_ieee754_flavor::mid(representation const& x) mid\endlink</c>
871
+ /// and <c>\link mpfr_bin_ieee754_flavor::rad(representation const& x) rad\endlink</c>
872
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
873
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
874
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
875
+ static std::pair<T, T> mid_rad(representation const& x);
876
+
877
+ /// \brief Mixed-type version of the midpoint and radius of a bare interval representation.
878
+ ///
879
+ /// \tparam T_ Bound type of the input interval representation
880
+ /// \param x Interval representation
881
+ /// \return <c>std::pair<T,T></c> containing the results of <c>\link mpfr_bin_ieee754_flavor::mid(representation_type<T_> const& x) mid\endlink</c>
882
+ /// and <c>\link mpfr_bin_ieee754_flavor::rad(representation_type<T_> const& x) rad\endlink</c>
883
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
884
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
885
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
886
+ template<typename T_>
887
+ static std::pair<T, T> mid_rad(representation_type<T_> const& x);
888
+
889
+ /// \brief Midpoint and radius of a decorated interval representation
890
+ ///
891
+ /// \param x Decorated interval representation
892
+ /// \return <c>std::pair<T,T></c> containing the results of <c>\link mpfr_bin_ieee754_flavor::mid(representation_dec const& x) mid\endlink</c>
893
+ /// and <c>\link mpfr_bin_ieee754_flavor::rad(representation_dec const& x) rad\endlink</c>
894
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
895
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
896
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
897
+ static std::pair<T, T> mid_rad(representation_dec const& x);
898
+
899
+ /// \brief Mixed-type version of the midpoint and radius of a decorated interval representation.
900
+ ///
901
+ /// \tparam T_ Bound type of the input interval representation
902
+ /// \param x Decorated interval representation
903
+ /// \return <c>std::pair<T,T></c> containing the results of <c>\link mpfr_bin_ieee754_flavor::mid(representation_dec_type<T_> const& x) mid\endlink</c>
904
+ /// and <c>\link mpfr_bin_ieee754_flavor::rad(representation_dec_type<T_> const& x) rad\endlink</c>
905
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
906
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
907
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
908
+ template<typename T_>
909
+ static std::pair<T, T> mid_rad(representation_dec_type<T_> const& x);
910
+
911
+ /// \brief Width of a bare interval representation
912
+ ///
913
+ /// \param x Interval representation
914
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
915
+ /// \li NaN if \p x is empty
916
+ /// \li \f$\overline{x} -\underline{x}\f$ rounded upward, otherwise.
917
+ /// It returns +0.0 in case of a zero
918
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
919
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
920
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
921
+ static T wid(representation const& x);
922
+
923
+ /// \brief Mixed-type version of <c>\link mpfr_bin_ieee754_flavor::wid(representation const& x) wid\endlink</c>.
924
+ ///
925
+ /// \tparam T_ Bound type of the input interval representation
926
+ /// \param x Interval representation
927
+ /// \return Result of <c>\link mpfr_bin_ieee754_flavor::wid(representation const& x) wid\endlink</c> converted
928
+ /// to the type \p T using rounding to \f$+\infty\f$.
929
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
930
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
931
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
932
+ template<typename T_>
933
+ static T wid(representation_type<T_> const& x);
934
+
935
+ /// \brief Width of a decorated interval representation
936
+ ///
937
+ /// \param x Decorated interval representation
938
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
939
+ /// \li NaN if \p x is NaI
940
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::wid(representation const& x) wid\endlink</c>
941
+ /// called with the bare interval part otherwise
942
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
943
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
944
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
945
+ static T wid(representation_dec const& x);
946
+
947
+ /// \brief Mixed-type version of the width of a decorated interval representation.
948
+ ///
949
+ /// \tparam T_ Bound type of the input interval representation
950
+ /// \param x Decorated interval representation
951
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
952
+ /// \li NaN if \p x is NaI
953
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::wid(representation_type<T_> const& x) wid\endlink</c>
954
+ /// called with the bare interval part otherwise
955
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
956
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
957
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
958
+ template<typename T_>
959
+ static T wid(representation_dec_type<T_> const& x);
960
+
961
+ /// \brief Magnitude of a bare interval representation
962
+ ///
963
+ /// \param x Interval representation
964
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
965
+ /// \li NaN if \p x is empty
966
+ /// \li \f$ sup \{ |x| \mid x \in \mathbf{x} \}\f$ rounded upward, otherwise.
967
+ /// It returns +0.0 in case of a zero
968
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
969
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
970
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
971
+ static T mag(representation const& x);
972
+
973
+ /// \brief Mixed-type version of <c>\link mpfr_bin_ieee754_flavor::mag(representation const& x) mag\endlink</c>.
974
+ ///
975
+ /// \tparam T_ Bound type of the input interval representation
976
+ /// \param x Interval representation
977
+ /// \return Result of <c>\link mpfr_bin_ieee754_flavor::mag(representation const& x) mag\endlink</c> converted
978
+ /// to the type \p T using rounding to \f$+\infty\f$.
979
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
980
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
981
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
982
+ template<typename T_>
983
+ static T mag(representation_type<T_> const& x);
984
+
985
+ /// \brief Magnitude of a decorated interval representation
986
+ ///
987
+ /// \param x Decorated interval representation
988
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
989
+ /// \li NaN if \p x is NaI
990
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::mag(representation const& x) mag\endlink</c>
991
+ /// called with the bare interval part otherwise
992
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
993
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
994
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
995
+ static T mag(representation_dec const& x);
996
+
997
+ /// \brief Mixed-type version of the magnitude of a decorated interval representation.
998
+ ///
999
+ /// \tparam T_ Bound type of the input interval representation
1000
+ /// \param x Decorated interval representation
1001
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1002
+ /// \li NaN if \p x is NaI
1003
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::mag(representation_type<T_> const& x) mag\endlink</c>
1004
+ /// called with the bare interval part otherwise
1005
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1006
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1007
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1008
+ template<typename T_>
1009
+ static T mag(representation_dec_type<T_> const& x);
1010
+
1011
+
1012
+ /// \brief Mignitude of a bare interval representation
1013
+ ///
1014
+ /// \param x Interval representation
1015
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1016
+ /// \li NaN if \p x is empty
1017
+ /// \li \f$ inf \{ |x| \mid x \in \mathbf{x} \}\f$ rounded downward, otherwise.
1018
+ /// It returns +0.0 in case of a zero
1019
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1020
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1021
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1022
+ static T mig(representation const& x);
1023
+
1024
+ /// \brief Mixed-type version of <c>\link mpfr_bin_ieee754_flavor::mig(representation const& x) mig\endlink</c>.
1025
+ ///
1026
+ /// \tparam T_ Bound type of the input interval representation
1027
+ /// \param x Interval representation
1028
+ /// \return Result of <c>\link mpfr_bin_ieee754_flavor::mig(representation const& x) mig\endlink</c> converted
1029
+ /// to the type \p T using rounding to \f$-\infty\f$.
1030
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1031
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1032
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1033
+ template<typename T_>
1034
+ static T mig(representation_type<T_> const& x);
1035
+
1036
+ /// \brief Mignitude of a decorated interval representation
1037
+ ///
1038
+ /// \param x Decorated interval representation
1039
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1040
+ /// \li NaN if \p x is NaI
1041
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::mig(representation const& x) mig\endlink</c>
1042
+ /// called with the bare interval part otherwise
1043
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1044
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1045
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1046
+ static T mig(representation_dec const& x);
1047
+
1048
+ /// \brief Mixed-type version of the mignitude of a decorated interval representation.
1049
+ ///
1050
+ /// \tparam T_ Bound type of the input interval representation
1051
+ /// \param x Decorated interval representation
1052
+ /// \return \li NaN if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1053
+ /// \li NaN if \p x is NaI
1054
+ /// \li Result of <c>\link mpfr_bin_ieee754_flavor::mig(representation_type<T_> const& x) mig\endlink</c>
1055
+ /// called with the bare interval part otherwise
1056
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1057
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1058
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1059
+ template<typename T_>
1060
+ static T mig(representation_dec_type<T_> const& x);
1061
+
1062
+ ///@}
1063
+
1064
+ // -----------------------------------------------------------------------------
1065
+ // Boolean functions of intervals
1066
+ //
1067
+ // p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_bool_func_impl.hpp
1068
+ // -----------------------------------------------------------------------------
1069
+
1070
+ ///@name Boolean functions of intervals
1071
+ ///
1072
+ ///
1073
+ ///@{
1074
+
1075
+
1076
+ /// \brief Checks if \p x is a representation for an empty bare interval.
1077
+ ///
1078
+ /// \param x Interval representation
1079
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1080
+ /// \li <c>true</c> if \p x is a representation of an empty bare interval
1081
+ /// \li <c>false</c> otherwise.
1082
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1083
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1084
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1085
+ static bool is_empty(representation const& x);
1086
+
1087
+ /// \brief Checks if \p x is a representation for an empty decorated interval.
1088
+ ///
1089
+ /// \param x Decorated interval representation
1090
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1091
+ /// \li <c>true</c> if \p x is a representation of an empty decorated interval
1092
+ /// \li <c>false</c> otherwise.
1093
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1094
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1095
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1096
+ static bool is_empty(representation_dec const& x);
1097
+
1098
+ /// \brief Checks if \p x is a representation for an entire bare interval.
1099
+ ///
1100
+ /// \param x Interval representation
1101
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1102
+ /// \li <c>true</c> if \p x is a representation of an entire bare interval
1103
+ /// \li <c>false</c> otherwise.
1104
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1105
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1106
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1107
+ static bool is_entire(representation const& x);
1108
+
1109
+ /// \brief Checks if \p x is a representation for an entire decorated interval.
1110
+ ///
1111
+ /// \param x Interval representation
1112
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1113
+ /// \li <c>true</c> if \p x is a representation of an entire decorated interval
1114
+ /// \li <c>false</c> otherwise.
1115
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1116
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1117
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1118
+ static bool is_entire(representation_dec const& x);
1119
+
1120
+ /// \brief Checks if \p x is a representation for an ill-formed decorated interval (Not an Interval).
1121
+ ///
1122
+ /// \param x Interval representation
1123
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1124
+ /// \li <c>true</c> if \p x is a representation of NaI
1125
+ /// \li <c>false</c> otherwise.
1126
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1127
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1128
+ /// \note In case of an invalid representation of \p x the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1129
+ static bool is_nai(representation_dec const& x);
1130
+
1131
+ /// \brief Checks if \p x equals \p y.
1132
+ ///
1133
+ /// \param x Interval representation
1134
+ /// \param y Interval representation
1135
+ ///
1136
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1137
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::equal(representation const& x, representation_type<T_> const& y) equal\endlink</c> otherwise.
1138
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1139
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1140
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1141
+ static bool equal(representation const& x, representation const& y);
1142
+
1143
+ /// \brief Decorated version. Checks if \p x equals \p y.
1144
+ ///
1145
+ /// \param x Interval representation
1146
+ /// \param y Interval representation
1147
+ ///
1148
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1149
+ /// \li <c>false</c> if \p x or \p y is NaI
1150
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::equal(representation const& x, representation_type<T_> const& y) equal\endlink</c>
1151
+ /// called with the bare interval part otherwise
1152
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1153
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1154
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1155
+ static bool equal(representation_dec const& x, representation_dec const& y);
1156
+
1157
+ /// \brief Mixed-type version. Checks if \p x equals \p y.
1158
+ ///
1159
+ /// \param x Interval representation
1160
+ /// \param y Interval representation
1161
+ ///
1162
+ /// \tparam T_ Bound type of the interval representation of \p y
1163
+ ///
1164
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1165
+ /// \li <c>true</c> if \p x and \p y are both empty or if
1166
+ /// \f$\underline{x} = \underline{y} \wedge \overline{x} = \overline{y}\f$
1167
+ /// \li <c>false</c> otherwise.
1168
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1169
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1170
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1171
+ template<typename T_>
1172
+ static bool equal(representation const& x, representation_type<T_> const& y);
1173
+
1174
+ /// \brief Decorated mixed-type version. Checks if \p x equals \p y.
1175
+ ///
1176
+ /// \param x Interval representation
1177
+ /// \param y Interval representation
1178
+ ///
1179
+ /// \tparam T_ Bound type of the interval representation of \p y
1180
+ ///
1181
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1182
+ /// \li <c>false</c> if \p x or \p y is NaI
1183
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::equal(representation const& x, representation_type<T_> const& y) equal\endlink</c>
1184
+ /// called with the bare interval part otherwise
1185
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1186
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1187
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1188
+ template<typename T_>
1189
+ static bool equal(representation_dec const& x, representation_dec_type<T_> const& y);
1190
+
1191
+
1192
+ /// \brief Checks if \p x is a subset of \p y.
1193
+ ///
1194
+ /// \param x Interval representation
1195
+ /// \param y Interval representation
1196
+ ///
1197
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1198
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::subset(representation const& x, representation_type<T_> const& y) subset\endlink</c> otherwise.
1199
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1200
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1201
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1202
+ static bool subset(representation const& x, representation const& y);
1203
+
1204
+ /// \brief Decorated version. Checks if \p x is a subset of \p y.
1205
+ ///
1206
+ /// \param x Interval representation
1207
+ /// \param y Interval representation
1208
+ ///
1209
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1210
+ /// \li <c>false</c> if \p x or \p y is NaI
1211
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::subset(representation const& x, representation_type<T_> const& y) subset\endlink</c>
1212
+ /// called with the bare interval part otherwise
1213
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1214
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1215
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1216
+ static bool subset(representation_dec const& x, representation_dec const& y);
1217
+
1218
+ /// \brief Mixed-type version. Checks if \p x is a subset of \p y.
1219
+ ///
1220
+ /// \param x Interval representation
1221
+ /// \param y Interval representation
1222
+ ///
1223
+ /// \tparam T_ Bound type of the interval representation of \p y
1224
+ ///
1225
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1226
+ /// \li <c>true</c> if \p x is empty or if
1227
+ /// \f$\underline{y} \leq \underline{x} \wedge \overline{x} \leq \overline{y}\f$
1228
+ /// \li <c>false</c> otherwise.
1229
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1230
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1231
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1232
+ template<typename T_>
1233
+ static bool subset(representation const& x, representation_type<T_> const& y);
1234
+
1235
+ /// \brief Decorated mixed-type version. Checks if \p x is a subset of \p y.
1236
+ ///
1237
+ /// \param x Interval representation
1238
+ /// \param y Interval representation
1239
+ ///
1240
+ /// \tparam T_ Bound type of the interval representation of \p y
1241
+ ///
1242
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1243
+ /// \li <c>false</c> if \p x or \p y is NaI
1244
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::subset(representation const& x, representation_type<T_> const& y) subset\endlink</c>
1245
+ /// called with the bare interval part otherwise
1246
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1247
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1248
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1249
+ template<typename T_>
1250
+ static bool subset(representation_dec const& x, representation_dec_type<T_> const& y);
1251
+
1252
+ /// \brief Checks if \p x is weakly less than \p y.
1253
+ ///
1254
+ /// \param x Interval representation
1255
+ /// \param y Interval representation
1256
+ ///
1257
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1258
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::less(representation const& x, representation_type<T_> const& y) less\endlink</c> otherwise.
1259
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1260
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1261
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1262
+ static bool less(representation const& x, representation const& y);
1263
+
1264
+ /// \brief Decorated version. Checks if \p x is weakly less than \p y.
1265
+ ///
1266
+ /// \param x Interval representation
1267
+ /// \param y Interval representation
1268
+ ///
1269
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1270
+ /// \li <c>false</c> if \p x or \p y is NaI
1271
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::less(representation const& x, representation_type<T_> const& y) less\endlink</c>
1272
+ /// called with the bare interval part otherwise
1273
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1274
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1275
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1276
+ static bool less(representation_dec const& x, representation_dec const& y);
1277
+
1278
+ /// \brief Mixed-type version. Checks if \p x is weakly less than \p y.
1279
+ ///
1280
+ /// \param x Interval representation
1281
+ /// \param y Interval representation
1282
+ ///
1283
+ /// \tparam T_ Bound type of the interval representation of \p y
1284
+ ///
1285
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1286
+ /// \li <c>true</c> if \p x and \p y are both empty or if
1287
+ /// \f$\underline{x} \leq \underline{y} \wedge \overline{x} \leq \overline{y}\f$
1288
+ /// \li <c>false</c> otherwise.
1289
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1290
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1291
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1292
+ template<typename T_>
1293
+ static bool less(representation const& x, representation_type<T_> const& y);
1294
+
1295
+ /// \brief Decorated mixed-type version. Checks if \p x is weakly less than \p y.
1296
+ ///
1297
+ /// \param x Interval representation
1298
+ /// \param y Interval representation
1299
+ ///
1300
+ /// \tparam T_ Bound type of the interval representation of \p y
1301
+ ///
1302
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1303
+ /// \li <c>false</c> if \p x or \p y is NaI
1304
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::less(representation const& x, representation_type<T_> const& y) less\endlink</c>
1305
+ /// called with the bare interval part otherwise
1306
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1307
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1308
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1309
+ template<typename T_>
1310
+ static bool less(representation_dec const& x, representation_dec_type<T_> const& y);
1311
+
1312
+
1313
+ /// \brief Checks if \p x is left of but may touch \p y.
1314
+ ///
1315
+ /// \param x Interval representation
1316
+ /// \param y Interval representation
1317
+ ///
1318
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1319
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::precedes(representation const& x, representation_type<T_> const& y) precedes\endlink</c> otherwise.
1320
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1321
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1322
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1323
+ static bool precedes(representation const& x, representation const& y);
1324
+
1325
+ /// \brief Decorated version. Checks if \p x is left of but may touch \p y.
1326
+ ///
1327
+ /// \param x Interval representation
1328
+ /// \param y Interval representation
1329
+ ///
1330
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1331
+ /// \li <c>false</c> if \p x or \p y is NaI
1332
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::precedes(representation const& x, representation_type<T_> const& y) precedes\endlink</c>
1333
+ /// called with the bare interval part otherwise
1334
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1335
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1336
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1337
+ static bool precedes(representation_dec const& x, representation_dec const& y);
1338
+
1339
+ /// \brief Mixed-type version. Checks if \p x is left of but may touch \p y.
1340
+ ///
1341
+ /// \param x Interval representation
1342
+ /// \param y Interval representation
1343
+ ///
1344
+ /// \tparam T_ Bound type of the interval representation of \p y
1345
+ ///
1346
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1347
+ /// \li <c>true</c> if \p x or \p y is empty or if
1348
+ /// \f$\overline{x} \leq \underline{y}\f$
1349
+ /// \li <c>false</c> otherwise.
1350
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1351
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1352
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1353
+ template<typename T_>
1354
+ static bool precedes(representation const& x, representation_type<T_> const& y);
1355
+
1356
+ /// \brief Decorated mixed-type version. Checks if \p x is left of but may touch \p y.
1357
+ ///
1358
+ /// \param x Interval representation
1359
+ /// \param y Interval representation
1360
+ ///
1361
+ /// \tparam T_ Bound type of the interval representation of \p y
1362
+ ///
1363
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1364
+ /// \li <c>false</c> if \p x or \p y is NaI
1365
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::precedes(representation const& x, representation_type<T_> const& y) precedes\endlink</c>
1366
+ /// called with the bare interval part otherwise
1367
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1368
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1369
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1370
+ template<typename T_>
1371
+ static bool precedes(representation_dec const& x, representation_dec_type<T_> const& y);
1372
+
1373
+
1374
+ /// \brief Checks if \p x is interior to \p y.
1375
+ ///
1376
+ /// \param x Interval representation
1377
+ /// \param y Interval representation
1378
+ ///
1379
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1380
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::interior(representation const& x, representation_type<T_> const& y) interior\endlink</c> otherwise.
1381
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1382
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1383
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1384
+ static bool interior(representation const& x, representation const& y);
1385
+
1386
+ /// \brief Decorated version. Checks if \p x is interior to \p y.
1387
+ ///
1388
+ /// \param x Interval representation
1389
+ /// \param y Interval representation
1390
+ ///
1391
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1392
+ /// \li <c>false</c> if \p x or \p y is NaI
1393
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::interior(representation const& x, representation_type<T_> const& y) interior\endlink</c>
1394
+ /// called with the bare interval part otherwise
1395
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1396
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1397
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1398
+ static bool interior(representation_dec const& x, representation_dec const& y);
1399
+
1400
+ /// \brief Mixed-type version. Checks if \p x is interior to \p y.
1401
+ ///
1402
+ /// \param x Interval representation
1403
+ /// \param y Interval representation
1404
+ ///
1405
+ /// \tparam T_ Bound type of the interval representation of \p y
1406
+ ///
1407
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1408
+ /// \li <c>true</c> if \p x is empty or if
1409
+ /// \f$(\underline{y} < \underline{x} \vee \underline{y} = \underline{x} = -\infty) \wedge (\overline{x} < \overline{y} \vee \overline{x} = \overline{y} = +\infty)\f$
1410
+ /// \li <c>false</c> otherwise.
1411
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1412
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1413
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1414
+ template<typename T_>
1415
+ static bool interior(representation const& x, representation_type<T_> const& y);
1416
+
1417
+ /// \brief Decorated mixed-type version. Checks if \p x is interior to \p y.
1418
+ ///
1419
+ /// \param x Interval representation
1420
+ /// \param y Interval representation
1421
+ ///
1422
+ /// \tparam T_ Bound type of the interval representation of \p y
1423
+ ///
1424
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1425
+ /// \li <c>false</c> if \p x or \p y is NaI
1426
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::interior(representation const& x, representation_type<T_> const& y) interior\endlink</c>
1427
+ /// called with the bare interval part otherwise
1428
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1429
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1430
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1431
+ template<typename T_>
1432
+ static bool interior(representation_dec const& x, representation_dec_type<T_> const& y);
1433
+
1434
+
1435
+ /// \brief Checks if \p x is strictly less than \p y.
1436
+ ///
1437
+ /// \param x Interval representation
1438
+ /// \param y Interval representation
1439
+ ///
1440
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1441
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::strictly_less(representation const& x, representation_type<T_> const& y) strictly_less\endlink</c> otherwise.
1442
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1443
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1444
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1445
+ static bool strictly_less(representation const& x, representation const& y);
1446
+
1447
+ /// \brief Decorated version. Checks if \p x is strictly less than \p y.
1448
+ ///
1449
+ /// \param x Interval representation
1450
+ /// \param y Interval representation
1451
+ ///
1452
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1453
+ /// \li <c>false</c> if \p x or \p y is NaI
1454
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::strictly_less(representation const& x, representation_type<T_> const& y) strictly_less\endlink</c>
1455
+ /// called with the bare interval part otherwise
1456
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1457
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1458
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1459
+ static bool strictly_less(representation_dec const& x, representation_dec const& y);
1460
+
1461
+ /// \brief Mixed-type version. Checks if \p x is strictly less than \p y.
1462
+ ///
1463
+ /// \param x Interval representation
1464
+ /// \param y Interval representation
1465
+ ///
1466
+ /// \tparam T_ Bound type of the interval representation of \p y
1467
+ ///
1468
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1469
+ /// \li <c>true</c> if \p x and \p y are both empty or if
1470
+ /// \f$(\underline{x} < \underline{y} \vee \underline{x} = \underline{y} = -\infty) \wedge (\overline{x} < \overline{y} \vee \overline{x} = \overline{y} = +\infty)\f$
1471
+ /// \li <c>false</c> otherwise.
1472
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1473
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1474
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1475
+ template<typename T_>
1476
+ static bool strictly_less(representation const& x, representation_type<T_> const& y);
1477
+
1478
+ /// \brief Decorated mixed-type version. Checks if \p x is strictly less than \p y.
1479
+ ///
1480
+ /// \param x Interval representation
1481
+ /// \param y Interval representation
1482
+ ///
1483
+ /// \tparam T_ Bound type of the interval representation of \p y
1484
+ ///
1485
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1486
+ /// \li <c>false</c> if \p x or \p y is NaI
1487
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::strictly_less(representation const& x, representation_type<T_> const& y) strictly_less\endlink</c>
1488
+ /// called with the bare interval part otherwise
1489
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1490
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1491
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1492
+ template<typename T_>
1493
+ static bool strictly_less(representation_dec const& x, representation_dec_type<T_> const& y);
1494
+
1495
+
1496
+ /// \brief Checks if \p x is strictly left of \p y.
1497
+ ///
1498
+ /// \param x Interval representation
1499
+ /// \param y Interval representation
1500
+ ///
1501
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1502
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::strictly_precedes(representation const& x, representation_type<T_> const& y) strictly_precedes\endlink</c> otherwise.
1503
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1504
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1505
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1506
+ static bool strictly_precedes(representation const& x, representation const& y);
1507
+
1508
+ /// \brief Decorated version. Checks if \p x is strictly left of \p y.
1509
+ ///
1510
+ /// \param x Interval representation
1511
+ /// \param y Interval representation
1512
+ ///
1513
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1514
+ /// \li <c>false</c> if \p x or \p y is NaI
1515
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::strictly_precedes(representation const& x, representation_type<T_> const& y) strictly_precedes\endlink</c>
1516
+ /// called with the bare interval part otherwise
1517
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1518
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1519
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1520
+ static bool strictly_precedes(representation_dec const& x, representation_dec const& y);
1521
+
1522
+ /// \brief Mixed-type version. Checks if \p x is strictly left of \p y.
1523
+ ///
1524
+ /// \param x Interval representation
1525
+ /// \param y Interval representation
1526
+ ///
1527
+ /// \tparam T_ Bound type of the interval representation of \p y
1528
+ ///
1529
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1530
+ /// \li <c>true</c> if \p x or \p y is empty or if
1531
+ /// \f$\overline{x} < \underline{y}\f$
1532
+ /// \li <c>false</c> otherwise.
1533
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1534
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1535
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1536
+ template<typename T_>
1537
+ static bool strictly_precedes(representation const& x, representation_type<T_> const& y);
1538
+
1539
+ /// \brief Decorated mixed-type version. Checks if \p x is strictly left of \p y.
1540
+ ///
1541
+ /// \param x Interval representation
1542
+ /// \param y Interval representation
1543
+ ///
1544
+ /// \tparam T_ Bound type of the interval representation of \p y
1545
+ ///
1546
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1547
+ /// \li <c>false</c> if \p x or \p y is NaI
1548
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::strictly_precedes(representation const& x, representation_type<T_> const& y) strictly_precedes\endlink</c>
1549
+ /// called with the bare interval part otherwise
1550
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1551
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1552
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1553
+ template<typename T_>
1554
+ static bool strictly_precedes(representation_dec const& x, representation_dec_type<T_> const& y);
1555
+
1556
+ /// \brief Checks if \p x and \p y are disjoint.
1557
+ ///
1558
+ /// \param x Interval representation
1559
+ /// \param y Interval representation
1560
+ ///
1561
+ /// \return \li <c>false</c> if \p x is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1562
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::disjoint(representation const& x, representation_type<T_> const& y) disjoint\endlink</c> otherwise.
1563
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1564
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1565
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1566
+ static bool disjoint(representation const& x, representation const& y);
1567
+
1568
+ /// \brief Decorated version. Checks if \p x and \p y are disjoint.
1569
+ ///
1570
+ /// \param x Interval representation
1571
+ /// \param y Interval representation
1572
+ ///
1573
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1574
+ /// \li <c>false</c> if \p x or \p y is NaI
1575
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::disjoint(representation const& x, representation_type<T_> const& y) disjoint\endlink</c>
1576
+ /// called with the bare interval part otherwise
1577
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1578
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1579
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1580
+ static bool disjoint(representation_dec const& x, representation_dec const& y);
1581
+
1582
+ /// \brief Mixed-type version. Checks if \p x and \p y are disjoint.
1583
+ ///
1584
+ /// \param x Interval representation
1585
+ /// \param y Interval representation
1586
+ ///
1587
+ /// \tparam T_ Bound type of the interval representation of \p y
1588
+ ///
1589
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1590
+ /// \li <c>true</c> if \p x or \p y is empty or if
1591
+ /// \f$\overline{x} < \underline{y} \vee \overline{y} < \underline{x}\f$
1592
+ /// \li <c>false</c> otherwise.
1593
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1594
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1595
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1596
+ template<typename T_>
1597
+ static bool disjoint(representation const& x, representation_type<T_> const& y);
1598
+
1599
+ /// \brief Decorated mixed-type version. Checks if \p x and \p y are disjoint.
1600
+ ///
1601
+ /// \param x Interval representation
1602
+ /// \param y Interval representation
1603
+ ///
1604
+ /// \tparam T_ Bound type of the interval representation of \p y
1605
+ ///
1606
+ /// \return \li <c>false</c> if \p x or \p y is an invalid representation (and if no \link p1788::exception::invalid_operand_exception p1788::exception::invalid_operand_exception \endlink is thrown)
1607
+ /// \li <c>false</c> if \p x or \p y is NaI
1608
+ /// \li Result of bare mixed-type <c>\link mpfr_bin_ieee754_flavor::disjoint(representation const& x, representation_type<T_> const& y) disjoint\endlink</c>
1609
+ /// called with the bare interval part otherwise
1610
+ /// \exception p1788::exception::invalid_operand_exception Throws exception if the <c>invalid_operand_bit</c> is set for the <c>p1788::exception::throw_exception_cwd</c> using
1611
+ /// \link p1788::exception::set_p1788::exception::throw_exception_cwd(exception_bits)\endlink.
1612
+ /// \note In case of an invalid representation of \p x or \p y the exception state for an invalid operation is set, see \link p1788::exception::invalid_operand() \endlink.
1613
+ template<typename T_>
1614
+ static bool disjoint(representation_dec const& x, representation_dec_type<T_> const& y);
1615
+
1616
+
1617
+ ///@}
1618
+
1619
+ // -----------------------------------------------------------------------------
1620
+ // Forward-mode elementary functions
1621
+ // -----------------------------------------------------------------------------
1622
+
1623
+ ///@name Forward-mode elementary functions
1624
+ ///
1625
+ ///
1626
+ ///@{
1627
+
1628
+
1629
+ /// \todo TODO
1630
+ ///
1631
+ ///
1632
+ static representation pos(representation const& x);
1633
+
1634
+ /// \todo TODO
1635
+ ///
1636
+ ///
1637
+ template<typename T_>
1638
+ static representation pos(representation_type<T_> const& x);
1639
+
1640
+ /// \todo TODO
1641
+ ///
1642
+ ///
1643
+ static representation_dec pos(representation_dec const& x);
1644
+
1645
+ /// \todo TODO
1646
+ ///
1647
+ ///
1648
+ template<typename T_>
1649
+ static representation_dec pos(representation_dec_type<T_> const& x);
1650
+
1651
+
1652
+ /// \todo TODO
1653
+ ///
1654
+ ///
1655
+ static representation neg(representation const& x);
1656
+
1657
+ /// \todo TODO
1658
+ ///
1659
+ ///
1660
+ template<typename T_>
1661
+ static representation neg(representation_type<T_> const& x);
1662
+
1663
+ /// \todo TODO
1664
+ ///
1665
+ ///
1666
+ static representation_dec neg(representation_dec const& x);
1667
+
1668
+ /// \todo TODO
1669
+ ///
1670
+ ///
1671
+ template<typename T_>
1672
+ static representation_dec neg(representation_dec_type<T_> const& x);
1673
+
1674
+
1675
+ /// \todo TODO
1676
+ ///
1677
+ ///
1678
+ static representation add(representation const& x, representation const& y);
1679
+
1680
+ /// \todo TODO
1681
+ ///
1682
+ ///
1683
+ template<typename T1, typename T2>
1684
+ static representation add(representation_type<T1> const& x, representation_type<T2> const& y);
1685
+
1686
+ /// \todo TODO
1687
+ ///
1688
+ ///
1689
+ static representation_dec add(representation_dec const& x, representation_dec const& y);
1690
+
1691
+ /// \todo TODO
1692
+ ///
1693
+ ///
1694
+ template<typename T1, typename T2>
1695
+ static representation_dec add(representation_dec_type<T1> const& x, representation_dec_type<T2> const& y);
1696
+
1697
+
1698
+ /// \todo TODO
1699
+ ///
1700
+ ///
1701
+ static representation sub(representation const& x, representation const& y);
1702
+
1703
+ /// \todo TODO
1704
+ ///
1705
+ ///
1706
+ template<typename T1, typename T2>
1707
+ static representation sub(representation_type<T1> const& x, representation_type<T2> const& y);
1708
+
1709
+ /// \todo TODO
1710
+ ///
1711
+ ///
1712
+ static representation_dec sub(representation_dec const& x, representation_dec const& y);
1713
+
1714
+ /// \todo TODO
1715
+ ///
1716
+ ///
1717
+ template<typename T1, typename T2>
1718
+ static representation_dec sub(representation_dec_type<T1> const& x, representation_dec_type<T2> const& y);
1719
+
1720
+
1721
+ /// \todo TODO
1722
+ ///
1723
+ ///
1724
+ static representation mul(representation const& x, representation const& y);
1725
+
1726
+ /// \todo TODO
1727
+ ///
1728
+ ///
1729
+ template<typename T1, typename T2>
1730
+ static representation mul(representation_type<T1> const& x, representation_type<T2> const& y);
1731
+
1732
+ /// \todo TODO
1733
+ ///
1734
+ ///
1735
+ static representation_dec mul(representation_dec const& x, representation_dec const& y);
1736
+
1737
+ /// \todo TODO
1738
+ ///
1739
+ ///
1740
+ template<typename T1, typename T2>
1741
+ static representation_dec mul(representation_dec_type<T1> const& x, representation_dec_type<T2> const& y);
1742
+
1743
+
1744
+ /// \todo TODO
1745
+ ///
1746
+ ///
1747
+ static representation div(representation const& x, representation const& y);
1748
+
1749
+ /// \todo TODO
1750
+ ///
1751
+ ///
1752
+ template<typename T1, typename T2>
1753
+ static representation div(representation_type<T1> const& x, representation_type<T2> const& y);
1754
+
1755
+ /// \todo TODO
1756
+ ///
1757
+ ///
1758
+ static representation_dec div(representation_dec const& x, representation_dec const& y);
1759
+
1760
+ /// \todo TODO
1761
+ ///
1762
+ ///
1763
+ template<typename T1, typename T2>
1764
+ static representation_dec div(representation_dec_type<T1> const& x, representation_dec_type<T2> const& y);
1765
+
1766
+
1767
+ /// \todo TODO
1768
+ ///
1769
+ ///
1770
+ static representation recip(representation const& x);
1771
+
1772
+ /// \todo TODO
1773
+ ///
1774
+ ///
1775
+ template<typename T_>
1776
+ static representation recip(representation_type<T_> const& x);
1777
+
1778
+ /// \todo TODO
1779
+ ///
1780
+ ///
1781
+ static representation_dec recip(representation_dec const& x);
1782
+
1783
+ /// \todo TODO
1784
+ ///
1785
+ ///
1786
+ template<typename T_>
1787
+ static representation_dec recip(representation_dec_type<T_> const& x);
1788
+
1789
+ /// \todo TODO
1790
+ ///
1791
+ ///
1792
+ static representation sqrt(representation const& x);
1793
+
1794
+ /// \todo TODO
1795
+ ///
1796
+ ///
1797
+ template<typename T_>
1798
+ static representation sqrt(representation_type<T_> const& x);
1799
+
1800
+ /// \todo TODO
1801
+ ///
1802
+ ///
1803
+ static representation_dec sqrt(representation_dec const& x);
1804
+
1805
+ /// \todo TODO
1806
+ ///
1807
+ ///
1808
+ template<typename T_>
1809
+ static representation_dec sqrt(representation_dec_type<T_> const& x);
1810
+
1811
+ /// \todo TODO
1812
+ ///
1813
+ ///
1814
+ static representation fma(representation const& x, representation const& y,
1815
+ representation const& z );
1816
+
1817
+ /// \todo TODO
1818
+ ///
1819
+ ///
1820
+ template<typename T1, typename T2, typename T3>
1821
+ static representation fma(representation_type<T1> const& x, representation_type<T2> const& y,
1822
+ representation_type<T3> const& z );
1823
+
1824
+ /// \todo TODO
1825
+ ///
1826
+ ///
1827
+ static representation_dec fma(representation_dec const& x, representation_dec const& y,
1828
+ representation_dec const& z );
1829
+
1830
+ /// \todo TODO
1831
+ ///
1832
+ ///
1833
+ template<typename T1, typename T2, typename T3>
1834
+ static representation_dec fma(representation_dec_type<T1> const& x, representation_dec_type<T2> const& y,
1835
+ representation_dec_type<T3> const& z );
1836
+
1837
+ /// \todo TODO
1838
+ ///
1839
+ ///
1840
+ static representation sqr(representation const& x);
1841
+
1842
+ /// \todo TODO
1843
+ ///
1844
+ ///
1845
+ template<typename T_>
1846
+ static representation sqr(representation_type<T_> const& x);
1847
+
1848
+ /// \todo TODO
1849
+ ///
1850
+ ///
1851
+ static representation_dec sqr(representation_dec const& x);
1852
+
1853
+ /// \todo TODO
1854
+ ///
1855
+ ///
1856
+ template<typename T_>
1857
+ static representation_dec sqr(representation_dec_type<T_> const& x);
1858
+
1859
+ /// \todo TODO
1860
+ ///
1861
+ ///
1862
+ static representation pown(representation const& x, int p);
1863
+
1864
+ /// \todo TODO
1865
+ ///
1866
+ ///
1867
+ template<typename T_>
1868
+ static representation pown(representation_type<T_> const& x, int p);
1869
+
1870
+ /// \todo TODO
1871
+ ///
1872
+ ///
1873
+ static representation_dec pown(representation_dec const& x, int p);
1874
+
1875
+ /// \todo TODO
1876
+ ///
1877
+ ///
1878
+ template<typename T_>
1879
+ static representation_dec pown(representation_dec_type<T_> const& x, int p);
1880
+
1881
+ /// \todo TODO
1882
+ ///
1883
+ ///
1884
+ static representation pow(representation const& x, representation const& y);
1885
+
1886
+ /// \todo TODO
1887
+ ///
1888
+ ///
1889
+ template<typename T1, typename T2>
1890
+ static representation pow(representation_type<T1> const& x, representation_type<T2> const& y);
1891
+
1892
+ /// \todo TODO
1893
+ ///
1894
+ ///
1895
+ static representation_dec pow(representation_dec const& x, representation_dec const& y);
1896
+
1897
+ /// \todo TODO
1898
+ ///
1899
+ ///
1900
+ template<typename T1, typename T2>
1901
+ static representation_dec pow(representation_dec_type<T1> const& x, representation_dec_type<T2> const& y);
1902
+
1903
+ /// \todo TODO
1904
+ ///
1905
+ ///
1906
+ static representation exp(representation const& x);
1907
+
1908
+ /// \todo TODO
1909
+ ///
1910
+ ///
1911
+ template<typename T_>
1912
+ static representation exp(representation_type<T_> const& x);
1913
+
1914
+ /// \todo TODO
1915
+ ///
1916
+ ///
1917
+ static representation_dec exp(representation_dec const& x);
1918
+
1919
+ /// \todo TODO
1920
+ ///
1921
+ ///
1922
+ template<typename T_>
1923
+ static representation_dec exp(representation_dec_type<T_> const& x);
1924
+
1925
+ /// \todo TODO
1926
+ ///
1927
+ ///
1928
+ static representation exp2(representation const& x);
1929
+
1930
+ /// \todo TODO
1931
+ ///
1932
+ ///
1933
+ template<typename T_>
1934
+ static representation exp2(representation_type<T_> const& x);
1935
+
1936
+ /// \todo TODO
1937
+ ///
1938
+ ///
1939
+ static representation_dec exp2(representation_dec const& x);
1940
+
1941
+ /// \todo TODO
1942
+ ///
1943
+ ///
1944
+ template<typename T_>
1945
+ static representation_dec exp2(representation_dec_type<T_> const& x);
1946
+
1947
+ /// \todo TODO
1948
+ ///
1949
+ ///
1950
+ static representation exp10(representation const& x);
1951
+
1952
+ /// \todo TODO
1953
+ ///
1954
+ ///
1955
+ template<typename T_>
1956
+ static representation exp10(representation_type<T_> const& x);
1957
+
1958
+ /// \todo TODO
1959
+ ///
1960
+ ///
1961
+ static representation_dec exp10(representation_dec const& x);
1962
+
1963
+ /// \todo TODO
1964
+ ///
1965
+ ///
1966
+ template<typename T_>
1967
+ static representation_dec exp10(representation_dec_type<T_> const& x);
1968
+
1969
+ /// \todo TODO
1970
+ ///
1971
+ ///
1972
+ static representation log(representation const& x);
1973
+
1974
+ /// \todo TODO
1975
+ ///
1976
+ ///
1977
+ template<typename T_>
1978
+ static representation log(representation_type<T_> const& x);
1979
+
1980
+ /// \todo TODO
1981
+ ///
1982
+ ///
1983
+ static representation_dec log(representation_dec const& x);
1984
+
1985
+ /// \todo TODO
1986
+ ///
1987
+ ///
1988
+ template<typename T_>
1989
+ static representation_dec log(representation_dec_type<T_> const& x);
1990
+
1991
+ /// \todo TODO
1992
+ ///
1993
+ ///
1994
+ static representation log2(representation const& x);
1995
+
1996
+ /// \todo TODO
1997
+ ///
1998
+ ///
1999
+ template<typename T_>
2000
+ static representation log2(representation_type<T_> const& x);
2001
+
2002
+ /// \todo TODO
2003
+ ///
2004
+ ///
2005
+ static representation_dec log2(representation_dec const& x);
2006
+
2007
+ /// \todo TODO
2008
+ ///
2009
+ ///
2010
+ template<typename T_>
2011
+ static representation_dec log2(representation_dec_type<T_> const& x);
2012
+
2013
+ /// \todo TODO
2014
+ ///
2015
+ ///
2016
+ static representation log10(representation const& x);
2017
+
2018
+ /// \todo TODO
2019
+ ///
2020
+ ///
2021
+ template<typename T_>
2022
+ static representation log10(representation_type<T_> const& x);
2023
+
2024
+ /// \todo TODO
2025
+ ///
2026
+ ///
2027
+ static representation_dec log10(representation_dec const& x);
2028
+
2029
+ /// \todo TODO
2030
+ ///
2031
+ ///
2032
+ template<typename T_>
2033
+ static representation_dec log10(representation_dec_type<T_> const& x);
2034
+
2035
+ /// \todo TODO
2036
+ ///
2037
+ ///
2038
+ static representation sin(representation const& x);
2039
+
2040
+ /// \todo TODO
2041
+ ///
2042
+ ///
2043
+ template<typename T_>
2044
+ static representation sin(representation_type<T_> const& x);
2045
+
2046
+ /// \todo TODO
2047
+ ///
2048
+ ///
2049
+ static representation_dec sin(representation_dec const& x);
2050
+
2051
+ /// \todo TODO
2052
+ ///
2053
+ ///
2054
+ template<typename T_>
2055
+ static representation_dec sin(representation_dec_type<T_> const& x);
2056
+
2057
+ /// \todo TODO
2058
+ ///
2059
+ ///
2060
+ static representation cos(representation const& x);
2061
+
2062
+ /// \todo TODO
2063
+ ///
2064
+ ///
2065
+ template<typename T_>
2066
+ static representation cos(representation_type<T_> const& x);
2067
+
2068
+ /// \todo TODO
2069
+ ///
2070
+ ///
2071
+ static representation_dec cos(representation_dec const& x);
2072
+
2073
+ /// \todo TODO
2074
+ ///
2075
+ ///
2076
+ template<typename T_>
2077
+ static representation_dec cos(representation_dec_type<T_> const& x);
2078
+
2079
+ /// \todo TODO
2080
+ ///
2081
+ ///
2082
+ static representation tan(representation const& x);
2083
+
2084
+ /// \todo TODO
2085
+ ///
2086
+ ///
2087
+ template<typename T_>
2088
+ static representation tan(representation_type<T_> const& x);
2089
+
2090
+ /// \todo TODO
2091
+ ///
2092
+ ///
2093
+ static representation_dec tan(representation_dec const& x);
2094
+
2095
+ /// \todo TODO
2096
+ ///
2097
+ ///
2098
+ template<typename T_>
2099
+ static representation_dec tan(representation_dec_type<T_> const& x);
2100
+
2101
+ /// \todo TODO
2102
+ ///
2103
+ ///
2104
+ static representation asin(representation const& x);
2105
+
2106
+ /// \todo TODO
2107
+ ///
2108
+ ///
2109
+ template<typename T_>
2110
+ static representation asin(representation_type<T_> const& x);
2111
+
2112
+ /// \todo TODO
2113
+ ///
2114
+ ///
2115
+ static representation_dec asin(representation_dec const& x);
2116
+
2117
+ /// \todo TODO
2118
+ ///
2119
+ ///
2120
+ template<typename T_>
2121
+ static representation_dec asin(representation_dec_type<T_> const& x);
2122
+
2123
+ /// \todo TODO
2124
+ ///
2125
+ ///
2126
+ static representation acos(representation const& x);
2127
+
2128
+ /// \todo TODO
2129
+ ///
2130
+ ///
2131
+ template<typename T_>
2132
+ static representation acos(representation_type<T_> const& x);
2133
+
2134
+ /// \todo TODO
2135
+ ///
2136
+ ///
2137
+ static representation_dec acos(representation_dec const& x);
2138
+
2139
+ /// \todo TODO
2140
+ ///
2141
+ ///
2142
+ template<typename T_>
2143
+ static representation_dec acos(representation_dec_type<T_> const& x);
2144
+
2145
+ /// \todo TODO
2146
+ ///
2147
+ ///
2148
+ static representation atan(representation const& x);
2149
+
2150
+ /// \todo TODO
2151
+ ///
2152
+ ///
2153
+ template<typename T_>
2154
+ static representation atan(representation_type<T_> const& x);
2155
+
2156
+ /// \todo TODO
2157
+ ///
2158
+ ///
2159
+ static representation_dec atan(representation_dec const& x);
2160
+
2161
+ /// \todo TODO
2162
+ ///
2163
+ ///
2164
+ template<typename T_>
2165
+ static representation_dec atan(representation_dec_type<T_> const& x);
2166
+
2167
+ /// \todo TODO
2168
+ ///
2169
+ ///
2170
+ static representation atan2(representation const& y,
2171
+ representation const& x);
2172
+
2173
+ /// \todo TODO
2174
+ ///
2175
+ ///
2176
+ template<typename T1, typename T2>
2177
+ static representation atan2(representation_type<T1> const& y,
2178
+ representation_type<T2> const& x);
2179
+
2180
+ /// \todo TODO
2181
+ ///
2182
+ ///
2183
+ static representation_dec atan2(representation_dec const& y,
2184
+ representation_dec const& x);
2185
+
2186
+ /// \todo TODO
2187
+ ///
2188
+ ///
2189
+ template<typename T1, typename T2>
2190
+ static representation_dec atan2(representation_dec_type<T1> const& y,
2191
+ representation_dec_type<T2> const& x);
2192
+
2193
+ /// \todo TODO
2194
+ ///
2195
+ ///
2196
+ static representation sinh(representation const& x);
2197
+
2198
+ /// \todo TODO
2199
+ ///
2200
+ ///
2201
+ template<typename T_>
2202
+ static representation sinh(representation_type<T_> const& x);
2203
+
2204
+ /// \todo TODO
2205
+ ///
2206
+ ///
2207
+ static representation_dec sinh(representation_dec const& x);
2208
+
2209
+ /// \todo TODO
2210
+ ///
2211
+ ///
2212
+ template<typename T_>
2213
+ static representation_dec sinh(representation_dec_type<T_> const& x);
2214
+
2215
+ /// \todo TODO
2216
+ ///
2217
+ ///
2218
+ static representation cosh(representation const& x);
2219
+
2220
+ /// \todo TODO
2221
+ ///
2222
+ ///
2223
+ template<typename T_>
2224
+ static representation cosh(representation_type<T_> const& x);
2225
+
2226
+ /// \todo TODO
2227
+ ///
2228
+ ///
2229
+ static representation_dec cosh(representation_dec const& x);
2230
+
2231
+ /// \todo TODO
2232
+ ///
2233
+ ///
2234
+ template<typename T_>
2235
+ static representation_dec cosh(representation_dec_type<T_> const& x);
2236
+
2237
+ /// \todo TODO
2238
+ ///
2239
+ ///
2240
+ static representation tanh(representation const& x);
2241
+
2242
+ /// \todo TODO
2243
+ ///
2244
+ ///
2245
+ template<typename T_>
2246
+ static representation tanh(representation_type<T_> const& x);
2247
+
2248
+ /// \todo TODO
2249
+ ///
2250
+ ///
2251
+ static representation_dec tanh(representation_dec const& x);
2252
+
2253
+ /// \todo TODO
2254
+ ///
2255
+ ///
2256
+ template<typename T_>
2257
+ static representation_dec tanh(representation_dec_type<T_> const& x);
2258
+
2259
+ /// \todo TODO
2260
+ ///
2261
+ ///
2262
+ static representation asinh(representation const& x);
2263
+
2264
+ /// \todo TODO
2265
+ ///
2266
+ ///
2267
+ template<typename T_>
2268
+ static representation asinh(representation_type<T_> const& x);
2269
+
2270
+ /// \todo TODO
2271
+ ///
2272
+ ///
2273
+ static representation_dec asinh(representation_dec const& x);
2274
+
2275
+ /// \todo TODO
2276
+ ///
2277
+ ///
2278
+ template<typename T_>
2279
+ static representation_dec asinh(representation_dec_type<T_> const& x);
2280
+
2281
+ /// \todo TODO
2282
+ ///
2283
+ ///
2284
+ static representation acosh(representation const& x);
2285
+
2286
+ /// \todo TODO
2287
+ ///
2288
+ ///
2289
+ template<typename T_>
2290
+ static representation acosh(representation_type<T_> const& x);
2291
+
2292
+ /// \todo TODO
2293
+ ///
2294
+ ///
2295
+ static representation_dec acosh(representation_dec const& x);
2296
+
2297
+ /// \todo TODO
2298
+ ///
2299
+ ///
2300
+ template<typename T_>
2301
+ static representation_dec acosh(representation_dec_type<T_> const& x);
2302
+
2303
+ /// \todo TODO
2304
+ ///
2305
+ ///
2306
+ static representation atanh(representation const& x);
2307
+
2308
+ /// \todo TODO
2309
+ ///
2310
+ ///
2311
+ template<typename T_>
2312
+ static representation atanh(representation_type<T_> const& x);
2313
+
2314
+ /// \todo TODO
2315
+ ///
2316
+ ///
2317
+ static representation_dec atanh(representation_dec const& x);
2318
+
2319
+ /// \todo TODO
2320
+ ///
2321
+ ///
2322
+ template<typename T_>
2323
+ static representation_dec atanh(representation_dec_type<T_> const& x);
2324
+
2325
+ /// \todo TODO
2326
+ ///
2327
+ ///
2328
+ static representation sign(representation const& x);
2329
+
2330
+ /// \todo TODO
2331
+ ///
2332
+ ///
2333
+ template<typename T_>
2334
+ static representation sign(representation_type<T_> const& x);
2335
+
2336
+ /// \todo TODO
2337
+ ///
2338
+ ///
2339
+ static representation_dec sign(representation_dec const& x);
2340
+
2341
+ /// \todo TODO
2342
+ ///
2343
+ ///
2344
+ template<typename T_>
2345
+ static representation_dec sign(representation_dec_type<T_> const& x);
2346
+
2347
+ /// \todo TODO
2348
+ ///
2349
+ ///
2350
+ static representation ceil(representation const& x);
2351
+
2352
+ /// \todo TODO
2353
+ ///
2354
+ ///
2355
+ template<typename T_>
2356
+ static representation ceil(representation_type<T_> const& x);
2357
+
2358
+ /// \todo TODO
2359
+ ///
2360
+ ///
2361
+ static representation_dec ceil(representation_dec const& x);
2362
+
2363
+ /// \todo TODO
2364
+ ///
2365
+ ///
2366
+ template<typename T_>
2367
+ static representation_dec ceil(representation_dec_type<T_> const& x);
2368
+
2369
+ /// \todo TODO
2370
+ ///
2371
+ ///
2372
+ static representation floor(representation const& x);
2373
+
2374
+ /// \todo TODO
2375
+ ///
2376
+ ///
2377
+ template<typename T_>
2378
+ static representation floor(representation_type<T_> const& x);
2379
+
2380
+ /// \todo TODO
2381
+ ///
2382
+ ///
2383
+ static representation_dec floor(representation_dec const& x);
2384
+
2385
+ /// \todo TODO
2386
+ ///
2387
+ ///
2388
+ template<typename T_>
2389
+ static representation_dec floor(representation_dec_type<T_> const& x);
2390
+
2391
+ /// \todo TODO
2392
+ ///
2393
+ ///
2394
+ static representation trunc(representation const& x);
2395
+
2396
+ /// \todo TODO
2397
+ ///
2398
+ ///
2399
+ template<typename T_>
2400
+ static representation trunc(representation_type<T_> const& x);
2401
+
2402
+ /// \todo TODO
2403
+ ///
2404
+ ///
2405
+ static representation_dec trunc(representation_dec const& x);
2406
+
2407
+ /// \todo TODO
2408
+ ///
2409
+ ///
2410
+ template<typename T_>
2411
+ static representation_dec trunc(representation_dec_type<T_> const& x);
2412
+
2413
+ /// \todo TODO
2414
+ ///
2415
+ ///
2416
+ static representation round_ties_to_even(representation const& x);
2417
+
2418
+ /// \todo TODO
2419
+ ///
2420
+ ///
2421
+ template<typename T_>
2422
+ static representation round_ties_to_even(representation_type<T_> const& x);
2423
+
2424
+ /// \todo TODO
2425
+ ///
2426
+ ///
2427
+ static representation_dec round_ties_to_even(representation_dec const& x);
2428
+
2429
+ /// \todo TODO
2430
+ ///
2431
+ ///
2432
+ template<typename T_>
2433
+ static representation_dec round_ties_to_even(representation_dec_type<T_> const& x);
2434
+
2435
+ /// \todo TODO
2436
+ ///
2437
+ ///
2438
+ static representation round_ties_to_away(representation const& x);
2439
+
2440
+ /// \todo TODO
2441
+ ///
2442
+ ///
2443
+ template<typename T_>
2444
+ static representation round_ties_to_away(representation_type<T_> const& x);
2445
+
2446
+ /// \todo TODO
2447
+ ///
2448
+ ///
2449
+ static representation_dec round_ties_to_away(representation_dec const& x);
2450
+
2451
+ /// \todo TODO
2452
+ ///
2453
+ ///
2454
+ template<typename T_>
2455
+ static representation_dec round_ties_to_away(representation_dec_type<T_> const& x);
2456
+
2457
+ /// \todo TODO
2458
+ ///
2459
+ ///
2460
+ static representation abs(representation const& x);
2461
+
2462
+ /// \todo TODO
2463
+ ///
2464
+ ///
2465
+ template<typename T_>
2466
+ static representation abs(representation_type<T_> const& x);
2467
+
2468
+ /// \todo TODO
2469
+ ///
2470
+ ///
2471
+ static representation_dec abs(representation_dec const& x);
2472
+
2473
+ /// \todo TODO
2474
+ ///
2475
+ ///
2476
+ template<typename T_>
2477
+ static representation_dec abs(representation_dec_type<T_> const& x);
2478
+
2479
+ /// \todo TODO
2480
+ ///
2481
+ ///
2482
+ static representation min(representation const& x,
2483
+ representation const& y);
2484
+
2485
+ /// \todo TODO
2486
+ ///
2487
+ ///
2488
+ template<typename T1, typename T2>
2489
+ static representation min(representation_type<T1> const& x,
2490
+ representation_type<T2> const& y);
2491
+
2492
+ /// \todo TODO
2493
+ ///
2494
+ ///
2495
+ static representation_dec min(representation_dec const& x,
2496
+ representation_dec const& y);
2497
+
2498
+ /// \todo TODO
2499
+ ///
2500
+ ///
2501
+ template<typename T1, typename T2>
2502
+ static representation_dec min(representation_dec_type<T1> const& x,
2503
+ representation_dec_type<T2> const& y);
2504
+
2505
+ /// \todo TODO
2506
+ ///
2507
+ ///
2508
+ static representation max(representation const& x,
2509
+ representation const& y);
2510
+
2511
+ /// \todo TODO
2512
+ ///
2513
+ ///
2514
+ template<typename T1, typename T2>
2515
+ static representation max(representation_type<T1> const& x,
2516
+ representation_type<T2> const& y);
2517
+
2518
+ /// \todo TODO
2519
+ ///
2520
+ ///
2521
+ static representation_dec max(representation_dec const& x,
2522
+ representation_dec const& y);
2523
+
2524
+ /// \todo TODO
2525
+ ///
2526
+ ///
2527
+ template<typename T1, typename T2>
2528
+ static representation_dec max(representation_dec_type<T1> const& x,
2529
+ representation_dec_type<T2> const& y);
2530
+
2531
+ ///@}
2532
+
2533
+ // -----------------------------------------------------------------------------
2534
+ // Cancellative addition and subtraction
2535
+ // -----------------------------------------------------------------------------
2536
+
2537
+ ///@name Cancellative addition and subtraction
2538
+ ///
2539
+ ///
2540
+ ///@{
2541
+
2542
+ /// \todo TODO
2543
+ ///
2544
+ ///
2545
+ static representation cancel_plus(representation const& a,
2546
+ representation const& b);
2547
+
2548
+ /// \todo TODO
2549
+ ///
2550
+ ///
2551
+ template<typename T1, typename T2>
2552
+ static representation cancel_plus(representation_type<T1> const& a,
2553
+ representation_type<T2> const& b);
2554
+
2555
+ /// \todo TODO
2556
+ ///
2557
+ ///
2558
+ static representation_dec cancel_plus(representation_dec const& a,
2559
+ representation_dec const& b);
2560
+
2561
+ /// \todo TODO
2562
+ ///
2563
+ ///
2564
+ template<typename T1, typename T2>
2565
+ static representation_dec cancel_plus(representation_dec_type<T1> const& a,
2566
+ representation_dec_type<T2> const& b);
2567
+
2568
+ /// \todo TODO
2569
+ ///
2570
+ ///
2571
+ static representation cancel_minus(representation const& a,
2572
+ representation const& b);
2573
+
2574
+ /// \todo TODO
2575
+ ///
2576
+ ///
2577
+ template<typename T1, typename T2>
2578
+ static representation cancel_minus(representation_type<T1> const& a,
2579
+ representation_type<T2> const& b);
2580
+
2581
+ /// \todo TODO
2582
+ ///
2583
+ ///
2584
+ static representation_dec cancel_minus(representation_dec const& a,
2585
+ representation_dec const& b);
2586
+
2587
+ /// \todo TODO
2588
+ ///
2589
+ ///
2590
+ template<typename T1, typename T2>
2591
+ static representation_dec cancel_minus(representation_dec_type<T1> const& a,
2592
+ representation_dec_type<T2> const& b);
2593
+
2594
+ ///@}
2595
+
2596
+
2597
+
2598
+
2599
+ // -----------------------------------------------------------------------------
2600
+ // Two-output division
2601
+ // -----------------------------------------------------------------------------
2602
+
2603
+ ///@name Two-output division
2604
+ ///
2605
+ ///
2606
+ ///@{
2607
+
2608
+ private:
2609
+
2610
+ static std::pair<representation,representation> mul_rev_to_pair(int& t_fl, int& t_fu, int& t_sl, int& t_su,
2611
+ representation const& b, representation const& c);
2612
+
2613
+ public:
2614
+
2615
+ /// \todo TODO
2616
+ ///
2617
+ ///
2618
+ static std::pair<representation,representation> mul_rev_to_pair(representation const& b,
2619
+ representation const& c);
2620
+
2621
+ /// \todo TODO
2622
+ ///
2623
+ ///
2624
+ template<typename T1, typename T2>
2625
+ static std::pair<representation,representation> mul_rev_to_pair(representation_type<T1> const& b,
2626
+ representation_type<T2> const& c);
2627
+
2628
+ /// \todo TODO
2629
+ ///
2630
+ ///
2631
+ static std::pair<representation_dec,representation_dec> mul_rev_to_pair(representation_dec const& b,
2632
+ representation_dec const& c);
2633
+
2634
+ /// \todo TODO
2635
+ ///
2636
+ ///
2637
+ template<typename T1, typename T2>
2638
+ static std::pair<representation_dec,representation_dec> mul_rev_to_pair(representation_dec_type<T1> const& b,
2639
+ representation_dec_type<T2> const& c);
2640
+
2641
+ ///@}
2642
+
2643
+ // -----------------------------------------------------------------------------
2644
+ // Reverse-mode elementary functions
2645
+ // -----------------------------------------------------------------------------
2646
+
2647
+ ///@name Reverse-mode elementary functions
2648
+ ///
2649
+ ///
2650
+ ///@{
2651
+
2652
+ /// \todo TODO
2653
+ ///
2654
+ ///
2655
+ static representation sqr_rev(representation const& c,
2656
+ representation const& x);
2657
+
2658
+ /// \todo TODO
2659
+ ///
2660
+ ///
2661
+ template<typename T1, typename T2>
2662
+ static representation sqr_rev(representation_type<T1> const& c,
2663
+ representation_type<T2> const& x);
2664
+
2665
+ /// \todo TODO
2666
+ ///
2667
+ ///
2668
+ static representation_dec sqr_rev(representation_dec const& c,
2669
+ representation_dec const& x);
2670
+
2671
+ /// \todo TODO
2672
+ ///
2673
+ ///
2674
+ template<typename T1, typename T2>
2675
+ static representation_dec sqr_rev(representation_dec_type<T1> const& c,
2676
+ representation_dec_type<T2> const& x);
2677
+
2678
+ /// \todo TODO
2679
+ ///
2680
+ ///
2681
+ static representation sqr_rev(representation const& c);
2682
+
2683
+ /// \todo TODO
2684
+ ///
2685
+ ///
2686
+ template<typename T_>
2687
+ static representation sqr_rev(representation_type<T_> const& c);
2688
+
2689
+ /// \todo TODO
2690
+ ///
2691
+ ///
2692
+ static representation_dec sqr_rev(representation_dec const& c);
2693
+
2694
+ /// \todo TODO
2695
+ ///
2696
+ ///
2697
+ template<typename T_>
2698
+ static representation_dec sqr_rev(representation_dec_type<T_> const& c);
2699
+
2700
+
2701
+
2702
+ /// \todo TODO
2703
+ ///
2704
+ ///
2705
+ static representation abs_rev(representation const& c,
2706
+ representation const& x);
2707
+
2708
+ /// \todo TODO
2709
+ ///
2710
+ ///
2711
+ template<typename T1, typename T2>
2712
+ static representation abs_rev(representation_type<T1> const& c,
2713
+ representation_type<T2> const& x);
2714
+
2715
+ /// \todo TODO
2716
+ ///
2717
+ ///
2718
+ static representation_dec abs_rev(representation_dec const& c,
2719
+ representation_dec const& x);
2720
+
2721
+ /// \todo TODO
2722
+ ///
2723
+ ///
2724
+ template<typename T1, typename T2>
2725
+ static representation_dec abs_rev(representation_dec_type<T1> const& c,
2726
+ representation_dec_type<T2> const& x);
2727
+
2728
+ /// \todo TODO
2729
+ ///
2730
+ ///
2731
+ static representation abs_rev(representation const& c);
2732
+
2733
+ /// \todo TODO
2734
+ ///
2735
+ ///
2736
+ template<typename T_>
2737
+ static representation abs_rev(representation_type<T_> const& c);
2738
+
2739
+ /// \todo TODO
2740
+ ///
2741
+ ///
2742
+ static representation_dec abs_rev(representation_dec const& c);
2743
+
2744
+ /// \todo TODO
2745
+ ///
2746
+ ///
2747
+ template<typename T_>
2748
+ static representation_dec abs_rev(representation_dec_type<T_> const& c);
2749
+
2750
+
2751
+ private:
2752
+ static int pown_rev_inf(mpfr_var const& c,
2753
+ mpfr_var& x,
2754
+ int p);
2755
+ static int pown_rev_sup(mpfr_var const& c,
2756
+ mpfr_var& x,
2757
+ int p);
2758
+
2759
+ public:
2760
+
2761
+ /// \todo TODO
2762
+ ///
2763
+ ///
2764
+ static representation pown_rev(representation const& c,
2765
+ representation const& x,
2766
+ int p);
2767
+
2768
+ /// \todo TODO
2769
+ ///
2770
+ ///
2771
+ template<typename T1, typename T2>
2772
+ static representation pown_rev(representation_type<T1> const& c,
2773
+ representation_type<T2> const& x,
2774
+ int p);
2775
+
2776
+ /// \todo TODO
2777
+ ///
2778
+ ///
2779
+ static representation_dec pown_rev(representation_dec const& c,
2780
+ representation_dec const& x,
2781
+ int p);
2782
+
2783
+ /// \todo TODO
2784
+ ///
2785
+ ///
2786
+ template<typename T1, typename T2>
2787
+ static representation_dec pown_rev(representation_dec_type<T1> const& c,
2788
+ representation_dec_type<T2> const& x,
2789
+ int p);
2790
+
2791
+ /// \todo TODO
2792
+ ///
2793
+ ///
2794
+ static representation pown_rev(representation const& c,
2795
+ int p);
2796
+
2797
+ /// \todo TODO
2798
+ ///
2799
+ ///
2800
+ template<typename T_>
2801
+ static representation pown_rev(representation_type<T_> const& c,
2802
+ int p);
2803
+
2804
+ /// \todo TODO
2805
+ ///
2806
+ ///
2807
+ static representation_dec pown_rev(representation_dec const& c,
2808
+ int p);
2809
+
2810
+ /// \todo TODO
2811
+ ///
2812
+ ///
2813
+ template<typename T_>
2814
+ static representation_dec pown_rev(representation_dec_type<T_> const& c,
2815
+ int p);
2816
+
2817
+
2818
+
2819
+
2820
+ /// \todo TODO
2821
+ ///
2822
+ ///
2823
+ static representation sin_rev(representation const& c,
2824
+ representation const& x);
2825
+
2826
+ /// \todo TODO
2827
+ ///
2828
+ ///
2829
+ template<typename T1, typename T2>
2830
+ static representation sin_rev(representation_type<T1> const& c,
2831
+ representation_type<T2> const& x);
2832
+
2833
+ /// \todo TODO
2834
+ ///
2835
+ ///
2836
+ static representation_dec sin_rev(representation_dec const& c,
2837
+ representation_dec const& x);
2838
+
2839
+ /// \todo TODO
2840
+ ///
2841
+ ///
2842
+ template<typename T1, typename T2>
2843
+ static representation_dec sin_rev(representation_dec_type<T1> const& c,
2844
+ representation_dec_type<T2> const& x);
2845
+
2846
+ /// \todo TODO
2847
+ ///
2848
+ ///
2849
+ static representation sin_rev(representation const& c);
2850
+
2851
+ /// \todo TODO
2852
+ ///
2853
+ ///
2854
+ template<typename T_>
2855
+ static representation sin_rev(representation_type<T_> const& c);
2856
+
2857
+ /// \todo TODO
2858
+ ///
2859
+ ///
2860
+ static representation_dec sin_rev(representation_dec const& c);
2861
+
2862
+ /// \todo TODO
2863
+ ///
2864
+ ///
2865
+ template<typename T_>
2866
+ static representation_dec sin_rev(representation_dec_type<T_> const& c);
2867
+
2868
+
2869
+
2870
+
2871
+
2872
+ /// \todo TODO
2873
+ ///
2874
+ ///
2875
+ static representation cos_rev(representation const& c,
2876
+ representation const& x);
2877
+
2878
+ /// \todo TODO
2879
+ ///
2880
+ ///
2881
+ template<typename T1, typename T2>
2882
+ static representation cos_rev(representation_type<T1> const& c,
2883
+ representation_type<T2> const& x);
2884
+
2885
+ /// \todo TODO
2886
+ ///
2887
+ ///
2888
+ static representation_dec cos_rev(representation_dec const& c,
2889
+ representation_dec const& x);
2890
+
2891
+ /// \todo TODO
2892
+ ///
2893
+ ///
2894
+ template<typename T1, typename T2>
2895
+ static representation_dec cos_rev(representation_dec_type<T1> const& c,
2896
+ representation_dec_type<T2> const& x);
2897
+
2898
+ /// \todo TODO
2899
+ ///
2900
+ ///
2901
+ static representation cos_rev(representation const& c);
2902
+
2903
+ /// \todo TODO
2904
+ ///
2905
+ ///
2906
+ template<typename T_>
2907
+ static representation cos_rev(representation_type<T_> const& c);
2908
+
2909
+ /// \todo TODO
2910
+ ///
2911
+ ///
2912
+ static representation_dec cos_rev(representation_dec const& c);
2913
+
2914
+ /// \todo TODO
2915
+ ///
2916
+ ///
2917
+ template<typename T_>
2918
+ static representation_dec cos_rev(representation_dec_type<T_> const& c);
2919
+
2920
+
2921
+
2922
+
2923
+ /// \todo TODO
2924
+ ///
2925
+ ///
2926
+ static representation tan_rev(representation const& c,
2927
+ representation const& x);
2928
+
2929
+ /// \todo TODO
2930
+ ///
2931
+ ///
2932
+ template<typename T1, typename T2>
2933
+ static representation tan_rev(representation_type<T1> const& c,
2934
+ representation_type<T2> const& x);
2935
+
2936
+ /// \todo TODO
2937
+ ///
2938
+ ///
2939
+ static representation_dec tan_rev(representation_dec const& c,
2940
+ representation_dec const& x);
2941
+
2942
+ /// \todo TODO
2943
+ ///
2944
+ ///
2945
+ template<typename T1, typename T2>
2946
+ static representation_dec tan_rev(representation_dec_type<T1> const& c,
2947
+ representation_dec_type<T2> const& x);
2948
+
2949
+ /// \todo TODO
2950
+ ///
2951
+ ///
2952
+ static representation tan_rev(representation const& c);
2953
+
2954
+ /// \todo TODO
2955
+ ///
2956
+ ///
2957
+ template<typename T_>
2958
+ static representation tan_rev(representation_type<T_> const& c);
2959
+
2960
+ /// \todo TODO
2961
+ ///
2962
+ ///
2963
+ static representation_dec tan_rev(representation_dec const& c);
2964
+
2965
+ /// \todo TODO
2966
+ ///
2967
+ ///
2968
+ template<typename T_>
2969
+ static representation_dec tan_rev(representation_dec_type<T_> const& c);
2970
+
2971
+
2972
+
2973
+
2974
+ /// \todo TODO
2975
+ ///
2976
+ ///
2977
+ static representation cosh_rev(representation const& c,
2978
+ representation const& x);
2979
+
2980
+ /// \todo TODO
2981
+ ///
2982
+ ///
2983
+ template<typename T1, typename T2>
2984
+ static representation cosh_rev(representation_type<T1> const& c,
2985
+ representation_type<T2> const& x);
2986
+
2987
+ /// \todo TODO
2988
+ ///
2989
+ ///
2990
+ static representation_dec cosh_rev(representation_dec const& c,
2991
+ representation_dec const& x);
2992
+
2993
+ /// \todo TODO
2994
+ ///
2995
+ ///
2996
+ template<typename T1, typename T2>
2997
+ static representation_dec cosh_rev(representation_dec_type<T1> const& c,
2998
+ representation_dec_type<T2> const& x);
2999
+
3000
+ /// \todo TODO
3001
+ ///
3002
+ ///
3003
+ static representation cosh_rev(representation const& c);
3004
+
3005
+ /// \todo TODO
3006
+ ///
3007
+ ///
3008
+ template<typename T_>
3009
+ static representation cosh_rev(representation_type<T_> const& c);
3010
+
3011
+ /// \todo TODO
3012
+ ///
3013
+ ///
3014
+ static representation_dec cosh_rev(representation_dec const& c);
3015
+
3016
+ /// \todo TODO
3017
+ ///
3018
+ ///
3019
+ template<typename T_>
3020
+ static representation_dec cosh_rev(representation_dec_type<T_> const& c);
3021
+
3022
+
3023
+
3024
+ /// \todo TODO
3025
+ ///
3026
+ ///
3027
+ static representation mul_rev(representation const& b,
3028
+ representation const& c,
3029
+ representation const& x);
3030
+
3031
+ /// \todo TODO
3032
+ ///
3033
+ ///
3034
+ template<typename T1, typename T2, typename T3>
3035
+ static representation mul_rev(representation_type<T1> const& b,
3036
+ representation_type<T2> const& c,
3037
+ representation_type<T3> const& x);
3038
+
3039
+ /// \todo TODO
3040
+ ///
3041
+ ///
3042
+ static representation_dec mul_rev(representation_dec const& b,
3043
+ representation_dec const& c,
3044
+ representation_dec const& x);
3045
+
3046
+ /// \todo TODO
3047
+ ///
3048
+ ///
3049
+ template<typename T1, typename T2, typename T3>
3050
+ static representation_dec mul_rev(representation_dec_type<T1> const& b,
3051
+ representation_dec_type<T2> const& c,
3052
+ representation_dec_type<T3> const& x);
3053
+
3054
+ /// \todo TODO
3055
+ ///
3056
+ ///
3057
+ static representation mul_rev(representation const& b,
3058
+ representation const& c);
3059
+
3060
+ /// \todo TODO
3061
+ ///
3062
+ ///
3063
+ template<typename T1, typename T2>
3064
+ static representation mul_rev(representation_type<T1> const& b,
3065
+ representation_type<T2> const& c);
3066
+
3067
+ /// \todo TODO
3068
+ ///
3069
+ ///
3070
+ static representation_dec mul_rev(representation_dec const& b,
3071
+ representation_dec const& c);
3072
+
3073
+ /// \todo TODO
3074
+ ///
3075
+ ///
3076
+ template<typename T1, typename T2>
3077
+ static representation_dec mul_rev(representation_dec_type<T1> const& b,
3078
+ representation_dec_type<T2> const& c);
3079
+
3080
+
3081
+
3082
+
3083
+ /// \todo TODO
3084
+ ///
3085
+ ///
3086
+ static representation pow_rev1(representation const& b,
3087
+ representation const& c,
3088
+ representation const& x);
3089
+
3090
+ /// \todo TODO
3091
+ ///
3092
+ ///
3093
+ template<typename T1, typename T2, typename T3>
3094
+ static representation pow_rev1(representation_type<T1> const& b,
3095
+ representation_type<T2> const& c,
3096
+ representation_type<T3> const& x);
3097
+
3098
+ /// \todo TODO
3099
+ ///
3100
+ ///
3101
+ static representation_dec pow_rev1(representation_dec const& b,
3102
+ representation_dec const& c,
3103
+ representation_dec const& x);
3104
+
3105
+ /// \todo TODO
3106
+ ///
3107
+ ///
3108
+ template<typename T1, typename T2, typename T3>
3109
+ static representation_dec pow_rev1(representation_dec_type<T1> const& b,
3110
+ representation_dec_type<T2> const& c,
3111
+ representation_dec_type<T3> const& x);
3112
+
3113
+ /// \todo TODO
3114
+ ///
3115
+ ///
3116
+ static representation pow_rev1(representation const& b,
3117
+ representation const& c);
3118
+
3119
+ /// \todo TODO
3120
+ ///
3121
+ ///
3122
+ template<typename T1, typename T2>
3123
+ static representation pow_rev1(representation_type<T1> const& b,
3124
+ representation_type<T2> const& c);
3125
+
3126
+ /// \todo TODO
3127
+ ///
3128
+ ///
3129
+ static representation_dec pow_rev1(representation_dec const& b,
3130
+ representation_dec const& c);
3131
+
3132
+ /// \todo TODO
3133
+ ///
3134
+ ///
3135
+ template<typename T1, typename T2>
3136
+ static representation_dec pow_rev1(representation_dec_type<T1> const& b,
3137
+ representation_dec_type<T2> const& c);
3138
+
3139
+
3140
+
3141
+
3142
+ /// \todo TODO
3143
+ ///
3144
+ ///
3145
+ static representation pow_rev2(representation const& a,
3146
+ representation const& c,
3147
+ representation const& x);
3148
+
3149
+ /// \todo TODO
3150
+ ///
3151
+ ///
3152
+ template<typename T1, typename T2, typename T3>
3153
+ static representation pow_rev2(representation_type<T1> const& a,
3154
+ representation_type<T2> const& c,
3155
+ representation_type<T3> const& x);
3156
+
3157
+ /// \todo TODO
3158
+ ///
3159
+ ///
3160
+ static representation_dec pow_rev2(representation_dec const& a,
3161
+ representation_dec const& c,
3162
+ representation_dec const& x);
3163
+
3164
+ /// \todo TODO
3165
+ ///
3166
+ ///
3167
+ template<typename T1, typename T2, typename T3>
3168
+ static representation_dec pow_rev2(representation_dec_type<T1> const& a,
3169
+ representation_dec_type<T2> const& c,
3170
+ representation_dec_type<T3> const& x);
3171
+
3172
+ /// \todo TODO
3173
+ ///
3174
+ ///
3175
+ static representation pow_rev2(representation const& a,
3176
+ representation const& c);
3177
+
3178
+ /// \todo TODO
3179
+ ///
3180
+ ///
3181
+ template<typename T1, typename T2>
3182
+ static representation pow_rev2(representation_type<T1> const& a,
3183
+ representation_type<T2> const& c);
3184
+
3185
+ /// \todo TODO
3186
+ ///
3187
+ ///
3188
+ static representation_dec pow_rev2(representation_dec const& a,
3189
+ representation_dec const& c);
3190
+
3191
+ /// \todo TODO
3192
+ ///
3193
+ ///
3194
+ template<typename T1, typename T2>
3195
+ static representation_dec pow_rev2(representation_dec_type<T1> const& a,
3196
+ representation_dec_type<T2> const& c);
3197
+
3198
+
3199
+
3200
+
3201
+ /// \todo TODO
3202
+ ///
3203
+ ///
3204
+ static representation atan2_rev1(representation const& b,
3205
+ representation const& c,
3206
+ representation const& x);
3207
+
3208
+ /// \todo TODO
3209
+ ///
3210
+ ///
3211
+ template<typename T1, typename T2, typename T3>
3212
+ static representation atan2_rev1(representation_type<T1> const& b,
3213
+ representation_type<T2> const& c,
3214
+ representation_type<T3> const& x);
3215
+
3216
+ /// \todo TODO
3217
+ ///
3218
+ ///
3219
+ static representation_dec atan2_rev1(representation_dec const& b,
3220
+ representation_dec const& c,
3221
+ representation_dec const& x);
3222
+
3223
+ /// \todo TODO
3224
+ ///
3225
+ ///
3226
+ template<typename T1, typename T2, typename T3>
3227
+ static representation_dec atan2_rev1(representation_dec_type<T1> const& b,
3228
+ representation_dec_type<T2> const& c,
3229
+ representation_dec_type<T3> const& x);
3230
+
3231
+ /// \todo TODO
3232
+ ///
3233
+ ///
3234
+ static representation atan2_rev1(representation const& b,
3235
+ representation const& c);
3236
+
3237
+ /// \todo TODO
3238
+ ///
3239
+ ///
3240
+ template<typename T1, typename T2>
3241
+ static representation atan2_rev1(representation_type<T1> const& b,
3242
+ representation_type<T2> const& c);
3243
+
3244
+ /// \todo TODO
3245
+ ///
3246
+ ///
3247
+ static representation_dec atan2_rev1(representation_dec const& b,
3248
+ representation_dec const& c);
3249
+
3250
+ /// \todo TODO
3251
+ ///
3252
+ ///
3253
+ template<typename T1, typename T2>
3254
+ static representation_dec atan2_rev1(representation_dec_type<T1> const& b,
3255
+ representation_dec_type<T2> const& c);
3256
+
3257
+
3258
+
3259
+
3260
+ /// \todo TODO
3261
+ ///
3262
+ ///
3263
+ static representation atan2_rev2(representation const& a,
3264
+ representation const& c,
3265
+ representation const& x);
3266
+
3267
+ /// \todo TODO
3268
+ ///
3269
+ ///
3270
+ template<typename T1, typename T2, typename T3>
3271
+ static representation atan2_rev2(representation_type<T1> const& a,
3272
+ representation_type<T2> const& c,
3273
+ representation_type<T3> const& x);
3274
+
3275
+ /// \todo TODO
3276
+ ///
3277
+ ///
3278
+ static representation_dec atan2_rev2(representation_dec const& a,
3279
+ representation_dec const& c,
3280
+ representation_dec const& x);
3281
+
3282
+ /// \todo TODO
3283
+ ///
3284
+ ///
3285
+ template<typename T1, typename T2, typename T3>
3286
+ static representation_dec atan2_rev2(representation_dec_type<T1> const& a,
3287
+ representation_dec_type<T2> const& c,
3288
+ representation_dec_type<T3> const& x);
3289
+
3290
+ /// \todo TODO
3291
+ ///
3292
+ ///
3293
+ static representation atan2_rev2(representation const& a,
3294
+ representation const& c);
3295
+
3296
+ /// \todo TODO
3297
+ ///
3298
+ ///
3299
+ template<typename T1, typename T2>
3300
+ static representation atan2_rev2(representation_type<T1> const& a,
3301
+ representation_type<T2> const& c);
3302
+
3303
+ /// \todo TODO
3304
+ ///
3305
+ ///
3306
+ static representation_dec atan2_rev2(representation_dec const& a,
3307
+ representation_dec const& c);
3308
+
3309
+ /// \todo TODO
3310
+ ///
3311
+ ///
3312
+ template<typename T1, typename T2>
3313
+ static representation_dec atan2_rev2(representation_dec_type<T1> const& a,
3314
+ representation_dec_type<T2> const& c);
3315
+
3316
+ ///@}
3317
+
3318
+
3319
+
3320
+
3321
+ // -----------------------------------------------------------------------------
3322
+ // Boolean functions of intervals (Recommended)
3323
+ // -----------------------------------------------------------------------------
3324
+
3325
+ ///@name Boolean functions of intervals (Recommended)
3326
+ ///
3327
+ ///
3328
+ ///@{
3329
+
3330
+ /// \todo TODO
3331
+ ///
3332
+ ///
3333
+ static bool is_common_interval(representation const& x);
3334
+
3335
+ /// \todo TODO
3336
+ ///
3337
+ ///
3338
+ static bool is_common_interval(representation_dec const& x);
3339
+
3340
+ /// \todo TODO
3341
+ ///
3342
+ ///
3343
+ static bool is_singleton(representation const& x);
3344
+
3345
+ /// \todo TODO
3346
+ ///
3347
+ ///
3348
+ static bool is_singleton(representation_dec const& x);
3349
+
3350
+ /// \todo TODO
3351
+ ///
3352
+ ///
3353
+ static bool is_member(T m, representation const& x);
3354
+
3355
+ /// \todo TODO
3356
+ ///
3357
+ ///
3358
+ static bool is_member(T m, representation_dec const& x);
3359
+
3360
+ /// \todo TODO
3361
+ ///
3362
+ ///
3363
+ template<typename T_>
3364
+ static bool is_member(T_ m, representation const& x);
3365
+
3366
+ /// \todo TODO
3367
+ ///
3368
+ ///
3369
+ template<typename T_>
3370
+ static bool is_member(T_ m, representation_dec const& x);
3371
+
3372
+ ///@}
3373
+
3374
+ // -----------------------------------------------------------------------------
3375
+ // Extended interval comparisons (Recommended)
3376
+ // -----------------------------------------------------------------------------
3377
+
3378
+ ///@name Extended interval comparisons (Recommended)
3379
+ ///
3380
+ ///
3381
+ ///@{
3382
+
3383
+
3384
+ /// \todo TODO
3385
+ ///
3386
+ ///
3387
+ static p1788::overlapping::overlapping_state overlap(representation const& x,
3388
+ representation const& y);
3389
+
3390
+ /// \todo TODO
3391
+ ///
3392
+ ///
3393
+ template<typename T_>
3394
+ static p1788::overlapping::overlapping_state overlap(representation const& x,
3395
+ representation_type<T_> const& y);
3396
+
3397
+
3398
+ /// \todo TODO
3399
+ ///
3400
+ ///
3401
+ static p1788::overlapping::overlapping_state overlap(representation_dec const& x,
3402
+ representation_dec const& y);
3403
+
3404
+ /// \todo TODO
3405
+ ///
3406
+ ///
3407
+ template<typename T_>
3408
+ static p1788::overlapping::overlapping_state overlap(representation_dec const& x,
3409
+ representation_dec_type<T_> const& y);
3410
+
3411
+
3412
+ ///@}
3413
+
3414
+
3415
+
3416
+ };
3417
+
3418
+
3419
+ } // namespace setbased
3420
+
3421
+ } // namespace infsup
3422
+
3423
+ } // namespace flavor
3424
+
3425
+ } // namespace p1788
3426
+
3427
+
3428
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_class_impl.hpp"
3429
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_io_impl.hpp"
3430
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_set_op_impl.hpp"
3431
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_num_func_impl.hpp"
3432
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_bool_func_impl.hpp"
3433
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_elem_func_impl.hpp"
3434
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_mul_rev_to_pair_func_impl.hpp"
3435
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_rev_func_impl.hpp"
3436
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_cancel_func_impl.hpp"
3437
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_rec_overlap_impl.hpp"
3438
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_rec_bool_func_impl.hpp"
3439
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_setup_func_impl.hpp"
3440
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_util_func_impl.hpp"
3441
+ #include "p1788/flavor/infsup/setbased/mpfr_bin_ieee754_flavor_validation_func_impl.hpp"
3442
+
3443
+ #endif // LIBIEEEP1788_P1788_FLAVOR_INFSUP_SETBASED_MPFR_BIN_IEEE754_FLAVOR_HPP