<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div>Just curious - isn't the piece in question C++ code ?</div><div id="yui_3_16_0_1_1433347658656_3028"><br></div><div id="yui_3_16_0_1_1433347658656_3029">If yes, isn't the RHS of type double or complex, i.e. of a floating point opposed to integer type.</div><div><br></div><div dir="ltr" id="yui_3_16_0_1_1433347658656_3207">If yes, won't log(7) be automatically promoted to  log(7.0) by the C++ compiler ?</div><div id="yui_3_16_0_1_1433347658656_3301" dir="ltr"><br></div><div id="yui_3_16_0_1_1433347658656_3387" dir="ltr">I.e. does "GiNaC does not apply numerical evaluation automatically" apply ?</div><div id="yui_3_16_0_1_1433347658656_3388" dir="ltr"><br></div><div id="yui_3_16_0_1_1433347658656_3389" dir="ltr">--Sergei.<br></div><div id="yui_3_16_0_1_1433347658656_2914"><span></span></div><br> <blockquote id="yui_3_16_0_1_1433347658656_2910" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div id="yui_3_16_0_1_1433347658656_2909" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1433347658656_2908" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1433347658656_2907" dir="ltr"> <hr size="1">  <font id="yui_3_16_0_1_1433347658656_3206" face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Alexei Sheplyakov <alexei.sheplyakov@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> GiNaC development list <ginac-devel@ginac.de> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, June 3, 2015 6:01 PM<br> <b id="yui_3_16_0_1_1433347658656_3211"><span id="yui_3_16_0_1_1433347658656_3210" style="font-weight: bold;">Subject:</span></b> Re: [GiNaC-devel] Patches for compilation with MSVC<br> </font> </div> <div id="yui_3_16_0_1_1433347658656_3200" class="y_msg_container"><br>Hi, Jan,<br clear="none"><br clear="none">I'm afraid your patch is not quite correct.<br clear="none"><br clear="none">-       ex e2 = log(7)+log(p)+log(pow(q,3))+log(-z*a*w*pow(b,2));<br clear="none">+       ex e2 = log(7.0)+log(p)+log(pow(q,3))+log(-z*a*w*pow(b,2));<br clear="none"><br clear="none">log(7) is an exact quantity, and log(7.0) is not (it's a floating<br clear="none">point number). In general<br clear="none">GiNaC does not apply numerical evaluation automatically. Could you<br clear="none">please try replacing<br clear="none">log(7) with log(ex(7))?<br clear="none"><br clear="none">Best regards,<br clear="none">      Alexei<br clear="none"><br clear="none"><br clear="none">On Mon, May 25, 2015 at 3:32 PM, Jan Rheinländer <<a shape="rect" ymailto="mailto:jrheinlaender@gmx.de" href="mailto:jrheinlaender@gmx.de">jrheinlaender@gmx.de</a>> wrote:<br clear="none">> Hi,<br clear="none">><br clear="none">> here are some simple patches to allow the current version (from git) of<br clear="none">> GiNaC to be compiled with MS Visual C++:<br clear="none">><br clear="none">> 1. Fix problem with min() and max() macros in MSVC:<br clear="none">><br clear="none">> --- a/ginac/compiler.h<br clear="none">> +++ b/ginac/compiler.h<br clear="none">> @@ -34,6 +34,8 @@<br clear="none">>  #ifdef _MSC_VER<br clear="none">>  #define __func__ __FUNCTION__<br clear="none">>  #define __alignof__ __alignof<br clear="none">> +#define NOMINMAX<br clear="none">> +#include <algorithm><br clear="none">>  #endif<br clear="none">><br clear="none">>  #endif // ndef GINAC_COMPILER_DEP_H<br clear="none">><br clear="none">> --- a/check/exam_cra.cpp<br clear="none">> +++ b/check/exam_cra.cpp<br clear="none">> @@ -21,6 +21,7 @@<br clear="none">>   */<br clear="none">><br clear="none">>  #include "polynomial/cra_garner.h"<br clear="none">> +#include "../ginac/compiler.h"<br clear="none">><br clear="none">>  #include <cln/integer.h><br clear="none">>  #include <cln/integer_io.h><br clear="none">><br clear="none">> 2. Fix ambiguous overload of log() (MSVC is more exact here than gcc):<br clear="none">><br clear="none">> --- a/check/exam_inifcns.cpp<br clear="none">> +++ b/check/exam_inifcns.cpp<br clear="none">> @@ -312,7 +312,7 @@ static unsigned inifcns_consist_log()<br clear="none">><br clear="none">>         // a bit more complicated<br clear="none">>         ex e1 =<br clear="none">> log(-7*p*pow(q,3)*a*pow(b,2)*z*w).expand(expand_options::expand_transcendental);<br clear="none">> -       ex e2 = log(7)+log(p)+log(pow(q,3))+log(-z*a*w*pow(b,2));<br clear="none">> +       ex e2 = log(7.0)+log(p)+log(pow(q,3))+log(-z*a*w*pow(b,2));<br clear="none">>         if (!e1.is_equal(e2))<br clear="none">>                 ++result;<br clear="none">><br clear="none">><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> GiNaC-devel mailing list<br clear="none">> <a shape="rect" ymailto="mailto:GiNaC-devel@ginac.de" href="mailto:GiNaC-devel@ginac.de">GiNaC-devel@ginac.de</a><br clear="none">> <a shape="rect" href="https://www.cebix.net/mailman/listinfo/ginac-devel" target="_blank">https://www.cebix.net/mailman/listinfo/ginac-devel</a><div class="qtdSeparateBR"><br><br></div><div class="yqt4599764601" id="yqtfd96485"><br clear="none">_______________________________________________<br clear="none">GiNaC-devel mailing list<br clear="none"><a shape="rect" ymailto="mailto:GiNaC-devel@ginac.de" href="mailto:GiNaC-devel@ginac.de">GiNaC-devel@ginac.de</a><br clear="none"><a shape="rect" href="https://www.cebix.net/mailman/listinfo/ginac-devel" target="_blank">https://www.cebix.net/mailman/listinfo/ginac-devel</a><br clear="none"></div><br><br></div> </div> </div> </blockquote>  </div></body></html>