We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d8fbfd commit bdd48ecCopy full SHA for bdd48ec
2 files changed
changelog.in
@@ -68,6 +68,14 @@ Date: ?-?-?
68
[DESCRIPTION]
69
New stuff!
70
71
+[ENTRY]
72
+Module: minimodel
73
+What: bug
74
+Rank: minor
75
+Thanks: Conrad Drescher
76
+[DESCRIPTION]
77
+exp(0.0) now correctly evaluates to 1.0 (and not 0.0).
78
+
79
[ENTRY]
80
Module: int
81
What: changed
gecode/minimodel/float-arith.cpp
@@ -226,9 +226,10 @@ namespace Gecode { namespace MiniModel {
226
{
227
assert(n == 1);
228
FloatVar x = a[0].post(home);
229
- if (x.assigned() && (x.val() == 0.0))
230
- y = result(home,ret,x);
231
- else {
+ if (x.assigned() && (x.val() == 0.0)) {
+ FloatVar one(home,1.0,1.0);
+ y = result(home,ret,one);
232
+ } else {
233
y = result(home,ret);
234
exp(home, x, y);
235
}
0 commit comments