From kde-devel Fri Apr 28 16:34:58 2006 From: Dmitry Suzdalev Date: Fri, 28 Apr 2006 16:34:58 +0000 To: kde-devel Subject: Re: [OFFTOPIC] std::numeric_limits::min() question. Message-Id: <200604282034.58929.dimsuz () gmail ! com> X-MARC-Message: https://marc.info/?l=kde-devel&m=114624541119927 Hi, Richard! On Thursday 27 April 2006 01:43, Richard Smith wrote:> You could store a flag to indicate whether this is the first time through> the loop, and if so then set maxd. Or you can use this:>> š double minDbl = -std::numeric_limits::max();>> This will work for all IEEE-754 compliant systems (x86, x86_64, Solaris,> etc), and it's what I use at work (where those are the only platforms we> support), but it is a little messy.Well, as the project I'm developing this for is supposed to be used only on x86 systems, i think that using -max() + somekind of warning in code is the way I'll choose :). Thanks a lot for advice!Dmitry. >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<