This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Floating point problems with 68000 (no FPU)
- From: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- To: Doug Broadwell <dougb at value dot net>
- Cc: Newlib Mail List <newlib at sources dot redhat dot com>
- Date: Mon, 18 Nov 2002 15:42:31 -0600
- Subject: Re: Floating point problems with 68000 (no FPU)
- Organization: OAR Corporation
- References: <001101c28f44$9e3867c0$3cfea8c0@dba03>
Doug Broadwell wrote:
>
> I just started using the newlib floating point library with the following
> results:
>
> sqrt(2) = 1.414213
> sqrt(10) = 10.000002
> sqrt(100) = 0.000000
> sqrt(10000) = 0.000000
>
> In one test sqrt(100)
> = -7239...............................................................0,
> some 160 character long number.
>
> I'm using printf("%f", sqrt(n)) for these results.
>
> Any suggestions on how to debug?
Did you include math.h? Not getting a proper prototype would
be a simple and common problem.
> Thanks, Doug Broadwell
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985