Skip to content

Commit

Permalink
[giac] fix for solve(x*exp(x)=-1/e)
Browse files Browse the repository at this point in the history
git-svn-id: https://dev.geogebra.org/svn/trunk/geogebra/giac@70064 23ce0884-8a58-47d3-bc5c-ddf1cd5b9f9e
  • Loading branch information
bernard.parisse committed Dec 5, 2022
1 parent f1af6a5 commit 6a54138
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/giac/cpp/solve.cc
Expand Up @@ -668,7 +668,7 @@ namespace giac {
// write a*x+b=a/E*(E*x+F)+b-a*F/E
// a/E*(E*x+F)*exp(a/E*(E*x+F))=-D*a/E*exp(a*F/E-b)
gen delta=-D*a/E*exp(a*F/E-b,contextptr);
if (is_greater(m1,delta,contextptr))
if (is_strictly_greater(m1,delta,contextptr))
return; // no solution
gen sol=_LambertW(delta,contextptr)/a-F/E;
v.push_back(sol);
Expand All @@ -689,7 +689,7 @@ namespace giac {
in_solve(tfact,*t._IDNTptr,vt,isolate_mode,contextptr);
const_iterateur it=vt.begin(),itend=vt.end();
for (;it!=itend;++it){
if (is_greater(m1,*it,contextptr))
if (is_strictly_greater(m1,*it,contextptr))
continue;
v.push_back((_LambertW(*it,contextptr)-b)/a);
if (is_strictly_positive(-*it,contextptr))
Expand All @@ -706,7 +706,7 @@ namespace giac {
in_solve(tfact,*t._IDNTptr,vt,isolate_mode,contextptr);
const_iterateur it=vt.begin(),itend=vt.end();
for (;it!=itend;++it){
if (is_greater(m1,*it,contextptr))
if (is_strictly_greater(m1,*it,contextptr))
continue;
v.push_back((b-_LambertW(*it,contextptr))/a);
if (is_strictly_positive(-*it,contextptr))
Expand Down

0 comments on commit 6a54138

Please sign in to comment.