This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]