i think so if i m not getting u wrong it can be done by using %.3f in place
of %f

On 5/26/09, peternilsson42 <[email protected]> wrote:
>
>
>
> [I'm too lazy to fix the top post today, context elided.]
>
> --- In [email protected] <c-prog%40yahoogroups.com>, Jos Timanta
> Tarigan <jos_t_tari...@...> wrote:
> >
> > anyway, is there a way to make my program only works on
> > eg. 3 decimal precision? so in result, everytime I do a
> > floating point precision, it always truncated after 3
> > decimal.
>
> Maybe look at 'fixed point' if that's the case. [Note
> that multiplying by 1024 (or some power of two) and then
> dividing is probably better than using 1000.]
>
> But why bother? If you recognise that -cos(x+pi/2) == sin(x),
> then the problem goes away for the case you mentioned. You
> should be reducing your number of computations, not
> increasing them.
>
> In any case, what is the impact of directionZ being
> 1.000001 (or 0.999999, or whatever,) instead of exactly 1?
>
> --
> Peter
>
> 
>



-- 
shruti dixit


[Non-text portions of this message have been removed]

Reply via email to