Description:

Those who have been following the discussion on http://planetkde.org/ will be aware of Roberto Alsina's ideas considering KCalc, and how it can be improved.

I thought he was on to something, so I made a C++ version, with a few extra features to make it useful.

Basically, this is a tool to let you type an expression (including trig, exponential, or logarithmic) functions and get an answer, including a history pane, support for Radians and Degrees, and a very compact mode.

Note on the recent RPN mode addition: abakus as of now doesn't have an persistent RPN mode value stack, so every expression you enter at this time has to result in exactly one value on the operand stack (e.g You can't do '2 +' after entering an expression, you need 'ans 2 +').

You can find a fuller description on the homepage, or by testing it out yourself!

You can make it really useful by using KControl to bind it to a key to make sure it's just a few keystrokes away!

Changelog:

10 years ago

This is a brief list of changes. For more info visit the homepage, or just try it out.

v0.91:
* Abakus supports the "," decimal separator correctly (both input and output).
* Show the most significant digits when an answer must be cut off due to space restrictions.
* Other minor stuff.

v0.90:
* DocBook documentation contributed by Jes Hall.
* A lot of the good user interface code was taken from SpeedCrunch by Ariya Hidayat. Abakus is now more pleasant to deal with.
* Added support for the GNU Multiple Precision library (in conjunction with MPFR). If you do not have it installed Abakus will fall back to its internal code.
* Improved error handling with the deriv() function.
* Fixed spelling of Ariya Hidayat's name.
* Added asinh(), acosh(), and atanh() functions.
* All functions that Abakus supports now have exact numerical derivatives. Abakus will still approximate for user-defined functions.
* Improvements to drag-and-drop, which is used slightly more evenly.
* You can use the F6 key to quickly select the expression editor.
* Fixed a crash bug when redefining a user-defined function that another user-defined function was using.
* Fixed a bug where the compact mode setting was incorrectly loaded.
* Fixed a bug with raising negative numbers to integral powers.
* Fixed a bug where the currently selected precision menu item could be deselected.
* Fixed a bug where some elements didn't have their precision updated when you selected a different precision.
* Fixed a bug where selecting Custom Precision would leave it checked even if you canceled the ensuing dialog.
* All hyperbolic trig functions consistently ignore the Degrees setting now, since it makes no sense when dealing with hyperbolic functions.

10 years ago

gohanz

Report

10 years ago

Animatrix30

Report

10 years ago

abeach

I tried to install that RPM above, but it just contains the documentation. No binaries or .desktop files???

Report

10 years ago

Animatrix30

I work on it

Report

11 years ago

fudokai

I had no problems installing abakus on my old PC but I've now got an x86_64 job and I get the following error during make

g++ -Wl,--rpath=/usr/lib/qt3/lib -Wl,--rpath=/opt/kde3/lib64 -Wl,--rpath=/opt/kde3/lib64/kde3 -Wl,--rpath=/usr/lib/qt3/lib -Wl,--rpath=/opt/kde3/lib64/kde3 -Wl,--rpath=/opt/kde3/lib64 -Wl,--as-needed -o src/abakus src/abakus.o src/abakuslistview.o src/dragsupport.o src/editor.o src/evaluator.o src/function.o src/lexer_lex.o src/mainwindow.o src/node.o src/numerictypes.o src/parser_yacc.o src/result.o src/resultlistview.o src/resultlistviewtext.o src/rpnmuncher.o src/valuemanager.o src/dcopIface_skel.o src/hmath.o src/number.o -L/opt/kde3/lib64 -L/usr/lib/qt3/lib -lqt-mt -lkio -lkdecore -lkdeprint -lkdeui
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/qt3/lib/libqt-mt.so when searching for -lqt-mt
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld: cannot find -lqt-mt
collect2: ld returned 1 exit status
scons: *** [src/abakus] Error 1
make: *** [all] Error 2

I've got qt3 and qt3-32bit installed - is this the cause and is there a cure?

Report

10 years ago

pynm0001

I wish I knew. :(

It sounds like it's trying to compile in 64-bit mode and can't find the right 64-bit Qt libraries. But I don't have a 64-bit system myself so I wouldn't know exactly how to solve that issue.

Report

11 years ago

redisdead

Very good job. Good for those like me who don't like to see buttons in a calculator program.

I think RPN could be improved, it's tedious to do all calculous in RPN, I'd like to mix the two modes.
I'd like also to use abakus for binary, hexa or octal values.

Report

11 years ago

pynm0001

If you have 0.80.1 abakus might not configure for you if you don't have scons still. Yet another python function acts different between different versions. :( Long story short, if you catch this error change os.system("pwd") on line 61 of configure to os.popen("pwd").read().strip() I will make a 0.80.2 release as soon as I can I promise, but I'm about to leave. ;)

