Markus,
Thanks for this bug report, which I've made
http://trac.sagemath.org/sage_trac/ticket/587
This will be great fodder for our bug squash even this Thursday
at 10am!
-- William
On 9/4/07, Markus Fraczek <[EMAIL PROTECTED]> wrote:
> Hi,
>
> it seems there is a bug in the implementation of complex numbers. Defining a
> number with imaginary part bigger or equal 1E8 gets an exception error.
>
> Best,
> Marek
>
> ----------------------------------------------------------------------
> | SAGE Version 2.8.3, Release Date: 2007-08-31 |
> | Type notebook() for the GUI, and license() for information. |
> ----------------------------------------------------------------------
>
> sage: x=1E8*I
> sage: x
> ---------------------------------------------------------------------------
> <type 'exceptions.TypeError'> Traceback (most recent call last)
>
> /home/marek/temp/sage-2.8.3/<ipython console> in <module>()
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/site-packages/IPython/Prompts.py
> in __call__(self, arg)
> 521
> 522 # and now call a possibly user-defined print mechanism
> --> 523 manipulated_val = self.display(arg)
> 524
> 525 # user display hooks can change the variable to be stored
> in
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/site-packages/IPython/Prompts.py
> in _display(self, arg)
> 545 """
> 546
> --> 547 return self.shell.hooks.result_display(arg)
> 548
> 549 # Assign the default display method:
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/site-packages/IPython/hooks.py
> in __call__(self, *args, **kw)
> 132 #print "prio",prio,"cmd",cmd #dbg
> 133 try:
> --> 134 ret = cmd(*args, **kw)
> 135 return ret
> 136 except ipapi.TryNext, exc:
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/site-packages/IPython/hooks.py
> in result_display(self, arg)
> 160
> 161 if self.rc.pprint:
> --> 162 out = pformat(arg)
> 163 if '\n' in out:
> 164 # So that multi-line strings line up with the left column
> of
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/pprint.py in pformat(self,
> object)
> 109 def pformat(self, object):
> 110 sio = _StringIO()
> --> 111 self._format(object, sio, 0, 0, {}, 0)
> 112 return sio.getvalue()
> 113
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/pprint.py in _format(self,
> object, stream, indent, allowance, context, level)
> 127 self._readable = False
> 128 return
> --> 129 rep = self._repr(object, context, level - 1)
> 130 typ = _type(object)
> 131 sepLines = _len(rep) > (self._width - 1 - indent - allowance)
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/pprint.py in _repr(self,
> object, context, level)
> 193 def _repr(self, object, context, level):
> 194 repr, readable, recursive = self.format(object,
> context.copy(),
> --> 195 self._depth, level)
> 196 if not readable:
> 197 self._readable = False
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/pprint.py in format(self,
> object, context, maxlevels, level)
> 205 and whether the object represents a recursive construct.
> 206 """
> --> 207 return _safe_repr(object, context, maxlevels, level)
> 208
> 209
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/pprint.py in
> _safe_repr(object, context, maxlevels, level)
> 290 return format % _commajoin(components), readable, recursive
> 291
> --> 292 rep = repr(object)
> 293 return rep, (rep and not rep.startswith('<')), False
> 294
>
> /home/marek/temp/sage-2.8.3/sage_object.pyx in
> sage_object.SageObject.__repr__()
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/site-packages/sage/calculus/calculus.py
> in _repr_(self, simplify)
> 2863 return self._simp._repr_(simplify=False)
> 2864 else:
> -> 2865 return self.simplify()._repr_(simplify=False)
> 2866
> 2867 ops = self._operands
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/site-packages/sage/calculus/calculus.py
> in simplify(self)
> 2018 return self._simp
> 2019 except AttributeError:
> -> 2020 S =
> evaled_symbolic_expression_from_maxima_string(self._maxima_init_())
> 2021 S._simp = S
> 2022 self._simp = S
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/site-packages/sage/calculus/calculus.py
> in evaled_symbolic_expression_from_maxima_string(x)
> 4972
> 4973 def evaled_symbolic_expression_from_maxima_string(x):
> -> 4974 return symbolic_expression_from_maxima_string(maxima.eval(x))
> 4975
> 4976
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/site-packages/sage/calculus/calculus.py
> in symbolic_expression_from_maxima_string(x, equals_sub, maxima)
> 4946 while True:
> 4947 try:
> -> 4948 w = sage_eval(s, syms)
> 4949 except NameError, msg:
> 4950 if msg == last_msg:
>
> /home/marek/temp/sage-2.8.3/local/lib/python2.5/site-packages/sage/misc/sage_eval.py
> in sage_eval(source, locals)
> 108 p = preparse(source)
> 109 try:
> --> 110 return eval(p, sage.all.__dict__, locals)
> 111 except SyntaxError, msg:
> 112 raise SyntaxError, "%s\nError using SAGE to evaluate
> '%s'"%(msg, p)
>
> /home/marek/temp/sage-2.8.3/<string> in <module>()
>
> /home/marek/temp/sage-2.8.3/real_mpfr.pyx in real_mpfr.create_RealNumber()
>
> /home/marek/temp/sage-2.8.3/real_mpfr.pyx in real_mpfr.RealNumber.__init__()
>
> /home/marek/temp/sage-2.8.3/real_mpfr.pyx in real_mpfr.RealNumber._set()
>
> <type 'exceptions.TypeError'>: Unable to convert x (='1.0E') to real number.
>
>
>
--
William Stein
Associate Professor of Mathematics
University of Washington
http://www.williamstein.org
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---