Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
arithmetic.cpp
Go to the documentation of this file.
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2/*
3 * Main authors:
4 * Christian Schulte <schulte@gecode.org>
5 * Vincent Barichard <Vincent.Barichard@univ-angers.fr>
6 *
7 * Copyright:
8 * Christian Schulte, 2005
9 * Vincent Barichard, 2012
10 *
11 * This file is part of Gecode, the generic constraint
12 * development environment:
13 * http://www.gecode.org
14 *
15 * Permission is hereby granted, free of charge, to any person obtaining
16 * a copy of this software and associated documentation files (the
17 * "Software"), to deal in the Software without restriction, including
18 * without limitation the rights to use, copy, modify, merge, publish,
19 * distribute, sublicense, and/or sell copies of the Software, and to
20 * permit persons to whom the Software is furnished to do so, subject to
21 * the following conditions:
22 *
23 * The above copyright notice and this permission notice shall be
24 * included in all copies or substantial portions of the Software.
25 *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 *
34 */
35
36#include "test/float.hh"
37
38#include <gecode/minimodel.hh>
39
40#include <cmath>
41#include <algorithm>
42
43namespace Test { namespace Float {
44
46 namespace Arithmetic {
47
53
54 class MultXYZ : public Test {
55 public:
57 MultXYZ(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
58 : Test("Arithmetic::Mult::XYZ::"+s,3,d,st,CPLT_ASSIGNMENT,false) {}
59
60 virtual MaybeType solution(const Assignment& x) const {
61 return eq(x[0] * x[1], x[2]);
62 }
63
64 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
65 if (flip())
66 Gecode::mult(home, x[0], x[1], x[2]);
67 else
68 Gecode::rel(home, x[0] * x[1] == x[2]);
69 }
70 };
71
73 class MultXYZSol : public Test {
74 public:
76 MultXYZSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
77 : Test("Arithmetic::Mult::XYZ::Sol::"+s,3,d,st,EXTEND_ASSIGNMENT,false) {}
78
79 virtual MaybeType solution(const Assignment& x) const {
80 return eq(x[0] * x[1], x[2]);
81 }
82
83 virtual bool extendAssignement(Assignment& x) const {
84 Gecode::FloatVal d = x[0]*x[1];
85 if (Gecode::Float::subset(d, dom)) {
86 x.set(2, d);
87 return true;
88 } else {
89 return false;
90 }
91 }
92
93 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
94 Gecode::mult(home, x[0], x[1], x[2]);
95 }
96 };
97
99 class MultXXY : public Test {
100 public:
102 MultXXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
103 : Test("Arithmetic::Mult::XXY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
104
105 virtual MaybeType solution(const Assignment& x) const {
106 return eq(x[0] * x[0], x[1]);
107 }
108
109 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
110 Gecode::mult(home, x[0], x[0], x[1]);
111 }
112 };
113
115 class MultXXYSol : public Test {
116 public:
118 MultXXYSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
119 : Test("Arithmetic::Mult::XXY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false) {}
120
121 virtual MaybeType solution(const Assignment& x) const {
122 return eq(x[0] * x[0], x[1]);
123 }
124
125 virtual bool extendAssignement(Assignment& x) const {
126 Gecode::FloatVal d = x[0]*x[0];
127 if (Gecode::Float::subset(d, dom)) {
128 x.set(1, d);
129 return true;
130 } else {
131 return false;
132 }
133 }
134
135 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
136 Gecode::mult(home, x[0], x[0], x[1]);
137 }
138 };
139
141 class MultXYX : public Test {
142 public:
144 MultXYX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
145 : Test("Arithmetic::Mult::XYX::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
146
147 virtual MaybeType solution(const Assignment& x) const {
148 return eq(x[0] * x[1], x[0]);
149 }
150
151 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
152 Gecode::mult(home, x[0], x[1], x[0]);
153 }
154 };
155
157 class MultXYY : public Test {
158 public:
160 MultXYY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
161 : Test("Arithmetic::Mult::XYY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
162
163 virtual MaybeType solution(const Assignment& x) const {
164 return eq(x[0] * x[1], x[1]);
165 }
166
167 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
168 Gecode::mult(home, x[0], x[1], x[1]);
169 }
170 };
171
173 class MultXXX : public Test {
174 public:
176 MultXXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
177 : Test("Arithmetic::Mult::XXX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
178
179 virtual MaybeType solution(const Assignment& x) const {
180 return eq(x[0] * x[0], x[0]);
181 }
182
183 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
184 Gecode::mult(home, x[0], x[0], x[0]);
185 }
186 };
187
189 class Div : public Test {
190 public:
192 Div(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
193 : Test("Arithmetic::Div::"+s,3,d,st,CPLT_ASSIGNMENT,false) {}
194
195 virtual MaybeType solution(const Assignment& x) const {
196 return eq(x[0] / x[1], x[2]);
197 }
198
199 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
200 if (flip())
201 Gecode::div(home, x[0], x[1], x[2]);
202 else
203 Gecode::rel(home, x[0] / x[1] == x[2]);
204 }
205 };
206
208 class DivSol : public Test {
209 public:
211 DivSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
212 : Test("Arithmetic::Div::Sol::"+s,3,d,st,EXTEND_ASSIGNMENT,false) {}
213
214 virtual MaybeType solution(const Assignment& x) const {
215 return eq(x[0] / x[1], x[2]);
216 }
217
218 virtual bool extendAssignement(Assignment& x) const {
219 Gecode::FloatVal d = x[0]/x[1];
220 if (Gecode::Float::subset(d, dom)) {
221 x.set(2, d);
222 return true;
223 } else {
224 return false;
225 }
226 }
227
228 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
229 Gecode::div(home, x[0], x[1], x[2]);
230 }
231 };
232
234 class SqrXY : public Test {
235 public:
237 SqrXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
238 : Test("Arithmetic::Sqr::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
239
240 virtual MaybeType solution(const Assignment& x) const {
241 return eq(x[0] * x[0], x[1]);
242 }
243
244 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
245 if (flip())
246 Gecode::sqr(home, x[0], x[1]);
247 else
248 Gecode::rel(home, sqr(x[0]) == x[1]);
249 }
250 };
251
253 class SqrXYSol : public Test {
254 public:
256 SqrXYSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
257 : Test("Arithmetic::Sqr::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false) {}
258
259 virtual MaybeType solution(const Assignment& x) const {
260 return eq(x[0] * x[0], x[1]);
261 }
262
263 virtual bool extendAssignement(Assignment& x) const {
264 Gecode::FloatVal d = sqr(x[0]);
265 if (Gecode::Float::subset(d, dom)) {
266 x.set(1, d);
267 return true;
268 } else {
269 return false;
270 }
271 }
272
273 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
274 Gecode::sqr(home, x[0], x[1]);
275 }
276 };
277
279 class SqrXX : public Test {
280 public:
282 SqrXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
283 : Test("Arithmetic::Sqr::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
284
285 virtual MaybeType solution(const Assignment& x) const {
286 return eq(x[0] * x[0], x[0]);
287 }
288
289 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
290 Gecode::sqr(home, x[0], x[0]);
291 }
292 };
293
295 class SqrtXY : public Test {
296 public:
298 SqrtXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
299 : Test("Arithmetic::Sqrt::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
300
301 virtual MaybeType solution(const Assignment& x) const {
302 switch (cmp(x[0], Gecode::FRT_GQ, 0.0)) {
303 case MT_FALSE: return MT_FALSE;
304 case MT_MAYBE: return MT_MAYBE;
305 default:
306 return eq(sqrt(x[0]), x[1]);
307 }
308 }
309
310 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
311 if (flip())
312 Gecode::sqrt(home, x[0], x[1]);
313 else
314 Gecode::rel(home, sqrt(x[0]) == x[1]);
315 }
316 };
317
319 class SqrtXYSol : public Test {
320 public:
322 SqrtXYSol(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
323 : Test("Arithmetic::Sqrt::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false) {}
324
325 virtual MaybeType solution(const Assignment& x) const {
326 switch (cmp(x[0], Gecode::FRT_GQ, 0.0)) {
327 case MT_FALSE: return MT_FALSE;
328 case MT_MAYBE: return MT_MAYBE;
329 default:
330 return eq(sqrt(x[0]), x[1]);
331 }
332 }
333
334 virtual bool extendAssignement(Assignment& x) const {
335 Gecode::FloatVal d = sqrt(abs(x[0]));
336 if (Gecode::Float::subset(d, dom)) {
337 x.set(1, d);
338 return true;
339 } else {
340 return false;
341 }
342 }
343
344 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
345 Gecode::sqrt(home, x[0], x[1]);
346 }
347 };
348
350 class SqrtXX : public Test {
351 public:
353 SqrtXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
354 : Test("Arithmetic::Sqrt::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
355
356 virtual MaybeType solution(const Assignment& x) const {
357 switch (cmp(x[0], Gecode::FRT_GQ, 0.0)) {
358 case MT_FALSE: return MT_FALSE;
359 case MT_MAYBE: return MT_MAYBE;
360 default:
361 return eq(sqrt(x[0]), x[0]);
362 }
363 }
364
365 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
366 Gecode::sqrt(home, x[0], x[0]);
367 }
368 };
369
371 class PowXY : public Test {
372 unsigned int n;
373 public:
375 PowXY(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
376 : Test("Arithmetic::Pow::N::"+str(_n)+"::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false), n(_n) {}
377
378 virtual MaybeType solution(const Assignment& x) const {
379 return eq(pow(x[0],n), x[1]);
380 }
381
382 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
383 if (flip())
384 Gecode::pow(home, x[0], n, x[1]);
385 else
386 Gecode::rel(home, pow(x[0],n) == x[1]);
387 }
388 };
389
391 class PowXYSol : public Test {
392 unsigned int n;
393 public:
395 PowXYSol(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
396 : Test("Arithmetic::Pow::N::"+str(_n)+"::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false), n(_n) {}
397
398 virtual MaybeType solution(const Assignment& x) const {
399 return eq(pow(x[0],n), x[1]);
400 }
401
402 virtual bool extendAssignement(Assignment& x) const {
403 Gecode::FloatVal d = pow(x[0],n);
404 if (Gecode::Float::subset(d, dom)) {
405 x.set(1, d);
406 return true;
407 } else {
408 return false;
409 }
410 }
411
412 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
413 Gecode::pow(home, x[0], n, x[1]);
414 }
415 };
416
418 class PowXX : public Test {
419 unsigned int n;
420 public:
422 PowXX(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
423 : Test("Arithmetic::Pow::N::"+str(_n)+"::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
424
425 virtual MaybeType solution(const Assignment& x) const {
426 return eq(pow(x[0],n), x[0]);
427 }
428
429 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
430 Gecode::pow(home, x[0], n, x[0]);
431 }
432 };
433
435 class NRootXY : public Test {
436 unsigned int n;
437 public:
439 NRootXY(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
440 : Test("Arithmetic::NRoot::N::"+str(_n)+"::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false), n(_n) {}
441
442 virtual MaybeType solution(const Assignment& x) const {
443 if ((n == 0) || (x[0].max() < 0.0))
444 return MT_FALSE;
445 return eq(nroot(x[0],n), x[1]);
446 }
447
448 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
449 if (flip())
450 Gecode::nroot(home, x[0], n, x[1]);
451 else
452 Gecode::rel(home, nroot(x[0],n) == x[1]);
453 }
454 };
455
457 class NRootXYSol : public Test {
458 unsigned int n;
459 public:
461 NRootXYSol(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
462 : Test("Arithmetic::NRoot::N::"+str(_n)+"::XY::Sol::"+s,2,d,st,EXTEND_ASSIGNMENT,false), n(_n) {}
463
464 virtual MaybeType solution(const Assignment& x) const {
465 if ((n == 0) || (x[0].max() < 0.0))
466 return MT_FALSE;
467 return eq(nroot(x[0],n), x[1]);
468 }
469
470 virtual bool extendAssignement(Assignment& x) const {
471 if ((n == 0) || (x[0].max() < 0))
472 return false;
473 Gecode::FloatVal d = nroot(x[0],n);
474 if (Gecode::Float::subset(d, dom)) {
475 x.set(1, d);
476 return true;
477 } else {
478 return false;
479 }
480 }
481
482 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
483 Gecode::nroot(home, x[0], n, x[1]);
484 }
485 };
486
488 class NRootXX : public Test {
489 unsigned int n;
490 public:
492 NRootXX(const std::string& s, const Gecode::FloatVal& d, unsigned int _n, Gecode::FloatNum st)
493 : Test("Arithmetic::NRoot::N::"+str(_n)+"::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
494
495 virtual MaybeType solution(const Assignment& x) const {
496 if ((n == 0) || (x[0].max() < 0))
497 return MT_FALSE;
498 return eq(nroot(x[0],n), x[0]);
499 }
500
501 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
502 Gecode::nroot(home, x[0], n, x[0]);
503 }
504 };
505
507 class AbsXY : public Test {
508 public:
510 AbsXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
511 : Test("Arithmetic::Abs::XY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
512
513 virtual MaybeType solution(const Assignment& x) const {
514 return eq(abs(x[0]), x[1]);
515 }
516
517 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
518 if (flip())
519 Gecode::abs(home, x[0], x[1]);
520 else
521 Gecode::rel(home, abs(x[0]) == x[1]);
522 }
523 };
524
526 class AbsXX : public Test {
527 public:
529 AbsXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
530 : Test("Arithmetic::Abs::XX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
531
532 virtual MaybeType solution(const Assignment& x) const {
533 return eq(abs(x[0]), x[0]);
534 }
535
536 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
537 Gecode::abs(home, x[0], x[0]);
538 }
539 };
540
542 class MinXYZ : public Test {
543 public:
545 MinXYZ(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
546 : Test("Arithmetic::Min::Bin::XYZ::"+s,3,d,st,CPLT_ASSIGNMENT,false) {}
547
548 virtual MaybeType solution(const Assignment& x) const {
549 return eq(min(x[0],x[1]), x[2]);
550 }
551
552 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
553 if (flip())
554 Gecode::min(home, x[0], x[1], x[2]);
555 else
556 Gecode::rel(home, min(x[0],x[1]) == x[2]);
557 }
558 };
559
561 class MinXXY : public Test {
562 public:
564 MinXXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
565 : Test("Arithmetic::Min::Bin::XXY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
566
567 virtual MaybeType solution(const Assignment& x) const {
568 return eq(min(x[0],x[0]), x[1]);
569 }
570
571 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
572 Gecode::min(home, x[0], x[0], x[1]);
573 }
574 };
575
577 class MinXYX : public Test {
578 public:
580 MinXYX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
581 : Test("Arithmetic::Min::Bin::XYX::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
582
583 virtual MaybeType solution(const Assignment& x) const {
584 return eq(min(x[0],x[1]), x[0]);
585 }
586
587 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
588 Gecode::min(home, x[0], x[1], x[0]);
589 }
590 };
591
593 class MinXYY : public Test {
594 public:
596 MinXYY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
597 : Test("Arithmetic::Min::Bin::XYY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
598
599 virtual MaybeType solution(const Assignment& x) const {
600 return eq(min(x[0],x[1]), x[1]);
601 }
602
603 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
604 Gecode::min(home, x[0], x[1], x[1]);
605 }
606 };
607
609 class MinXXX : public Test {
610 public:
612 MinXXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
613 : Test("Arithmetic::Min::Bin::XXX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
614
615 virtual MaybeType solution(const Assignment& x) const {
616 return eq(min(x[0],x[0]), x[0]);
617 }
618
619 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
620 Gecode::min(home, x[0], x[0], x[0]);
621 }
622 };
623
625 class MaxXYZ : public Test {
626 public:
628 MaxXYZ(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
629 : Test("Arithmetic::Max::Bin::XYZ::"+s,3,d,st,CPLT_ASSIGNMENT,false) {}
630
631 virtual MaybeType solution(const Assignment& x) const {
632 return eq(max(x[0],x[1]), x[2]);
633 }
634
635 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
636 if (flip())
637 Gecode::max(home, x[0], x[1], x[2]);
638 else
639 Gecode::rel(home, max(x[0], x[1]) == x[2]);
640 }
641 };
642
644 class MaxXXY : public Test {
645 public:
647 MaxXXY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
648 : Test("Arithmetic::Max::Bin::XXY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
649
650 virtual MaybeType solution(const Assignment& x) const {
651 return eq(max(x[0],x[0]), x[1]);
652 }
653
654 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
655 Gecode::max(home, x[0], x[0], x[1]);
656 }
657 };
658
660 class MaxXYX : public Test {
661 public:
663 MaxXYX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
664 : Test("Arithmetic::Max::Bin::XYX::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
665
666 virtual MaybeType solution(const Assignment& x) const {
667 return eq(max(x[0],x[1]), x[0]);
668 }
669
670 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
671 Gecode::max(home, x[0], x[1], x[0]);
672 }
673 };
674
676 class MaxXYY : public Test {
677 public:
679 MaxXYY(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
680 : Test("Arithmetic::Max::Bin::XYY::"+s,2,d,st,CPLT_ASSIGNMENT,false) {}
681
682 virtual MaybeType solution(const Assignment& x) const {
683 return eq(max(x[0],x[1]), x[1]);
684 }
685
686 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
687 Gecode::max(home, x[0], x[1], x[1]);
688 }
689 };
690
692 class MaxXXX : public Test {
693 public:
695 MaxXXX(const std::string& s, const Gecode::FloatVal& d, Gecode::FloatNum st)
696 : Test("Arithmetic::Max::Bin::XXX::"+s,1,d,st,CPLT_ASSIGNMENT,false) {}
697
698 virtual MaybeType solution(const Assignment& x) const {
699 return eq(max(x[0],x[0]), x[0]);
700 }
701
702 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
703 Gecode::max(home, x[0], x[0], x[0]);
704 }
705 };
706
708 class MinNary : public Test {
709 public:
712 : Test("Arithmetic::Min::Nary",4,-4,4,0.5,CPLT_ASSIGNMENT,false) {}
713
714 virtual MaybeType solution(const Assignment& x) const {
715 return eq(min(min(x[0],x[1]),x[2]), x[3]);
716 }
717
718 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
720 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
721 if (flip())
722 Gecode::min(home, m, x[3]);
723 else
724 Gecode::rel(home, min(m) == x[3]);
725 }
726 };
727
729 class MinNaryShared : public Test {
730 public:
733 : Test("Arithmetic::Min::Nary::Shared",3,-4,4,0.5,CPLT_ASSIGNMENT,false) {}
734
735 virtual MaybeType solution(const Assignment& x) const {
736 return eq(min(min(x[0],x[1]),x[2]), x[1]);
737 }
738
739 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
741 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
742 Gecode::min(home, m, x[1]);
743 }
744 };
745
747 class MaxNary : public Test {
748 public:
751 : Test("Arithmetic::Max::Nary",4,-4,4,0.5,CPLT_ASSIGNMENT,false) {}
752
753 virtual MaybeType solution(const Assignment& x) const {
754 return eq(max(max(x[0],x[1]),x[2]), x[3]);
755 }
756
757 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
759 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
760 if (flip())
761 Gecode::max(home, m, x[3]);
762 else
763 Gecode::rel(home, max(m) == x[3]);
764 }
765 };
766
768 class MaxNaryShared : public Test {
769 public:
772 : Test("Arithmetic::Max::Nary::Shared",3,-4,4,0.5,CPLT_ASSIGNMENT,false) {}
773
774 virtual MaybeType solution(const Assignment& x) const {
775 return eq(max(max(x[0],x[1]),x[2]), x[1]);
776 }
777
778 virtual void post(Gecode::Space& home, Gecode::FloatVarArray& x) {
780 m[0]=x[0]; m[1]=x[1]; m[2]=x[2];
781 Gecode::max(home, m, x[1]);
782 }
783 };
784
785 const Gecode::FloatNum step = 0.15;
789
793
797
801
805
809
813
817
821
825
829
833
837
841
845
849
853
857
861
865
869
873
877
881
885
889
893
897
901
905
909
913
917
921
925
929
933
937
941
945
949
953
957
961
965
969
975
976 }
977}}
978
979// STATISTICS: test-float
Float value type.
Definition float.hh:334
Passing float variables.
Definition float.hh:982
Float variable array.
Definition float.hh:1033
Computation spaces.
Definition core.hpp:1744
Test for absolute value constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
AbsXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for absolute value constraint
AbsXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for division constraint when solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
DivSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Test for division constraint
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Div(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for n-ary maximum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MaxNaryShared(void)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for n-ary maximum constraint
MaxNary(void)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for binary maximum constraint with shared variables
MaxXXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for binary maximum constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MaxXXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for binary maximum constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MaxXYX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for binary maximum constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MaxXYY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for binary maximum constraint
MaxXYZ(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for n-ary minimmum constraint with shared variables
MinNaryShared(void)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for n-ary minimmum constraint
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MinNary(void)
Create and register test.
Test for binary minimum constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MinXXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for binary minimum constraint with shared variables
MinXXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for binary minimum constraint with shared variables
MinXYX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for binary minimum constraint with shared variables
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MinXYY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for binary minimum constraint
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MinXYZ(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for multiplication constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MultXXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for multiplication constraint with shared variables when solution is ensured
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
MultXXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for multiplication constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
MultXXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for multiplication constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MultXYX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for multiplication constraint with shared variables
MultXYY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for multiplication constraint when solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
MultXYZSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
Test for multiplication constraint
MultXYZ(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for nroot constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
NRootXX(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for nroot constraint where solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
NRootXYSol(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
Test for nroot constraint
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
NRootXY(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for pow constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
PowXX(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for pow constraint where solution is ensured
PowXYSol(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for pow constraint
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
PowXY(const std::string &s, const Gecode::FloatVal &d, unsigned int _n, Gecode::FloatNum st)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for squaring constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
SqrXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for squaring constraint where solution is ensured
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
SqrXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
Test for squaring constraint
SqrXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for square root constraint with shared variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
SqrtXX(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Test for square root constraint where solution is ensured
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
SqrtXYSol(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual bool extendAssignement(Assignment &x) const
Extend assignment x.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Test for square root constraint
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
SqrtXY(const std::string &s, const Gecode::FloatVal &d, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Base class for assignments
Definition float.hh:80
static MaybeType eq(Gecode::FloatVal x, Gecode::FloatVal y)
Whether x and y are equal.
Definition float.hpp:268
static MaybeType cmp(Gecode::FloatVal x, Gecode::FloatRelType r, Gecode::FloatVal y)
Compare x and y with respect to r.
Definition float.hpp:235
static std::string str(Gecode::FloatRelType frt)
Map float relation to string.
Definition float.hpp:194
bool flip(void)
Flip a coin and return true or false randomly.
Definition float.hpp:273
Gecode::FloatVal dom
Domain of variables.
Definition float.hh:249
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
Definition rel.cpp:68
double FloatNum
Floating point number base type.
Definition float.hh:106
@ FRT_GQ
Greater or equal ( )
Definition float.hh:1079
bool subset(const FloatVal &x, const FloatVal &y)
Definition val.hpp:490
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n\geq 0$.
Tests for arithmetic constraints
AbsXY abs_xy_b("B", b, step)
Div div_b("B", b, step)
SqrtXY sqrt_xy_b("B", b, step)
MinXYX min_xyx_b("B", b, step)
MultXYY mult_xyy_b("B", b, step)
AbsXY abs_xy_a("A", a, step)
PowXX pow_xx_b_3("B", b, 0, step)
MaxXYZ max_xyz_b("B", b, step)
MinXYY min_xyy_a("A", a, step)
MultXYY mult_xyy_c("C", c, step)
NRootXX nroot_xx_b_1("B", b, 2, step)
MaxXYZ max_xyz_c("C", c, step)
MinXXY min_xxy_c("C", c, step)
NRootXX nroot_xx_b_2("B", b, 3, step)
DivSol div_sol_a("A", a, step)
SqrtXYSol sqrt_xy_sol_a("A", a, step)
NRootXYSol nroot_xy_sol_c_3("C", c, 0, step)
SqrXYSol sqr_xy_sol_b("B", b, step)
AbsXX abs_xx_c("C", c, step)
PowXX pow_xx_b_2("B", b, 3, step)
Div div_c("C", c, step)
PowXYSol pow_xy_sol_b_1("B", b, 2, step)
SqrXY sqr_xy_b("B", b, step)
PowXX pow_xx_c_1("C", c, 2, step)
SqrtXYSol sqrt_xy_sol_c("C", c, step)
Gecode::FloatVal c(-8, 8)
PowXY pow_xy_b_2("B", b, 3, step)
MultXXY mult_xxy_c("C", c, step)
NRootXX nroot_xx_a_2("A", a, 3, step)
PowXYSol pow_xy_sol_c_3("C", c, 0, step)
NRootXYSol nroot_xy_sol_c_1("C", c, 2, step)
MinXYZ min_xyz_a("A", a, step)
NRootXYSol nroot_xy_sol_b_1("B", b, 2, step)
NRootXY nroot_xy_a_1("A", a, 2, step)
MaxXYX max_xyx_a("A", a, step)
MaxXYY max_xyy_a("A", a, step)
SqrtXX sqrt_xx_b("B", b, step)
SqrXX sqr_xx_c("C", c, step)
MinXYX min_xyx_a("A", a, step)
PowXX pow_xx_a_3("A", a, 0, step)
PowXY pow_xy_c_2("C", c, 3, step)
MultXYZ mult_xyz_b("B", b, step)
NRootXY nroot_xy_b_2("B", b, 3, step)
MultXYX mult_xyx_a("A", a, step)
MultXYZ mult_xyz_c("C", c, step)
MultXYZ mult_xyz_a("A", a, step)
MultXXX mult_xxx_c("C", c, step)
PowXYSol pow_xy_sol_a_1("A", a, 2, step)
MultXYZSol mult_xyz_sol_c("C", c, step)
NRootXY nroot_xy_b_3("B", b, 0, step)
MinXXX min_xxx_b("B", b, step)
MinXXY min_xxy_b("B", b, step)
NRootXY nroot_xy_c_1("C", c, 2, step)
MinXYY min_xyy_b("B", b, step)
MinXYY min_xyy_c("C", c, step)
NRootXX nroot_xx_c_3("C", c, 0, step)
NRootXY nroot_xy_c_2("C", c, 3, step)
MinXYX min_xyx_c("C", c, step)
SqrtXY sqrt_xy_c("C", c, step)
SqrXX sqr_xx_b("B", b, step)
SqrtXY sqrt_xy_a("A", a, step)
MaxXXY max_xxy_b("B", b, step)
PowXY pow_xy_b_3("B", b, 0, step)
NRootXX nroot_xx_a_3("A", a, 0, step)
SqrtXYSol sqrt_xy_sol_b("B", b, step)
Gecode::FloatVal b(9, 12)
MultXYX mult_xyx_b("B", b, step)
MaxXYZ max_xyz_a("A", a, step)
SqrXYSol sqr_xy_sol_a("A", a, step)
PowXYSol pow_xy_sol_b_2("B", b, 3, step)
NRootXYSol nroot_xy_sol_a_2("A", a, 3, step)
SqrXX sqr_xx_a("A", a, step)
PowXYSol pow_xy_sol_c_1("C", c, 2, step)
NRootXYSol nroot_xy_sol_b_3("B", b, 0, step)
MultXXYSol mult_xxy_sol_c("C", c, step)
MaxXYY max_xyy_b("B", b, step)
PowXY pow_xy_a_1("A", a, 2, step)
SqrtXX sqrt_xx_a("A", a, step)
MaxXXX max_xxx_c("C", c, step)
PowXY pow_xy_a_2("A", a, 3, step)
NRootXYSol nroot_xy_sol_b_2("B", b, 3, step)
Gecode::FloatVal a(-8, 5)
SqrXY sqr_xy_c("C", c, step)
MultXXYSol mult_xxy_sol_b("B", b, step)
DivSol div_sol_c("C", c, step)
PowXX pow_xx_a_2("A", a, 3, step)
DivSol div_sol_b("B", b, step)
PowXY pow_xy_c_3("C", c, 0, step)
NRootXYSol nroot_xy_sol_a_3("A", a, 0, step)
MaxXYX max_xyx_b("B", b, step)
MaxXXY max_xxy_c("C", c, step)
MaxXXX max_xxx_b("B", b, step)
PowXYSol pow_xy_sol_b_3("B", b, 0, step)
NRootXY nroot_xy_b_1("B", b, 2, step)
PowXYSol pow_xy_sol_a_2("A", a, 3, step)
MultXXY mult_xxy_b("B", b, step)
MinXXX min_xxx_c("C", c, step)
MultXYZSol mult_xyz_sol_b("B", b, step)
PowXY pow_xy_b_1("B", b, 2, step)
AbsXY abs_xy_c("C", c, step)
const Gecode::FloatNum step
MinXYZ min_xyz_b("B", b, step)
MultXYX mult_xyx_c("C", c, step)
MultXXX mult_xxx_a("A", a, step)
MinXYZ min_xyz_c("C", c, step)
NRootXX nroot_xx_b_3("B", b, 0, step)
MultXXYSol mult_xxy_sol_a("A", a, step)
MaxXYY max_xyy_c("C", c, step)
MinXXX min_xxx_a("A", a, step)
PowXY pow_xy_a_3("A", a, 0, step)
NRootXY nroot_xy_a_2("A", a, 3, step)
PowXX pow_xx_b_1("B", b, 2, step)
MultXXY mult_xxy_a("A", a, step)
AbsXX abs_xx_b("B", b, step)
NRootXYSol nroot_xy_sol_a_1("A", a, 2, step)
PowXX pow_xx_c_2("C", c, 3, step)
MinXXY min_xxy_a("A", a, step)
Div div_a("A", a, step)
MultXYZSol mult_xyz_sol_a("A", a, step)
MaxXYX max_xyx_c("C", c, step)
NRootXYSol nroot_xy_sol_c_2("C", c, 3, step)
PowXY pow_xy_c_1("C", c, 2, step)
PowXYSol pow_xy_sol_a_3("A", a, 0, step)
MultXXX mult_xxx_b("B", b, step)
NRootXX nroot_xx_a_1("A", a, 2, step)
SqrXY sqr_xy_a("A", a, step)
SqrXYSol sqr_xy_sol_c("C", c, step)
NRootXX nroot_xx_c_2("C", c, 3, step)
PowXX pow_xx_c_3("C", c, 0, step)
SqrtXX sqrt_xx_c("C", c, step)
PowXYSol pow_xy_sol_c_2("C", c, 3, step)
NRootXX nroot_xx_c_1("C", c, 2, step)
MaxXXY max_xxy_a("A", a, step)
AbsXX abs_xx_a("A", a, step)
MultXYY mult_xyy_a("A", a, step)
PowXX pow_xx_a_1("A", a, 2, step)
NRootXY nroot_xy_c_3("C", c, 0, step)
MaxXXX max_xxx_a("A", a, step)
NRootXY nroot_xy_a_3("A", a, 0, step)
Testing domain floats.
Definition float.cpp:43
@ EXTEND_ASSIGNMENT
Definition float.hh:64
@ CPLT_ASSIGNMENT
Definition float.hh:62
MaybeType
Type for comparisons and solutions.
Definition float.hh:51
General test support.
Definition afc.cpp:39