Re: [cc65] bug?

Date view Thread view Subject view

From: Mike McCarty (jmccarty_at_ssd.usa.alcatel.com)
Date: 2001-01-02 18:32:37


On Thu, 14 Dec 2000, Groepaz wrote:


> > > a) 16bit unsigned 'addresses'
> > > b) 16bit signed 'variables'
> > > c) 8.8 signed fixed-point 'variables'
> > >
> > > math functions should take and return variables in 8.8 format, whereas the user
> > > would be responsible to properly convert them forth and back.
> > 
> > This would really be a *very* special feature. Calculating
> > 
> >         sin (PI / 2)
> > 
> > starts getting troublesome if you have to specify PI in 8.8 signed fixed point
> > format...
> 
> nononononono.... you just DONT calculate 'PI/2' ;=D
> 
> i forgot to mention in this system of making calculations, 
> 360degrees = $100
> 
> trig. functions take 'degrees' as args, not radients (uhm, this is where my 
> english knowledge leaves me hahaha ;/)
> 
> so instead of
> 
> sin(PI/2)
> 
> you'd use
> 
> sin($80/2)
> 
> dont forget what you'd actually do with the values you'd calculate.... after-
> all in most cases you would handle them as if they were fixedpoint values,
> due to the fact you need to keep them within a certain 8bit range. (again, i
> have yet to hear of a case where floats would make sence)

Sorry to reply so late. I've been on vacation :)

It is *very* common to measure angles so that full_circle = 2^n where n
is the number of bits in the integral portion of the measure. One can
use pure integers, in which case angles are measured in increments of
1/65536 of a full circle (0.00549 degrees, or 0.0000959 radians).

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:37 CET