Thanks for the info and clarification on the Mathlib
issues.
Any ideas about the problem with the floats? Why sqrt
is returning zero? I'd really prefer to get the
individual functions working, for size reasons and to
avoid the whole Mathlib thing if I can.
I think I posted last week about how the float results
from Mathlib were incorrect also, but I'll have dig up
that test data and re-post.
--- In [EMAIL PROTECTED], Brian Preston
<[EMAIL PROTECTED]> wrote:
> Re: Mathlib : I can make and provide a Mathlib zip,
no
> prob. But I'm still a little confused by your last
> statement about 'directly linking to sources' - how
is
> that different from using the functions via the
> Mathlib header?
>
> Re: the sqrt/float stuff. Here's my little test code
:
>
>
> static void testSqrt() {
> double yarr[] = {0, 1, 2, 3, 4, 5, 6, 7, 8 };
> double xarr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9 };
> int k;
> double x,y,z;
>
> for (k = 0; k < sizeof(yarr); ++k) {
> x=xarr[k];
> y=yarr[k];
> z = __ieee754_sqrt((y*y)+(x*x));
> }
> }
>
> z is always zero. I've just added the e_sqrt.c file
> from FDLibM in my source files. I didn't use the
> w_sqrt.c (I think w stands for wrapper, since it
just
> calls the ieee version) because of linking errors
that
> I couldn't resolve.
>
> Thanks,
>
> Brian Preston
>
> --- In [EMAIL PROTECTED], Ben Combee
> <[EMAIL PROTECTED]> wrote:
> > At 11:33 2003-2-5 -0800, you wrote:
> > >I'm getting wrong results from a couple basic
> > >functions (atan and sqrt) that I've gotten from
the
> > >FDLibm library. The sqrt function simply returns
> zero
> > >every time. I have results from the atan()
function
> > >also (if anyone's interested), but since I'm
having
> > >problems with more than one function, it seems to
> be a
> > >more systemic problem.
> >
> > I would be interested in getting a test case of
the
> sqrt function failure
> > so we can see if there is a problem with our code
> generation.
> >
> > >I'm using CW 8. Are there any 'tricks' to using
> > >floats, any settings or flags in the compiler,
> > >hardware/software FP libraries, that have to be
> turned
> > >on in order to get floats to work right?
> >
> > There are no math settings that would affect this
in
> V8 other than "8-byte
> > doubles" in the 68K Processor panel -- that should
> be checked (on).
> >
> > >I can't use Mathlib because I want to sell the
app
> I'm
> > >writing - is that a correct legal interpretation
of
> > >the Mathlib license? Or can I use it, but I just
> have
> > >my users install it separately? Can I sell a zip
> file
> > >that has Mathlib and my app separately?
> >
> > MathLib can be sold. The only restriction on your
> program when using
> > MathLib as shared library is that you need to
> provide the MathLib source
> > and build projects on request. By providing a
> download link on your site
> > to a MathLib.zip file with everything from the CW
> MathLib folder, you
> > fulfill that obligation. Since you aren't
directly
> linking to MathLib
> > sources, your code does not fall under any GPL or
> LGPL obligations.
> >
> > --
> > Ben Combee <[EMAIL PROTECTED]>
> > CodeWarrior for Palm OS technical lead
> > Palm OS programming help @ www.palmoswerks.com
> >
> >
> > --
> > For information on using the Palm Developer
Forums,
> or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
now.
> http://mailplus.yahoo.com
>
> --
> For information on using the Palm Developer Forums,
or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/