Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   how to avoid ftol (http://www.velocityreviews.com/forums/t458244-how-to-avoid-ftol.html)

 quickcur@yahoo.com 11-08-2006 04:55 AM

how to avoid ftol

I used Rational Quatif and found that my program spent a lot of time on
a funciton called "ftol". How can I avoid it?

Thanks,

qq

 Steve Pope 11-08-2006 05:03 AM

Re: how to avoid ftol

quickcur@yahoo.com <quickcur@yahoo.com> wrote:

>I used Rational Quatif and found that my program spent a lot of time on
>a funciton called "ftol". How can I avoid it?

You may want to look at this:

S.

 Roland Pibinger 11-08-2006 07:45 AM

Re: how to avoid ftol

On 7 Nov 2006 20:55:33 -0800, quickcur wrote:
>I used Rational Quatif and found that my program spent a lot of time on
>a funciton called "ftol". How can I avoid it?

What does ftol?

 Rolf Magnus 11-08-2006 05:27 PM

Re: how to avoid ftol

quickcur@yahoo.com wrote:

> I used Rational Quatif and found that my program spent a lot of time on
> a funciton called "ftol". How can I avoid it?

Well, the obvious answer would be to replace "ftol" with something that does
the same (whatever that is), but faster.

 mlimber 11-08-2006 05:31 PM

Re: how to avoid ftol

quickcur@yahoo.com wrote:
> I used Rational Quatif and found that my program spent a lot of time on
> a funciton called "ftol". How can I avoid it?

Don't convert between float and longs (implicitly or explictly) unless
you need to. Do all your computations in float and then, if necessary,
convert everything to longs at the end, for instance.

Cheers! --M

 All times are GMT. The time now is 11:04 PM.