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

Failed RealNumber conversion from str in base 16. #8554

Closed
sagetrac-lfousse mannequin opened this issue Mar 17, 2010 · 1 comment
Closed

Failed RealNumber conversion from str in base 16. #8554

sagetrac-lfousse mannequin opened this issue Mar 17, 2010 · 1 comment

Comments

@sagetrac-lfousse
Copy link
Mannequin

sagetrac-lfousse mannequin commented Mar 17, 2010

sage: RealNumber("1ffef", base=16)  
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

/opt/sage-4.3.3/<ipython console> in <module>()

/opt/sage-4.3.3/local/lib/python2.6/site-packages/sage/rings/real_mpfr.so in sage.rings.real_mpfr.create_RealNumber (sage/rings/real_mpfr.c:25128)()

ValueError: invalid literal for int() with base 10: 'f'

The problem arises because 'e' is incorrectly parsed as the mantissa/exponent delimiter. If Sage wants to follow MPFR in this regard, '@' should be used as a delimiter for base > 10.

CC: @jasongrout

Component: numerical

Keywords: hexadecimal, string conversion

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

@mezzarobba
Copy link
Member

comment:2

See #14702.

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

3 participants