--===============1469540671== Content-Type: multipart/signed; boundary="nextPart6544181.9JLzD9W1tr"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart6544181.9JLzD9W1tr Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Dmitry Suzdalev wrote: >double maxd =3D std::numeric_limits::min(); >Gdb shows me that after initialisation 'maxd' is a _positive_ (and of > course huge) value! >Isn't it meant to be negative (despite of how it's internally stored in >"internals")? :) > >Note, that if I change the second line to > >double maxd =3D - std::numeric_limits::max(); > >then all works as I expect! >But I'd rather do without such tricks and write the code that's > straitforward and less messy ;). > >What am I getting wrong? I'm sorry, but the first thing you should do, before posting a message to=20 a mailing list, is to think "have I researched enough? will I make myself=20 look stupid if I post this question?" As it turns out, you did not do your homework. Googling=20 for "std::numeric_limits" yields the APIDOX for libstdc++: http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/structstd_1_1numeric= __limits.html If you click "min", you get the following description: The minimum finite value, or for floating types with denormalization, the=20 minimum positive normalized value. So there's your explanation: std::numeric_limits::min() is the=20 minimum positive value. =2D-=20 Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org thiago.macieira (AT) trolltech.com Trolltech AS GPG: 0x6EF45358 | Sandakerveien 116, E067 918B B660 DBD1 105C | NO-0402 966C 33F5 F005 6EF4 5358 | Oslo, Norway --nextPart6544181.9JLzD9W1tr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBET9jGM/XwBW70U1gRAoUHAKCNlKOaDsEcTXLfYOfbJlq5UsrpegCdFx92 yp9trEYwogd/hNxwMG9PwD4= =yQ54 -----END PGP SIGNATURE----- --nextPart6544181.9JLzD9W1tr-- --===============1469540671== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============1469540671==--