The KCalc Handbook: Questions and Answers

Next Previous Table of Contents

### 8. Questions and Answers

### 8.1 How do I get pi=3.1415926...?

Simply type INV EE.

### 8.2 How do I get e, the Euler number?

Type 1 INV ln.

### 8.3 How do I get two fixed digits after the period?

Click on the KCalc button, this will bring up the configuration dialog. Click on "Set Fixed Precision" and adjust the spin control so that it shows a 2.

### 8.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 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 on KCalc's configure dialog so that the above computation go through correctly. I recommend a precision of 14 if the fundamental data type for your copy of KCalc is long double, otherwise 8 or 10.

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

Next Previous Table of Contents