On Aug 19, 2010, at 1:18 PM, Christian Muise wrote:

> Good idea.  The ability to generate random expressions is very useful.  We 
> should make this more general and add it to sympy/utilities/iterables.py.
> 
>   It's mesmerizing...may make the thing into a screen saver ;). 
> 
> I had to make a few modifications to your script. First off, you were testing 
> if integral(function.diff(x)) == function, which has two problems: first, you 
> don't even pass it to simplify().  As I said, the integral will usually not 
> look like the original function.  
> 
>   Ahh, right. Does it make sense to simplify the original formula before 
> returning it from build_func? Attached is a copy that simplifies that 
> equation, as well as the diff.
>  
> Fourth, I also regular print the original expression, which makes it easier 
> to copy and paste it if it is wrong and I need to debug it.
> 
> I attached an improved script.  Thanks for taking the time to look into this.
> 
>   So the attached alteration (which is just a few edits to yours...we should 
> invent a system to control versions of files or something ;)) also makes the 
> seed explicit. You can copy the printed seed into the source to repeat the 
> same tests.

It already exists.  It's called GitHub gist.

> 
>   Cheers

Aaron Meurer

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to