# Dividing a signed double by another, result to be a signed double ?

bob_g4bby
Posts:

**257**
in ForthSpace

## Comments

556Hi Bob,

Do you know the possible range of these numbers? Normally even 16 bits are more than adequate for physical data, because noise does not allow higher resultion. I try to use scaling and use the */ operator.

257I also suspect excessive precision is being used - for now I'm following the recipe in the data sheet before refining it. I've written all the other 64 bit signed operators required, but can't remember how to do multi-cell signed division. There's a worked example to try after I've reproduced all the complicated formulae, if I get the same result, then I can experiment with simplifying the math.

12,021Your friend is Spin's muldiv64(). Make a version of that in Forth and you'll be racing.

Here's a Spin version with rounding to nearest, I named

`muldiv65()`

- https://forums.parallax.com/discussion/comment/1525687/#Comment_1525687And the subsequent update for IEEE de-biasing method of an exact 0.5 rounding - https://forums.parallax.com/discussion/comment/1529224/#Comment_1529224

257That's a good tip, thanks Evanh, I'll try that