[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:       ian reinhart geiser <geiseri () yahoo ! com>
Date:       2002-03-25 2:10:47
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 24 March 2002 08:59 pm, Rob Kaper wrote:
> 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.
>

Ah that is very easy, almost every book on the STL in the chapter on stacks 
tells how to do this.  I think I have code for that rolling arround here for 
that too, it does all *./,-,+ and handles () properly, i think it even will 
do ^ too, but i forget.  There is lose support for variables but I never 
really needed it to handle more than two variables at a time so I hard coded 
it.  (It was for a random variat generator)

It was a sophmore year assingment for data structures of all places :)

They are not to hard to write, but I could have sworn that I saw a few on 
freshmeat.   If you get in a pinch I could fire you off a copy of the code 
and you can play with it and make it do what you need.

- -ian reinhart geiser

- -ian reinhart geiser


- -- 
:-- Ian Reinhart Geiser --:
GPG Key: D6A6 7E16 13A9 B5A7 9E18 D1A7 3F2E B64D 19BC 76F8
- -----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE d- s+:+ a- C++++ UL+++ P--- L+++ E- W++ N- o- K--- w-
M+ V-- PS+ PE- Y+ PGP++ t-- 5-- X R++ tv- b+ DI++ D++
G++ e++ hasciicam-0.9 r+++ y**
- ------END GEEK CODE BLOCK------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8nocnPy62TRm8dvgRAnS4AKDXQPzstP94jD8B6V3VELcKA0aI2wCfREAZ
khmEPLlFAzxO+DMWv/i/A24=
=yW+J
-----END PGP SIGNATURE-----


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

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

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