[GiNaC-devel] BugFix: functions confused with exponent

Richard B. Kreckel kreckel at in.terlu.de
Sun Aug 8 16:43:47 CEST 2021


Dear Vladimir,

Thanks for spotting this bug and for fixing it! I'm applying your patch.
Also applying the second one about relational::canonical() function.
(Sorry for the delay.)

  -richy.

-- 

Richard B. Kreckel

<https://in.terlu.de/~kreckel/>

On 02.08.21 09:47, Vladimir V. Kisil wrote:
> 	Dear All,
> 
> 	Currently the following code in GiNaC
> 
> realsymbol x("x");
> cout << (cos(x)/exp(x)).normal() << endl;
> 
>   prints value 1 with probability 50% (and the unmodified expression
>   otherwise). I am attaching a one-line patch to fix this silly bug.
> 
>   Also I am attaching a previous patch which was not commented so
>   far. The new method may be helpful from time to time but its
>   equivalent in a user code would be much more involved due to the
>   private nature of the relation class members.
> 
>   Best wishes,
>   Vladimir
> 
> 
> _______________________________________________
> GiNaC-devel mailing list
> GiNaC-devel at ginac.de
> https://www.ginac.de/mailman/listinfo/ginac-devel


More information about the GiNaC-devel mailing list