Theano is doing floating point computations whereas SymPy does the
computation using arbitrary precision.


Jason
moorepants.info
+01 530-601-9791

On Tue, May 19, 2015 at 3:14 PM, <drazi...@gmail.com> wrote:

> Hi,
>
> I was experimenting with the following code:
>
> import sympy
> from sympy.abc import x
> expr = sympy.exp(-x ** 2)
> from sympy.printing.theanocode import theano_function
> fn_theano  = theano_function([x], [expr], dims={x: 1}, dtypes={x:
> 'float64'})
> print fn_theano([29.]),sympy.exp(-29.**2)
>
> I got
>
>
> [ 0.] 5.73245586032578e-366
>
>
> My question is why fn_theano does not  give the same value?
>
> Thank you,
>
> Costas
>
>
>
>  --
> 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 http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/4662668c-68b0-482e-b467-92a6d2206d2e%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/4662668c-68b0-482e-b467-92a6d2206d2e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAP7f1Aj4gcgo-KGrH%2BBB%3DvPVbgZsiUckxVfiXQMd9UecZ0GqyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to