On Linux Fedora 17 (64bit) all tests are passed
Environment: Mysql 5.5.27; g++ 4.7.2

So it can be MSVS2010 issue.
Can anybody confirm?

2012/9/25 Sergei Nikulov <[email protected]>

> It looks like no more out of range for floating point on MSVC2010 :)
> Need to check it with latest gcc. Will try it soon.
>
>
> 2012/9/25 Pawel Aleksander Fedorynski <[email protected]>
>
>>
>> I'm aware of the existence of floating point infinity, but I doubt that
>> it is a correct behavior for istringstream to read inf from a string
>> containing a number our of range.
>>
>> Thanks,
>>
>> Aleksander
>>
>>
>> On Tue, Sep 25, 2012 at 12:32 PM, Sergei Nikulov <
>> [email protected]> wrote:
>>
>>>
>>>
>>> Here the some information on this matter
>>>
>>> http://stackoverflow.com/questions/11299992/divide-by-zero-prevention
>>>
>>> http://stackoverflow.com/questions/7267838/division-by-zero-does-not-throw-sigfpe
>>>
>>>
>>>
>>>
>>> 2012/9/25 Pawel Aleksander Fedorynski <[email protected]>
>>>
>>>>
>>>> Hi Sergei,
>>>>
>>>> I'll try to confirm whether it's a bug in MSVC or an
>>>> implementation-defined behavior, but in any case, seems to me that the
>>>> correct behavior is not to put infinity in the variable in such case.  We
>>>> should check for infinity (and probably also NaN for good measure) in
>>>> parse_num in src/backends/mysql/common.h and thow an exception if we see it
>>>> as a conversion result.
>>>>
>>>> I'm going to wait a couple of days to see if anyone objects and then
>>>> I'll make this change.
>>>>
>>>> Thanks,
>>>>
>>>> Aleksander
>>>>
>>>>  On Tue, Sep 25, 2012 at 8:36 AM, Sergei Nikulov <
>>>> [email protected]> wrote:
>>>>
>>>>>  Hi All,
>>>>>
>>>>> I'm plaing with MySQL backend for a while and found that following
>>>>> test case is failed for Windows7+MSVC2010+MySQL 5.5.27
>>>>>
>>>>>
>>>>> test_num<double>("99999999999999999999999912222222222222222222222222223"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333"
>>>>>
>>>>> "9999999999999999999999991222222222222222222222222222333333333333",
>>>>>         false, 0);
>>>>>
>>>>>
>>>>> This conversion yelds positive infinity value.
>>>>>
>>>>> Test case actually failed with one reason - conversion to double from
>>>>> this string does not throw exception but return 1.INF0000.
>>>>>
>>>>> So my question as follows - what is better way to solve this?
>>>>>
>>>>> Should SOCI throw exception in case of
>>>>> numeric_limits<double>::infinity() or we should just update test case
>>>>> to handle this situation?
>>>>>
>>>>> Thank you.
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Sergey Nikulov
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Live Security Virtual Conference
>>>>> Exclusive live event will cover all the ways today's security and
>>>>> threat landscape has changed and how IT managers can respond.
>>>>> Discussions
>>>>> will include endpoint security, mobile security and the latest in
>>>>> malware
>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>>> _______________________________________________
>>>>> Soci-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/soci-users
>>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Live Security Virtual Conference
>>>> Exclusive live event will cover all the ways today's security and
>>>> threat landscape has changed and how IT managers can respond.
>>>> Discussions
>>>> will include endpoint security, mobile security and the latest in
>>>> malware
>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>> _______________________________________________
>>>> Soci-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/soci-users
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Sergey Nikulov
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Soci-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/soci-users
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Soci-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/soci-users
>>
>>
>
>
> --
> Best Regards,
> Sergey Nikulov
>



-- 
Best Regards,
Sergey Nikulov
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to