Jump to content
IGNORED

compiled languages on 8bit computers


kisrael

Recommended Posts

Floating point is most useful when you have to deal with numbers over a wide range of magnitudes. (e.g. calculating the kninetic energy of an electron travelling at half the speed of light)

 

But in a game you typically need numbers over a finite range (i.e. +/- 1,000,000 to a precision of 0.000,001), which is exactly what fixed point provides.

Link to comment
Share on other sites

Floating point is most useful when you have to deal with numbers over a wide range of magnitudes. (e.g. calculating the kninetic energy of an electron travelling at half the speed of light)

 

But in a game you typically need numbers over a finite range (i.e. +/- 1,000,000 to a precision of 0.000,001), which is exactly what fixed point provides.

float is most useful when you have existing source code that depends on it and you don't want to rewrite it to port the software.

Link to comment
Share on other sites

float is most useful when you have existing source code that depends on it and you don't want to rewrite it to port the software.

In which case there may be some value in mapping various float sizes to fixed point lengths. i.e. single -> 8.8, float -> 16.16, double -> 32.32

Link to comment
Share on other sites

float is most useful when you have existing source code that depends on it and you don't want to rewrite it to port the software.

 

 

That is undeniably true, but it misses the point. You could make that argument about any number of things. For the general case, though, I don't consider floats a good utility/performance tradeoff in an 8bit compiler.

Edited by danwinslow
Link to comment
Share on other sites

float is most useful when you have existing source code that depends on it and you don't want to rewrite it to port the software.

 

 

That is undeniably true, but it misses the point. You could make that argument about any number of things. For the general case, though, I don't consider floats a good utility/performance tradeoff in an 8bit compiler.

No it doesn't. What you say is true but you still can't take a program and port it from one machine to the next without creating some sort of custom library for every machine you want it to run on and existing software will need to be rewritten to port it.

 

You can actually use whatever decimal representation you want behind the scenes and the compiler could use it as a float library without software knowing the difference unless it requires more significant digits than your math lib.

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...