[gecode-users] Decimal
Javier Andrés Mena Zapata
javimena at gmail.com
Tue May 19 21:30:15 CEST 2009
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20090519/28cda986/attachment.htm>
More information about the gecode-users
mailing list