[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Looking for (KDE) lib/class to perform calculations
From:       Rob Kaper <cap () capsi ! com>
Date:       2002-03-25 1:59:23
[Download RAW message or body]

On Monday 25 March 2002 02:21, ian reinhart geiser wrote:
> why does KDELibs need an algebra engine?

It doesn't need to be very complex. I want to do some simple calculations. I 
wonder how KSpread does that, it parses "=A1+(2*A2)" to calculate the value 
of a cell based on other values. I need exactly something like that which can 
do the basic six mathematical calculations.

For my purposes an integer would be precise enough, I'm just multiplying 
(always towards integers) and adding/substracting stuff. 

If you need to know why.. most rent values in the Monopoly game are based on a 
baserent and a multiplier and/or addition based on number of improvements, 
dice thrown or properties owned. I could put about 200 static values in a 
config file, but those can actually be replaced with about 10 generic 
mathematical ones and 25 exceptions, which are mathematical rules applied 
after the generic one.

Rob
-- 
Rob Kaper     | "They that can give up essential liberty to obtain a little
cap@capsi.com | temporary safety deserve neither liberty nor safety."
www.capsi.com | - Benjamin Franklin, Historical Review of Pennsylvania, 1759
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic