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, 05 Oct 2016 19:55:21 +0200what does '3*sqrt(3)' means?https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/ I am confused in reading some results of software. Please explain me what the statement means. In the screen shot what is '3*sqrt(3)' means? and why it doesn't appears with decimal values integers?Sun, 02 Oct 2016 15:53:35 +0200https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/Answer by tmonteil for <p>I am confused in reading some results of software. Please explain me what the statement means. In the screen shot what is '3*sqrt(3)' means? and why it doesn't appears with decimal values integers?</p>
https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?answer=35032#post-id-35032`sqrt` stands for "square root", so `3*sqrt(3)` means $3\\sqrt{3}$.
Now, if you want a numerical representation of your number, you can use the `.n()` method:
sage: a = 3*sqrt(3)
sage: a.n()
5.19615242270663Sun, 02 Oct 2016 20:10:53 +0200https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?answer=35032#post-id-35032Comment by zombie for <p><code>sqrt</code> stands for "square root", so <code>3*sqrt(3)</code> means $3\sqrt{3}$.</p>
<p>Now, if you want a numerical representation of your number, you can use the <code>.n()</code> method:</p>
<pre><code>sage: a = 3*sqrt(3)
sage: a.n()
5.19615242270663
</code></pre>
https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35046#post-id-35046I want to know that how can sqrt(27) can be 3*sqrt(3). I know that I can
get the decimal value by using .n() or .numerical_approx() but I want to
know that what does that statement really mean? and how it is useful for a
user?, I mean it should directly shown the value given by
.numerical_approx() function.
I am very thankful that you replied to my question. Actually I am starting
contributing to sage so it is necessary to understand each and every output.
It would be great if you help me a bit more.Mon, 03 Oct 2016 19:25:09 +0200https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35046#post-id-35046Comment by tmonteil for <p><code>sqrt</code> stands for "square root", so <code>3*sqrt(3)</code> means $3\sqrt{3}$.</p>
<p>Now, if you want a numerical representation of your number, you can use the <code>.n()</code> method:</p>
<pre><code>sage: a = 3*sqrt(3)
sage: a.n()
5.19615242270663
</code></pre>
https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35053#post-id-35053`27` is equal to `3^2*3`, so `sqrt(27)` is simplified to `3*sqrt(3)` (here, simplifying means having as less as possible under the `sqrt` symbol).Mon, 03 Oct 2016 23:52:46 +0200https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35053#post-id-35053Comment by zombie for <p><code>sqrt</code> stands for "square root", so <code>3*sqrt(3)</code> means $3\sqrt{3}$.</p>
<p>Now, if you want a numerical representation of your number, you can use the <code>.n()</code> method:</p>
<pre><code>sage: a = 3*sqrt(3)
sage: a.n()
5.19615242270663
</code></pre>
https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35060#post-id-35060Thank you so much. Now I got know that what I was missing. I appreciate your concern.Tue, 04 Oct 2016 18:37:21 +0200https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35060#post-id-35060Comment by tmonteil for <p><code>sqrt</code> stands for "square root", so <code>3*sqrt(3)</code> means $3\sqrt{3}$.</p>
<p>Now, if you want a numerical representation of your number, you can use the <code>.n()</code> method:</p>
<pre><code>sage: a = 3*sqrt(3)
sage: a.n()
5.19615242270663
</code></pre>
https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35062#post-id-35062^_^ .Tue, 04 Oct 2016 19:12:38 +0200https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35062#post-id-35062Comment by arpitdm for <p><code>sqrt</code> stands for "square root", so <code>3*sqrt(3)</code> means $3\sqrt{3}$.</p>
<p>Now, if you want a numerical representation of your number, you can use the <code>.n()</code> method:</p>
<pre><code>sage: a = 3*sqrt(3)
sage: a.n()
5.19615242270663
</code></pre>
https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35063#post-id-35063@tmonteil, this seems weird. Why should Meth:sqrt return a simplified expression instead of the direct numerical value in some cases and not others? For instance, sqrt(6.1) gives 2. something directly, while I have to do n(sqrt(27)) to get 5. I get that this can be simplified and so it is, but why should that be its native behaviour instead of the decimal value?
Also, is this a native Sage method or does it belong to some other package?Tue, 04 Oct 2016 19:21:12 +0200https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35063#post-id-35063Comment by tmonteil for <p><code>sqrt</code> stands for "square root", so <code>3*sqrt(3)</code> means $3\sqrt{3}$.</p>
<p>Now, if you want a numerical representation of your number, you can use the <code>.n()</code> method:</p>
<pre><code>sage: a = 3*sqrt(3)
sage: a.n()
5.19615242270663
</code></pre>
https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35064#post-id-35064Because `6.1` is a floating-point number while `27` is a Sage integer. If you want to consider `27` as a floating-point number, just write `27.`, see:
sage: sqrt(27.)
5.19615242270663Tue, 04 Oct 2016 19:45:24 +0200https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35064#post-id-35064Comment by zombie for <p><code>sqrt</code> stands for "square root", so <code>3*sqrt(3)</code> means $3\sqrt{3}$.</p>
<p>Now, if you want a numerical representation of your number, you can use the <code>.n()</code> method:</p>
<pre><code>sage: a = 3*sqrt(3)
sage: a.n()
5.19615242270663
</code></pre>
https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35079#post-id-35079I think there shouldn't be any simplified output, every user wants a numerically direct ans and that is the only reason they are using the tool. So as developers I think we should make some changes to that. What you guys think?Wed, 05 Oct 2016 19:55:21 +0200https://ask.sagemath.org/question/35030/what-does-3sqrt3-means/?comment=35079#post-id-35079