>> On Mon, 13 Aug 2018 at 19:46, Duncan Roe wrote:
>>>
>>> On Mon, Aug 13, 2018 at 12:52:48PM -0400, Stephen John Smoogen wrote:
>>> > On Mon, 13 Aug 2018 at 11:16, Masamichi Hosoda
>>> > wrote:
>>> [...]
>>> > On Fedora 27 with 7.3.1 it gives
>>> > ```
>>> > stod ("nan") = nan
>>> > stod ("-nan
> On Mon, 13 Aug 2018 at 19:46, Duncan Roe wrote:
>>
>> On Mon, Aug 13, 2018 at 12:52:48PM -0400, Stephen John Smoogen wrote:
>> > On Mon, 13 Aug 2018 at 11:16, Masamichi Hosoda
>> > wrote:
>> [...]
>> > On Fedora 27 with 7.3.1 it gives
>> > ```
>> > stod ("nan") = nan
>> > stod ("-nan") = nan
>
On Mon, 13 Aug 2018 at 19:46, Duncan Roe wrote:
>
> On Mon, Aug 13, 2018 at 12:52:48PM -0400, Stephen John Smoogen wrote:
> > On Mon, 13 Aug 2018 at 11:16, Masamichi Hosoda wrote:
> [...]
> > On Fedora 27 with 7.3.1 it gives
> > ```
> > stod ("nan") = nan
> > stod ("-nan") = nan
> > quiet_NaN ()
On Mon, Aug 13, 2018 at 12:52:48PM -0400, Stephen John Smoogen wrote:
> On Mon, 13 Aug 2018 at 11:16, Masamichi Hosoda wrote:
[...]
> On Fedora 27 with 7.3.1 it gives
> ```
> stod ("nan") = nan
> stod ("-nan") = nan
> quiet_NaN () = nan
> ```
[...]
Same with Slackware 14.2 / gcc (GCC) 5.3.0
--
P
On Mon, 13 Aug 2018 at 11:16, Masamichi Hosoda wrote:
>
> Hi
>
> I've found a curious behavior about `std::stod ("nan")` on Cygwin.
> Only on Cygwin, `std::stod ("nan")` returns negative NaN.
> On Linux etc., `std::stod ("nan")`
Hi
I've found a curious behavior about `std::stod ("nan")` on Cygwin.
Only on Cygwin, `std::stod ("nan")` returns negative NaN.
On Linux etc., `std::stod ("nan")` returns positive NaN.
Here is a reproduction code.
```
// g++ -std=c++11 foobar.cc
#inc
6 matches
Mail list logo