# I'm rewriting the amount class in beem for using fixed-point arithmetic I’m currently rewriting the Amount class of beem, my python library for steem. The amount class represents STEEM, SBD and VESTS amounts:

will results in

Currently, a float number is internally used to
represent STEEM and SBD amounts. I’m trying to improve this by using the decimal class.

## What will change

STEEM and SBD are fix point numbers, which means that they are basically integers.

6.104 STEEM can be represent as 6104. When I now divide or multiply, I could round the amount to an integer.

When I now divide the amount by 6, and multiply it again by 6, I will have the following operations:

which will be

Which has the meaning, we have 6.104 STEEM and want it divide by 6, so that 6 accounts can receive the same amount. As this is not possible, we need to send 0.002 STEEM first to @null and then it can be done.

In the same way, when I try to add 0.0001 to 6.104 STEEM, the amount will not change, no matter who often I add 0.0001 to 6.104 STEEM. As 0.0001 STEEM are not valid, it means basically that I try to add 0 STEEM to 6.104 STEEM. Thus, the amount will not change, no matter how often I try to add 0.0001.

### What will change

The results of multiplication and addition may be different.

Before, the output of this equation was 6.105 STEEM

Before, the output was 6.104 STEEM

## What do you think?

Are my planed changes to the Amount class usefull? As the amount is a fixed point number, fixed point arithmetic should be applied, or?