Jump to content
IGNORED

Fixed numbers in intybasic v1.2.9


artrag

Recommended Posts

Apart the bug spotted elsewhere that leads this kind of expressions #ex(0) = -1.0+.#ex(0) to fail, it seems that it is missing a proper support to multiplications/divisions.

 

I was trying to multiply a fixed point number by a constant, but due to the fact that the fractional part in in the high byte, normal multiplication fails...

Is there a dedicated multiplication for 8.8 fixed point numbers ? BTW what is the reason for this inversion (high/low byte)?

 

Am I missing something or the support for fixed point numbers is just immature in v1.2.9 ?

Link to comment
Share on other sites

Apart the bug spotted elsewhere that leads this kind of expressions #ex(0) = -1.0+.#ex(0) to fail, it seems that it is missing a proper support to multiplications/divisions.

 

I was trying to multiply a fixed point number by a constant, but due to the fact that the fractional part in in the high byte, normal multiplication fails...

Is there a dedicated multiplication for 8.8 fixed point numbers ? BTW what is the reason for this inversion (high/low byte)?

 

Am I missing something or the support for fixed point numbers is just immature in v1.2.9 ?

Perhaps the multiplication by constant uses the macro Joe Z. and I worked on which assumed 16-bit integers.

Link to comment
Share on other sites

I'm afraid I forgot completely about the fixed point number support in IntyBASIC.

 

Supposedly it would have helped to integrate fractions to ease writing of Asteroids-like game but the support come with far too many bugs because it was too early.

Link to comment
Share on other sites

Well, once you fix addition and subtraction by constants, product of two 8.8 numbers is just a 32 bit multiplication where you keep the upper 16 bits as result.

 

You need

+.

-.

*.

/.

 

 

But, why the up/down bytes inversion? Does it help somehow?

Edited by artrag
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...