[Coco] [Color Computer] Multiple C compiler projects

James Jones jamesjones01 at mchsi.com
Mon Jul 18 06:50:12 EDT 2005


Gene Heskett wrote:
> Is that not pretty well handled by the pd trig library, donated by the 
> South American who died shortly after pd-ing his code in the rainbow?
> I've used that library extensively and its at least as good as my 
> TI-51 in terms of accuracy of the stuff I actually checked.  It gives 
> a 1 byte exponent, and enough of a mantissa that answers to the 16th 
> digit, sometimes the 17th, can be obtained via a suitable printf 
> statement.
> 
> This also has the advantage of not being radisys's code.

Hmmm. I either didn't read RAINBOW as closely as I should, or I've 
totally forgotten about that library. What issue was that in?

It, or any floating-point library, presumes a particular format for the 
numbers. Googling "6809 trig library" shows an earlier message in which 
you mention using the library in C--that implies that either it worked 
on floating point in the format that the Microware 6809 C compiler used, 
or it used a different format and either you or the library's author 
wrote functions to convert to and from that format. In any case, one can 
independently write code to use the same floating point format that the 
Microware C compiler uses. Doing so would have the advantage that 
existing binary data that people have generated using that format would 
still be usable without conversion. IEEE format has some advantages (an 
additional significant bit for normalized numbers), and some 
disadvantages (it would take additional code to deal with the NaN and 
Infinity values).

	James Jones



More information about the Coco mailing list