This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: RE: ecos-discuss Digest 20 Jul 2010 07:45:58 -0000 Issue 3294
- From: "Byron Jacquot" <BJacquot at vestatech dot com>
- To: <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 20 Jul 2010 16:53:02 -0600
- Subject: RE: [ECOS] RE: ecos-discuss Digest 20 Jul 2010 07:45:58 -0000 Issue 3294
> Hi ,
>
> We are using the example program in the following way.
>
>
> double x = 3.0, result;
> result = sqrt(x);
> diag_printf("\nThe square root of x=%lf is result=%lf\n",
> x,result);
>
>
> The Result is in the following way with out any values.
>
> The square root of x=%f is result=%f
>
> Thank you,
> S.Ramesh Chandra.
>
In the link posted previously, there was discussion that mentioned that
diag_printf doesn't have floating support. The %f's just pass right
through.
You'll need to switch to plain printf, and verify that it has the
floating point option enabled, or do some additional conversion to turn
your floats into strings, and send them out using %s.
Byron Jacquot
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss