-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Bug from Yuxin Sun
Recently I tried to use target functions with floats in BMA but received errors/unexpected results when operating with floats rather than fractions.
As a reproducible example, I attach a 5-node network: with one node (e) being activated by two nodes (a & b) as well as being inhibited by two nodes (c & d), as shown in the attached .json file. All nodes ranged from 0 to 6. The four parent nodes took values as a = b = 6, c = d = 2. I tried a few target functions at node e, their results are as below:
- var(a)/2+var(b)/2-var(c)/2-var(d)/2: correct result e = 4
- var(a)*0.5+var(b)*0.5-var(c)*0.5-var(d)*0.5: incorrect result e = 0 (should be 4)
- var(a)*0.7/2+var(b)*0.5/2-var(c)*0.3/2-var(d)*0.1/2: incorrect result e = 0 (should be 3.2 and round to 3)
- avg(var(a)*0.7, var(b)*0.5)-avg(var(c)*0.3, var(d)*0.1): "Service error. The status is neither Stabilising or NotStabilising; result error: 2 failed to parse e’s transfer function”
float_tf.zip
Examples 1 and 2 are equivalent, and examples 3 and 4 are equivalent, but only 1 received the expected result.