Boost logo

Boost Users :

From: yinglcs2_at_[hidden]
Date: 2006-02-25 12:51:44


Sorry, you are right. that code compiles fine. I made
a mistake somewhere else.

You mention "be careful with literal floating
 point comparisons in general.". I thought doing
float point == comparision is bad. But I am just doing
less than (<), so i am okay. Is that true?

--- Kevin Heifner <heifner_k_at_[hidden]> wrote:

> yinglcs2_at_[hidden] wrote:
> > What is the easiest way to use boost::lambda
> library
> > with count_if to count how many item is less than
> > 0.05?
> >
> > I try the following, but that not work:
> > int no = count_if(myList.begin() myList.end(), _1
> <
> > 0.05);
>
> I think we are going to need more information. Can
> you provide
> more of the code? This looks fine except you are
> doing a literal
> floating point comparison. Be careful with literal
> floating
> point comparisons in general.
>
> KevinH
> --
> Kevin Heifner heifner @ ociweb.com
> http://heifner.blogspot.com
> Object Computing, Inc. (OCI)
> www.ociweb.com
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
>
http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net