On Wed, Feb 17, 2016 at 1:38 PM, Francesco Bonazzi
<franz.bona...@gmail.com> wrote:
>
>
> On Tuesday, 16 February 2016 23:59:56 UTC+1, Aaron Meurer wrote:
>>
>> Take for instance the googolplex, 10**10**100. You can represent this
>> already
>> using Pow(10, Pow(10, 100, evaluate=False), evaluate=False). But there
>> are two issues with this. First is that evaluate=False is very
>> fragile. Any function that tries to rebuild the expression will cause
>> it to evaluate.
>
>
> What about introducing a persistent container for unevaluated objects? It
> would define .func( ) so as to never evaluate its contained expression.

But func isn't the only way an evaluation might happen. An algorithm
might try to pull apart the expression and use the terms in different
ways (for example, an algorithm that does the transformation a**x*a**y
-> a**(x + y) extracts the parts from the two powers and creates a new
one). The only way to prevent this in general is to hide the fact that
it's a Pow, but if you do that, you lose the ability to perform some
computations.

By wrapping the numbers, you essentially make n**n**m, where n and m
are symbolic, except n and m magically have the correct assumptions
for n = 10 and m = 100.

Aaron Meurer

>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/a3ef333b-5b0a-4d0b-96fb-597b8ae14fc0%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2Be%2B_s_%2Bs6rB9ssYi2bX8b_b0WZ7mc9E35m1kwi0JY54Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to