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,315 of 10,432    |
|    oldk1331@gmail.com to All    |
|    Re: The leaner and meaner Rubi 4.11 now     |
|    29 Mar 17 01:32:37    |
   
   > But there were many many changes needed. Not only that, I just found that   
   > sympy changes all exact numbers to floating point. For example:   
   >   
   > >python   
   > >>> from sympy import *   
   > >>> x=symbols('x')   
   > >>> integrate(1/4/sin(1/3*x),x)   
   >   
   > 0.375*log(cos(0.333333333333333*x) - 1) - 0.375*log(cos(0.333333333333333*x)   
   + 1)   
   >   
   > The above is #4 in Timofeev. Notice how the output is all   
   > decimal. It turns out, one has to tell sympy not to do this   
   > by changing the input to   
   >   
   > >>> integrate(S('1/4')/sin(S('1/3')*x),x)   
   >   
   > 3*log(cos(x/3) - 1)/8 - 3*log(cos(x/3) + 1)/8   
   >   
   > So, unless there is a way to tell sympy not to change exact   
   > numbers to floating point number, I would have to do change   
   > each number n in the test file to become S('n')? 63,000   
   > integrals? Not practical.   
   >   
   > Will try to ask if there is an option to sympy, so that it   
   > will do this automatically. This is very strange for a computer   
   > algebra system to do this.   
      
   From 'isympy -h':   
      
   -i, --int-to-Integer (requires at least IPython 0.11)   
      
    Automatically wrap int literals with Integer. This makes it so that   
    things like 1/2 will come out as Rational(1, 2), rather than 0.5. This   
    works by preprocessing the source and wrapping all int literals with   
    Integer. Note that this will not change the behavior of int literals   
    assigned to variables, and it also won't change the behavior of functions   
    that return int literals.   
      
   Also:   
      
   -a, --auto-symbols (requires at least IPython 0.11)   
      
    Automatically create missing symbols. Normally, typing a name of a   
    Symbol that has not been instantiated first would raise NameError,   
    but with this option enabled, any undefined name will be   
    automatically created as a Symbol.   
      
   --- 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