Re: A85: Mathmatical routines


[Prev][Next][Index][Thread]

Re: A85: Mathmatical routines



BCD is short for Binary Coded Decimal, and it is way to store binary
numbers between 0 and 99 which makes it easy to display them. Each nibble
of a byte holds a hex digit between 0 and 9, so 14 would be stored as 14h
or 00010100b. This kind of numbers are nice when you want to print your
numbers, but they have nothing to do with floating point numbers except
for the fact the TI has decided to store the digits of a fp number in bcd.

You can find the format of the FP numbers the TI uses on ticalc.

I while ago i send a list of math rutines found in the ro to this list,
this includes a sqrt function. You could use that one, but since no shell
supports it you would have to take care of the differences between the
roms yourself (this might sound a bit complicated, but it is not).

If you need floating point numbers you are probably best of using the
build in rutine. 

Dines

_______________________________________

Dines Justesen
Email: dines@post1.com or
       c958362@student.dtu.dk
WWW  : http://www.gbar.dtu.dk/~c958362/
_______________________________________

On Mon, 17 Nov 1997, Richardlewis wrote:

> Did't someone say they had a bunch of z80 math functions a while ago?  I've
> been looking for a way to do floating point math for a tank wars type game. 
> Specifically, I am looking for a good square root function that works with
> floats. 
>  
> I also heard something about BCD numbers being floating point numbers. 
> Does anybody know what a BCD number is?  I know the processor can handle them,
> but what are they? 
> 
> 


References: