I think you should go for float variables, however I do not know whether they have been ported to 3.* Any comment
Christian From: [email protected] [mailto:[email protected]] On Behalf Of Javier Andrés Mena Zapata Sent: Tuesday, May 19, 2009 9:30 PM To: gecode list Subject: [gecode-users] Decimal Hi, I'm modelling a financial problem (calculating minimum interests payments and ROI), and I want to model the "money" value using Gecode integer variables. For example, representing 10.25 is like storing 1025 divided by 100. But, there's a problem with the multiplication, because the interests rates are float values with very muchs decimals. For example 0.00643403011. I think there may be an overflow if I model this decimal using something like 6434 divided by 1000000. What do you think it's the best technique for modelling this problem: 1. Use IntVars and the current propagators (as proposed here). 2. Use IntVars, and creating new propagators for IntVar x Float multiplication. 3. Use float vars, and its propagators. 4. Other? Thanks, -- Javier Andrés Mena Zapata http://StrategicDecision.net/ Cali - Colombia
_______________________________________________ Gecode users mailing list [email protected] https://www.gecode.org/mailman/listinfo/gecode-users
