Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#4806 closed defect (duplicate)

broken real number exponent preparsing

Reported by: dmharvey Owned by: was
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: user interface Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

In sage 3.2:

sage: 1.656e02
165.600000000000      # ok
sage: 1.656e-02
0.0165600000000000     # ok
sage: 1.656e+02
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/Users/david/<ipython console> in <module>()

/Users/david/sage-3.2/local/lib/python2.5/site-packages/sage/rings/real_mpfr.so in sage.rings.real_mpfr.create_RealNumber (sage/rings/real_mpfr.c:21490)()

/Users/david/sage-3.2/local/lib/python2.5/site-packages/sage/rings/real_mpfr.so in sage.rings.real_mpfr.RealLiteral.__init__ (sage/rings/real_mpfr.c:20706)()

/Users/david/sage-3.2/local/lib/python2.5/site-packages/sage/rings/real_mpfr.so in sage.rings.real_mpfr.RealNumber.__init__ (sage/rings/real_mpfr.c:7305)()

/Users/david/sage-3.2/local/lib/python2.5/site-packages/sage/rings/real_mpfr.so in sage.rings.real_mpfr.RealNumber._set (sage/rings/real_mpfr.c:7782)()

TypeError: Unable to convert x (='1.656e') to real number.

In plain python 2.5.2:

>>> 1.656e+02
165.59999999999999

Change History (3)

comment:1 Changed 13 years ago by mabshoff

  • Milestone set to sage-3.2.2

comment:2 Changed 13 years ago by boothby

  • Resolution set to duplicate
  • Status changed from new to closed

Rolled into #5079

comment:3 Changed 13 years ago by mabshoff

  • Milestone changed from sage-3.4.1 to sage-duplicate/invalid/wontfix
Note: See TracTickets for help on using tickets.