Re: [AD] [ alleg-Bugs-1650580 ] Problem in fixed point library.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sunday 04 February 2007 7:30 am, Elias Pschernig wrote:
> On Mon, 2007-02-05 at 01:18 +1100, Peter Wang wrote:
> > On 2007-02-04, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > > I'll apply the below patch if nobody objects - the bug reporter claims
> > > to have tested it, and LONG_LONG also is used for fixmul so should
> > > cause no problem here.
> > >
> > > Index: include/allegro/inline/fmaths.inl
> > > ===================================================================
> > > --- include/allegro/inline/fmaths.inl   (revision 7706)
> > > +++ include/allegro/inline/fmaths.inl   (working copy)
> > > @@ -151,7 +151,7 @@
> > >        return (x < 0) ? -0x7FFFFFFF : 0x7FFFFFFF;
> > >     }
> > >     else
> > > -      return ftofix(fixtof(x) / fixtof(y));
> > > +      return ((LONG_LONG)x << 16) / (LONG_LONG)y;
> > >  })
> >
> > Didn't we discuss the fixed point functions on allegro.cc last year or
> > so?  Don't apply this just yet.
>
> Yes, found it here: http://www.allegro.cc/forums/thread/488085
>
> And thinking about it, there actually is nothing wrong with using float
> as implied by the bug report. So, as the float is faster according to
> that thread, indeed nothing should be changed then (until someone comes
> up with a test to prove the opposite).

if its really fixed math, it really aught to be fixed. Whats the point in 
implementing a fixed point math api with floating point operations? 
especially for platforms that don't have a fpu (ie: nds).

> --
> Elias Pschernig
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/