Boost C++ Libraries: Ticket #4011: Strange bug may be associated with rounded_transc_opp policy https://svn.boost.org/trac10/ticket/4011 <p> When I evaluate the following expression: a = Interval(1.0, 3.0)<br /> exp( a * log(0.001) )<br /> </p> <p> I receive the result [nan ~ nan] when I select the rounded_transc_opp policy. However, if I select the rounded_transc_exact all goes well and I receive the expected result: [1E-9 ~ 0.001] </p> <p> If I select the rounded_transc_opp policy and evaluate the expression:<br /> exp( a * log(0.0001) ) all works well and I receive the expected result: [1E-12 ~ 0.0001] also works well for:<br /> exp( a * log(0.0011) ) but not with:<br /> exp( a * log(0.00101) ) </p> <p> I hope that someone can look at this problem, since this is really a very strange situation. </p> <p> Keep up with this excellent work and best regards... </p> <p> Vitor </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4011 Trac 1.4.3 Steven Watanabe Mon, 15 Mar 2010 22:09:04 GMT <link>https://svn.boost.org/trac10/ticket/4011#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4011#comment:1</guid> <description> <p> According to the documentation: </p> <p> The classes rounded_transc_exact, rounded_transc_std and rounded_transc_opp expect the std namespace to provide the functions exp log cos tan acos asin atan cosh sinh tanh acosh asinh atanh. For the _std and _opp versions, all these functions should respect the current rounding mode fixed by a call to downward or upward. </p> <p> Please note: Unfortunately, the latter is rarely the case.... </p> </description> <category>Ticket</category> </item> <item> <author>Vitor Vieira Lopes <vitor.lopes@…></author> <pubDate>Mon, 15 Mar 2010 22:41:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4011#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4011#comment:2</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/4011#comment:1" title="Comment 1">steven_watanabe</a>: </p> <blockquote class="citation"> <p> According to the documentation: </p> <p> The classes rounded_transc_exact, rounded_transc_std and rounded_transc_opp expect the std namespace to provide the functions exp log cos tan acos asin atan cosh sinh tanh acosh asinh atanh. For the _std and _opp versions, all these functions should respect the current rounding mode fixed by a call to downward or upward. </p> <p> Please note: Unfortunately, the latter is rarely the case.... </p> </blockquote> <p> But how this can account for the apparently inconsistent behavior? Note that for some values I do not have any problem when I use the _opp version while others are problematic. In the examples, the value 0.0011 works well but 0.001 does not. It seems to me that this should not present any type of numerical issue due to the values involved. </p> </description> <category>Ticket</category> </item> <item> <author>smr@…</author> <pubDate>Fri, 04 Jun 2010 07:33:47 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4011#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4011#comment:3</guid> <description> <p> Seems to still be a problem in Boost 1.42: see the report from Debian: <a class="ext-link" href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584325"><span class="icon">​</span>http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584325</a> </p> </description> <category>Ticket</category> </item> <item> <author>smr@…</author> <pubDate>Fri, 04 Jun 2010 07:35:22 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4011#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4011#comment:4</guid> <description> <p> By the way, the Debian user reports that his code does work as expected on 32 bits, but fails on 64 bits. </p> </description> <category>Ticket</category> </item> </channel> </rss>