ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 16 Feb 2012 15:38:10 -0600Arbitrary Precision Physics Calculationhttp://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/I would like to do some physics problems in high precision. I cannot find any examples or sample worksheets that are accessable on a basic level. I just want real numbers ( including large and small in scientific notation ) I am pretty sure this is not too hard, perhaps it is too simple to be explained? Any help would be appreciated.Wed, 15 Feb 2012 08:10:52 -0600http://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/Comment by Mike Witt for <p>I would like to do some physics problems in high precision. I cannot find any examples or sample worksheets that are accessable on a basic level. I just want real numbers ( including large and small in scientific notation ) I am pretty sure this is not too hard, perhaps it is too simple to be explained? Any help would be appreciated.</p>
http://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/?comment=20282#post-id-20282Perhaps it would help if you described one specific problem that you are working on.Thu, 16 Feb 2012 08:04:24 -0600http://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/?comment=20282#post-id-20282Answer by kcrisman for <p>I would like to do some physics problems in high precision. I cannot find any examples or sample worksheets that are accessable on a basic level. I just want real numbers ( including large and small in scientific notation ) I am pretty sure this is not too hard, perhaps it is too simple to be explained? Any help would be appreciated.</p>
http://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/?answer=13274#post-id-13274Your question is a little vague. We do have arbitrary (fixed) precision real and complex numbers.
sage: R = RealField(1000)
sage: a = R(5.0000001^5.0000001)
sage: a
3125.00081544945942368940450251102447509765625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
sage: a^5-log(1/a)+e^sqrt(a)
1.89584501327280735942937534086913418233822028367104009709035254982102232998750469378667609600087589163781468732285228512947454542091917091499584315533762570369369905169521733670930846238772029824301668021456411893832087472189344604700518827443459286621575319448702380078978194800389265094467157413734e24
See `RealField?` for more info.Wed, 15 Feb 2012 10:07:15 -0600http://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/?answer=13274#post-id-13274Comment by russ_hensel for <p>Your question is a little vague. We do have arbitrary (fixed) precision real and complex numbers.</p>
<pre><code>sage: R = RealField(1000)
sage: a = R(5.0000001^5.0000001)
sage: a
3125.00081544945942368940450251102447509765625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
sage: a^5-log(1/a)+e^sqrt(a)
1.89584501327280735942937534086913418233822028367104009709035254982102232998750469378667609600087589163781468732285228512947454542091917091499584315533762570369369905169521733670930846238772029824301668021456411893832087472189344604700518827443459286621575319448702380078978194800389265094467157413734e24
</code></pre>
<p>See <code>RealField?</code> for more info.</p>
http://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/?comment=20281#post-id-20281By messing around I got my calcs to work, and are consistent with the above. I just find this, and even more the published material a bit abstract, and I was looking for just a bit more. I may publish a worksheet for others in the future which will illustrate these basic features.Thu, 16 Feb 2012 08:05:54 -0600http://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/?comment=20281#post-id-20281Comment by kcrisman for <p>Your question is a little vague. We do have arbitrary (fixed) precision real and complex numbers.</p>
<pre><code>sage: R = RealField(1000)
sage: a = R(5.0000001^5.0000001)
sage: a
3125.00081544945942368940450251102447509765625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
sage: a^5-log(1/a)+e^sqrt(a)
1.89584501327280735942937534086913418233822028367104009709035254982102232998750469378667609600087589163781468732285228512947454542091917091499584315533762570369369905169521733670930846238772029824301668021456411893832087472189344604700518827443459286621575319448702380078978194800389265094467157413734e24
</code></pre>
<p>See <code>RealField?</code> for more info.</p>
http://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/?comment=20280#post-id-20280That would be great! It's possible there is stuff out there, but I just wasn't sure what you were looking for.Thu, 16 Feb 2012 15:38:10 -0600http://ask.sagemath.org/question/8719/arbitrary-precision-physics-calculation/?comment=20280#post-id-20280