ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 22 Jul 2020 18:55:11 +0200f string float not workinghttps://ask.sagemath.org/question/52617/f-string-float-not-working/Why am I getting this error with a perfectly valid f-string?
SageMath is using Python 3.7.3. I've tried variants a dozen times with the same error.
val = 12.3
print(f'{val:.2f}')
TypeError Traceback (most recent call last)
<ipython-input-13-b868ffed9f12> in <module>()
1 val = RealNumber('12.3')
2
----> 3 print(f'{val:.2f}')
TypeError: unsupported format string passed
to sage.rings.real_mpfr.RealLiteral.__format__cybervigilanteWed, 22 Jul 2020 18:55:11 +0200https://ask.sagemath.org/question/52617/meta-question: post formattinghttps://ask.sagemath.org/question/49946/meta-question-post-formatting/I am new to this board and having some trouble finding documentation for how to format posts. I am familiar with markdown and have posted on the various Stack Exchange forums before, but I find the triple-backtick convention for block code does not work as expected here.
How would I produce, for instance, paragraphs of code set out with different background as seen in numerous posts on the board which I unfortunately do not have enough "karma" to link to..
The `Markdown basics` "cheatsheet" I can see on the right hand side of the present text-entry form says nothing about such matters, and for the life of me I cannot see a `quote` button on others' posts so I can examine the "source code" myself.
Nor do the `help` and `faq` sections seem to shed any light on this.
---
**Edit:**
More than anything, the issue is the inability to (easily?) quote someone's post. A clickable `quote` button on some of the many posts containing the type of formatting I want to do would show me anything I need to learn.
Am I missing any obvious quoting options here?
---
**2nd Edit:**
With enough karma, I believe I can now post the link to [this related question](https://ask.sagemath.org/question/44962/how-to-format-posts-on-this-forum/?answer=44963#post-id-44963) for completeness.grobberSun, 16 Feb 2020 15:43:32 +0100https://ask.sagemath.org/question/49946/List of arguments for a plothttps://ask.sagemath.org/question/10383/list-of-arguments-for-a-plot/Hello.
I'm trying to plot a set of functions with a list of arguments, say
plot(detT, (r,0,7), axes_labels=[r"$r$",r"$\det(T)$"], figsize=4, ticks=[[],[]], fontsize=14)
**Question**
I'd like to define a list or something with all the plot options, say `myplotformat`, and then plot it like
plot(detT, (r,0,7), myplotformat)
- Is it possible?
Cheers.
DoxThu, 25 Jul 2013 16:53:37 +0200https://ask.sagemath.org/question/10383/Should evaluating 1.0e-15 produce an Unhandled SIGILLhttps://ask.sagemath.org/question/9053/should-evaluating-10e-15-produce-an-unhandled-sigill/Since downloading Sage 5.0 evaluating 1.0e-15 produces an Unhandled SIGILL in the notebook on Mac OSX. Has the input format changed from what it was in 4.7?
Now it seems I have to type 1.0*10.0^-15 (a lot more characters!)
...or is this a bug?
sage: 10.0^-1
0.100000000000000
sage: 1.0e-1
------------------------------------------------------------------------
Unhandled SIGILL: An illegal instruction occurred in Sage.
This probably occurred because a *compiled* component of Sage has a bug
in it and is not properly wrapped with sig_on(), sig_off(). You might
want to run Sage under gdb with 'sage -gdb' to debug this.
Sage will now terminate.
------------------------------------------------------------------------martinBSat, 09 Jun 2012 12:40:06 +0200https://ask.sagemath.org/question/9053/How to format huge reals?https://ask.sagemath.org/question/8920/how-to-format-huge-reals/ print '{0:.3e}'.format(float(2.23799235765712699))
print '{0:.3e}'.format(float(2.23799235765712699e47675))
gives
2.238e+00
inf
Clearly what I want in the second case is 2.238e+47675.
How can I achieve this?petropolisSat, 28 Apr 2012 07:40:18 +0200https://ask.sagemath.org/question/8920/What kinds of autolinking are supported by asksage?https://ask.sagemath.org/question/8142/what-kinds-of-autolinking-are-supported-by-asksage/Using certain syntax in questions/answers will generate links automatically. For future reference, here is that syntax.nilesThu, 02 Jun 2011 03:04:27 +0200https://ask.sagemath.org/question/8142/Badly formatted Cayley Tablehttps://ask.sagemath.org/question/7945/badly-formatted-cayley-table/Hi,
I am completely new to Sage. To test the visualization of a subgroup of SL(2)a, I entered the following code:
G=SL(2,ZZ)
identity = matrix(ZZ, [[1,0], [0,1]])
G.cayley_table(names='elements',elements=[identity, -identity])
which outputs
* [1 0]
[0 1] [-1 0]
[ 0 -1]
+--------------------------------
[1 0]
[0 1]| [1 0]
[0 1] [-1 0]
[ 0 -1]
[-1 0]
[ 0 -1]| [-1 0]
[ 0 -1] [1 0]
[0 1]
Am I missing something to get a correctly displayed result ?
Thanks !johndeasTue, 15 Feb 2011 15:23:02 +0100https://ask.sagemath.org/question/7945/