Hello,
Can we discuss methods of doing signed math in decimal (at least from the user's perspective), like TIOS does, in z80 assembly? Assume you have no help from the OS.
Well, if you want to do signed floating-point math, the first thing you need to do is establish your representation. Exponent, sign, and mantissa? Binary mantissa or BCD mantissa? How many bytes or digits of precision? TI-style numbers? IEEE 754-style numbers? Something else?
Can you elaborate on what all of these are, their pros and cons, and what you recommend? I don't know much about the subject.
What Every Computer Scientist Should Know About Floating-Point Arithmetic may provide some useful information, as does the Wikipedia article on floating point.

TI uses a packed decimal format which is better for representing decimal numbers (0.1 cannot be represented as a binary floating-point number, for example) but is slower for a binary computer to work with.
Thanks for the links, I'll be sure to check those out Smile
SirCmpwn wrote:
Thanks for the links, I'll be sure to check those out Smile
Indeed, those are very helpful. Here's the article specifically on IEEE 754:

http://en.wikipedia.org/wiki/IEEE_754-2008
iirc, there are some free z80 floating point libraries floating around teh internetzen. It is still a good idea to be informed about how it works though, particularly IEEE 754. (or the details of whatever lib you end up using).
For what it's worth, we discussed a lot of stuff relevant to this topic on Have Calc, Will Program with myself and graphmastur last night, particularly where to go once you have the numeric format figured out. We also briefly discussed some TI-OS USB stuff, but that's a topic for another thread.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement