home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.math.symbolic      Symbolic algebra discussion      10,432 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,321 of 10,432   
   clicliclic@freenet.de to Nasser M. Abbasi   
   Re: The leaner and meaner Rubi 4.11 now    
   29 Mar 17 11:18:28   
   
   "Nasser M. Abbasi" schrieb:   
   >   
   > On 3/29/2017 4:22 AM, clicliclic@freenet.de wrote:   
   > >   
   > >   
   > > This should have been:   
   > >   
   > > sympify("integrate(1/4/sin(1/3*x),x)")   
   > >   
   > > Martin :).   
   > >   
   >   
   > Thanks Matrin!  This trick worked. Here is the result from the output   
   > table I see now:   
   >   
   > 4,1,...,"integrate(1/4/sin(1/3*x),x)",...,"3*log(cos(x/3) - 1)/8 -   
   3*log(cos(x/3) + 1)/8","A"   
   >   
   > The only issue is, I had to edit Timofeev_Problems.py and make   
   > the input itself string for your trick to work. Otherwise, if I   
   > read the tests as python expressions which is what I did before, then   
   > the once I convert them to string inside python using the repr()   
   > command, the integers flip to floating point and we are back to square   
   > one.   
   >   
   > But now since the integrands are strings in the file, I can just   
   > read them as is and use your nice command sympify() which I   
   > did not know about.   
   >   
   > This means, I need now to write a preprocessor to   
   > convert all input test files to have the integrand only be string,   
   > (first field) for use with python only, which is not a big deal.   
   >   
   > sympy is now running on Timofeev tests. Should be done in few hrs or   
   > less, depending how many hangs it has.   
   >   
      
   Not really my trick: I have never run anything in Python.   
      
   Another option may be:   
      
   integrate(sympify("1/4/sin(1/3*x)"), sympify("x"))   
      
   where I expect the second sympify to allocate the symbol x even if it   
   does not appear in the integrand.   
      
   Martin.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca