the following is what I did. I don't have INSTALLed python, because I
want to make portable development enviroment, and I hate to write to
register. I am using winxp

I dont' find the problem with py2.6.2, I hope it will not be a bug for
py2.4.4.

1. download http://www.python.org/ftp/python/2.4.4/python-2.4.4.msi,
which is the lastest official bianry release of py 24 for windows
2. use http://legroom.net/software/uniextract to extract
python-2.4.4.msi to R:\python-2.4.4
3. downlaod http://sympy.googlecode.com/files/sympy-0.6.4.tar.gz abd
extract it into R:\_sympy\, then the real package is at R:\_sympy\sympy
\
4. go to the dosbox
5. set pythonpath=
   this will clear the enverioment setting
6. here is the code
[a.py]
import sys
sys.path.insert(0, r'r:\_sympy')
import sympy
print sympy.simplify(sympy.sqrt((-2+sympy.sqrt(2)/2)**2+(2-sympy.sqrt
(2)/2)**2))
[/a.py]
7. let's go
R:\>r:\python-2.4.4\python.exe a.py
-1 + 2*2**(1/2)
8. go again
R:\>r:\python-2.4.4\python.exe a.py
Traceback (most recent call last):
  File "a.py", line 4, in ?
    print sympy.simplify(sympy.sqrt((-2+sympy.sqrt(2)/2)**2+(2-
sympy.sqrt(2)/2)*
*2))
  File "r:\_sympy\sympy\simplify\simplify.py", line 1079, in simplify
    expr = Poly.cancel(powsimp(expr))
  File "r:\_sympy\sympy\polys\polynomial.py", line 605, in cancel
    numer, denom = f.as_numer_denom()
  File "r:\_sympy\sympy\core\power.py", line 428, in as_numer_denom
    num = n ** exp
  File "r:\_sympy\sympy\core\sympify.py", line 271, in
__sympifyit_wrapper
    return func(a, b)
  File "r:\_sympy\sympy\core\basic.py", line 668, in __pow__
    return Pow(self, other)
  File "r:\_sympy\sympy\core\cache.py", line 85, in wrapper
    func_cache_it_cache[k] = r = func(*args, **kw_args)
  File "r:\_sympy\sympy\core\power.py", line 85, in __new__
    obj = a._eval_power(b)
  File "r:\_sympy\sympy\core\mul.py", line 293, in _eval_power
    return coeff**e * Mul(*[s**e for s in rest])
  File "r:\_sympy\sympy\core\sympify.py", line 271, in
__sympifyit_wrapper
    return func(a, b)
  File "r:\_sympy\sympy\core\basic.py", line 668, in __pow__
    return Pow(self, other)
  File "r:\_sympy\sympy\core\cache.py", line 85, in wrapper
    func_cache_it_cache[k] = r = func(*args, **kw_args)
  File "r:\_sympy\sympy\core\power.py", line 85, in __new__
    obj = a._eval_power(b)
  File "r:\_sympy\sympy\core\power.py", line 104, in _eval_power
    if self.base.is_nonnegative and self.exp.is_real and
other.is_real:
  File "r:\_sympy\sympy\core\assumptions.py", line 366, in getit
    return self._what_known_about(name)
  File "r:\_sympy\sympy\core\assumptions.py", line 279, in
_what_known_about
    a = getattr(self,'is_'+pk)
  File "r:\_sympy\sympy\core\assumptions.py", line 366, in getit
    return self._what_known_about(name)
  File "r:\_sympy\sympy\core\assumptions.py", line 279, in
_what_known_about
    a = getattr(self,'is_'+pk)
  File "r:\_sympy\sympy\core\assumptions.py", line 366, in getit
    return self._what_known_about(name)
  File "r:\_sympy\sympy\core\assumptions.py", line 296, in
_what_known_about
    v = self.evalf()
  File "r:\_sympy\sympy\core\evalf.py", line 1010, in Basic_evalf
    result = evalf(x, prec+4, options)
  File "r:\_sympy\sympy\core\evalf.py", line 950, in evalf
    r = rf(x, prec, options)
  File "r:\_sympy\sympy\core\evalf.py", line 296, in evalf_add
    terms = [evalf(arg, prec+10, options) for arg in args]
  File "r:\_sympy\sympy\core\evalf.py", line 950, in evalf
    r = rf(x, prec, options)
  File "r:\_sympy\sympy\core\evalf.py", line 348, in evalf_mul
    re, im, a, aim = evalf(arg, prec, options)
  File "r:\_sympy\sympy\core\evalf.py", line 950, in evalf
    r = rf(x, prec, options)
  File "r:\_sympy\sympy\core\evalf.py", line 445, in evalf_pow
    return mpf_sqrt(xre, prec), None, prec, None
  File "r:\_sympy\sympy\mpmath\libmpf.py", line 1485, in mpf_sqrt
    shift += shift & 1
TypeError: unsupported operand type(s) for &: 'float' and 'int'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@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