Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coercion of maxima float with positive exponent to python float #265

Closed
sagetrac-gvanuxem mannequin opened this issue Feb 15, 2007 · 2 comments
Closed

Coercion of maxima float with positive exponent to python float #265

sagetrac-gvanuxem mannequin opened this issue Feb 15, 2007 · 2 comments

Comments

@sagetrac-gvanuxem
Copy link
Mannequin

sagetrac-gvanuxem mannequin commented Feb 15, 2007

Here is the output:


sage: maxima("1.7e-17")
 1.7E-17

sage: float (_)
 1.6999999999999999e-17

sage: maxima("1.7e+17")
 1.7E + 17

sage: float (_)
---------------------------------------------------------------------------
<type 'exceptions.ValueError'>            Traceback (most recent call last)

/home/greg/<ipython console> in <module>()

/usr/local/sage/local/lib/python2.5/site-packages/sage/interfaces/maxima.py in __float__(self)
   1267 
   1268     def __float__(self):
-> 1269         return float(str(self.numer()))
   1270 
   1271     def __len__(self):

<type 'exceptions.ValueError'>: invalid literal for float(): 1.7E + 17

Component: interfaces

Issue created by migration from https://trac.sagemath.org/ticket/265

@williamstein

This comment has been minimized.

@williamstein
Copy link
Contributor

comment:3

this works fine in sage-2.8.1.

@williamstein williamstein added this to the sage-2.8.2 milestone Aug 18, 2007
mkoeppe added a commit to mkoeppe/sage that referenced this issue Nov 11, 2024
Define feature `cddexec_gmp`, override SPKG feature `giac` by runtime feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant