$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [conversion] Using Lexical_cast to convert string to float
From: Ryan McConnehey (mccorywork_at_[hidden])
Date: 2009-06-10 02:32:09
Steven Watanabe wrote:
> The problem is in the standard library. (Tested with msvc 9.0
> express--gcc 4.3.0 behaves sensibly).
So, Microsoft's implementation is off? It wouldn't be that surprising
though. :-)
> ss: true, val: 1.#INF
> ss: false, val: -9.25596e+061
It looks like the "3.4e350" gets converted to a valid value (for
doubles) and the only way to determine if it was out of range is to do a
cast on the stream itself. Is this what lexical_cast does internally?
Ryan