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.Mon, 18 Mar 2013 12:36:54 +0100Elliptic Curve Rational Field Height CODEhttps://ask.sagemath.org/question/9923/elliptic-curve-rational-field-height-code/Hi, I would like to know what does the function R() in lines 5060,5061 etc do. This is the code that I'm looking at:
http://hg.sagemath.org/sage-main/file/d06cf4b2215d/sage/schemes/elliptic_curves/ell_rational_field.py#l1
Thank you!Sun, 17 Mar 2013 14:14:07 +0100https://ask.sagemath.org/question/9923/elliptic-curve-rational-field-height-code/Answer by fidbc for <p>Hi, I would like to know what does the function R() in lines 5060,5061 etc do. This is the code that I'm looking at:</p>
<p><a href="http://hg.sagemath.org/sage-main/file/d06cf4b2215d/sage/schemes/elliptic_curves/ell_rational_field.py#l1">http://hg.sagemath.org/sage-main/file...</a></p>
<p>Thank you!</p>
https://ask.sagemath.org/question/9923/elliptic-curve-rational-field-height-code/?answer=14659#post-id-14659There `R` represents the field of real numbers with given `precision`. It is just used for conversion.
You can try it with the following example
sage: R=RealField()
sage: 1
1
sage: type(1)
sage.rings.integer.Integer
sage: R(1)
1.00000000000000
sage: type(R(1))
sage.rings.real_mpfr.RealNumberSun, 17 Mar 2013 16:09:58 +0100https://ask.sagemath.org/question/9923/elliptic-curve-rational-field-height-code/?answer=14659#post-id-14659Comment by Blackadder for <p>There <code>R</code> represents the field of real numbers with given <code>precision</code>. It is just used for conversion.
You can try it with the following example</p>
<pre><code>sage: R=RealField()
sage: 1
1
sage: type(1)
sage.rings.integer.Integer
sage: R(1)
1.00000000000000
sage: type(R(1))
sage.rings.real_mpfr.RealNumber
</code></pre>
https://ask.sagemath.org/question/9923/elliptic-curve-rational-field-height-code/?comment=18052#post-id-18052I see. Thank you very much for the help!Mon, 18 Mar 2013 12:36:54 +0100https://ask.sagemath.org/question/9923/elliptic-curve-rational-field-height-code/?comment=18052#post-id-18052