Fixed point arithmetic is done using a set number of decimal places. It can be faster and is more precise than floating-point.
11
votes
3answers
2k views
0
votes
1answer
29 views
Round division to two decimal places [closed]
I'm working on a revision of my electrical calculator. I used string formatting to round the answers it gives to two decimal places. On the operations that require multiplication (voltage, wattage), ...
5
votes
2answers
238 views
BigDecimal made Simple
Here is my take on (lighter version of) Java's BigDecimal.
Originally I wrote this as a replacement for BigDecimal in order to improve performance during serialisation and data manipulation.
...
4
votes
1answer
88 views
Followup: How do I optimize this Java cube root function for BigInteger?
Followup to How do I optimize this Java cube root function for BigInteger?
So I've tried several implementations of this algorithm. The version using only BigInteger sometimes results in a ...
7
votes
1answer
175 views
How do I optimize this Java cube root function for BigInteger?
I find that this function is one of the biggest causes of slow program execution. I can write a square root version with BigInteger only, but with the cube root, the algorithm sometimes gets caught in ...