Hi Aaron

I tried ;

import mpmath
x = mpmath.mpf("1.4142")
x**6000 % 400

but this returned "32" for me, not 272 like you got?

Also when I tried ;

>>> x = Float("1.4142", 100)

I got this error message ?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'Float' is not defined

I tried this ;
 

> x = mpmath.mpf("1.4142") 
> x**6000 % 400 
>
> but again got "32" not 272 like you did?

You mentioned ;
 

> But, you can also use SymPy to convert 1.4142 to a rational number: 
>
 In [30]: nsimplify("1.4142") 

I tried this but got the error message ;

>>> nsimplify("1.4142")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'nsimplify' is not defined 
 
Could you also explain the benefit here for using 'nsimplify' ?

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/42c97d2c-e460-4ba2-81a4-903c190c6b16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to