Report

12 years ago

Cwaig

The 0.76 release doesn't build :(

mainwindow.cpp: In constructor `MainWindow::MainWindow()':
mainwindow.cpp:125: error: `Keys' undeclared (first use this function)
mainwindow.cpp:125: error: (Each undeclared identifier is reported only once for each function it appears in.)
mainwindow.cpp:125: error: `StatusBar' undeclared (first use this function)
mainwindow.cpp:125: error: `Save' undeclared (first use this function)
mainwindow.cpp:125: error: `Create' undeclared (first use this function)
mainwindow.cpp:125: error: `setupGUI' undeclared (first use this function)

Report

12 years ago

pynm0001

Sorry, abakus apparently requires KDE 3.3, not 3.1. :-(

I will investigate solutions to allow abakus to compile with 3.1 and 3.2 but until then, an easy fix would be to change the setupGUI(...); call in mainwindow.cpp to be createGUI();

You will lose a little bit of functionality, but the program should still work.

Report

12 years ago

jbaehr

some whishes:

-) auto-define r[n] as variable for the last result (so that r or r1 are standing for the result in the history-line above. r2 for the result two lines above, aso. errors are ignored):

-) dcop-interface to submit an expression/get the result (that would i.e. permit an kicker-applet: klick a little icon and a lineedit pops up -> enter the expression and send it to abakus)

-) self-defined functions:
f(x)=x^2 + 2*x - 6 => (done)
f(4) => 18

-) save history to file (txt)
-) save defined function to file:
file could look like this:
f(x) = x^2 + 5
g(x,y) = 2*x + 4*y
test = 77.2346
log(x, base=e) = ln(x) / ln(base) # just an example for default-values

-) set a list of function-sets which should be loaded automaticly on startup

Report

12 years ago

pynm0001

> auto-define r[n] as variable for the last result.

I like this idea, I'll have to see how hard it is to do.

> dcop-interface to submit an expression/get the result.

I think the whole point of abakus is to be compact enough to do that itself, but DCOP support is such a trivial thing to add that I can't see a reason not to.

> self-defined functions:
f(x)=x^2 + 2*x - 6 => (done)
f(4) => 18

I want to add this but I'll have to rearrange the parser. This is one of the areas where Ariya's SpeedCrunch *really* has abakus beat, since it's easier to form a parse tree with his parser.

> save history to file (txt)

Good idea.

> save defined function to file:

Also a good idea.

> set a list of function-sets which should be loaded automaticly on startup.

Well I figure if you define the function it will always be loaded automatically after that.

Report

12 years ago

pynm0001

> auto-define r[n] as variable for the last result.

This is done, using $n variables. $0 is always the most recent result.

> dcop-interface to submit an expression/get the result.

Done.

> save history to file (txt)

I knew I forgot something. =D

Report

12 years ago

LMCBoy

On Fedora Core 2, I had to change "-I$(KDEDIR)/include" to "-I$(KDEDIR)/include/kde".

Some ideas:

  • ability to copy results into the clipboard, and to drag results to other apps.

  • double-click on an entry in the history list to copy that entry back into the input buffer.

  • double-click on a result in the history list to copy that value into the current expression in the input buffer.

    For example, I type "3+4", and get "7" in the list. I then type "4*" and double-click on "7", and get "4*7" in the input field.


Nice work!

Report

12 years ago

DocTomoe

I was sceptical when I first read that article, but abakus really is an major leap to usability, and I am experiencing this to be up to 60% faster than the traditional kcalc.

Get it into the official KDE, but make it optional.

Report

Supporters

Recent Donations

Be the first to donate
Filename Version Description Filetype Packagetype License Downloads Date Filesize Install
Score 73%
73.00 Likes
27 Dislikes

0 Supporters for abakus:

Recent Donations:

Be the first to donate
show all
Details
version
0.91
updated May 08 2006
added Oct 05 2004
downloads
page views 218
support pynm0001
For The Product
abakus
5 - 10 - 25 - 50 - 100 - 200 - 500