The K Desktop Environment

Chapter 4. Questions and Answers

4.1. How do I get pi=3.1415926...?
4.2. How do I get e, the Euler number?
4.3. How do I get two fixed digits after the period?
4.4. What about Precision?

4.1. How do I get pi=3.1415926...?

Simply type Inv EE.

4.2. How do I get e, the Euler number?

Type 1 Inv Ln.

4.3. How do I get two fixed digits after the period?

Click on the Configure button, this will bring up the configuration dialog. Check Set fixed precision and adjust the spin control so that it shows a 2.

4.4. What about Precision?

The main factor determining the precision of KCalc is whether your libc and libmath supports the C data type long double. If this is the case, KCalc will detect this at compile time and use it as its fundamental data type to represent numbers. Check KCalc's About dialog (in the Configure dialog box) in order to find out what the fundamental data type for your copy of KCalc is.

Unless you have a libc and libmath of exceptionally high quality, you will be able to observe some "interesting" results when trying to execute computations such as: 123.22 - 123.21, 2.01 - 2, 123.88 - 123.87 and similar. However if you think this is bad I ask you to do the same computation on the windows calculator.

Adjust the Precision in KCalc's Configure dialog so that the above computations work correctly. I recommend a precision of 14 if the fundamental data type for your copy of KCalc is long double, otherwise 8 or 10.

Higher precision doesn't necessarily lead to better results. Play with the precision and you will see what I mean.