Yes, I did read the documentation. It says it returns the imaginary part.
But there is no I - just a real number. As such I believe at the *very least
* the documentation should say it returns the imaginary part as a real
number. Better still is to return the imaginary part with an I in front of
it.

However, I do not believe either are particularly good choices. I believe it
is better to return the real and imaginary parts, as both

Mathematica,
http://reference.wolfram.com/mathematica/ref/ZetaZero.html

and mpmath
http://mpmath.googlecode.com/svn/tags/0.15/doc/build/functions/zeta.html

do. Both Mathematica and mpmath seem to me to pick more logical formats for
returning the number. Would you not agree?

Anne

On 1 June 2010 20:15, John Cremona <[email protected]> wrote:

> Did you read the documentation of the function?  It makes it quite
> clear:
>
> Definition:     lcalc.zeros(self, n, L='')
> Docstring:
>       Return the imaginary parts of the first n nontrivial zeros of
> the
>       L-function in the upper half plane, as 32-bit reals.
>
>       INPUT:
>
>       * ``n`` - integer
>
>       * ``L`` - defines L-function (default: Riemann zeta function)
>
>       This function also checks the Riemann Hypothesis and makes sure
> no
>       zeros are missed. This means it looks for several dozen zeros
> to
>       make sure none have been missed before outputting any zeros at
> all,
>       so takes longer than ``self.zeros_of_zeta_in_interval(...)``.
>
> You could always define your own function to return the complete zero:
>
> sage: [1/2+I*y for y in lcalc.zeros(10)]
> [0.500000000 + 14.1347251*I, 0.500000000 + 21.0220396*I, 0.500000000 +
> 25.0108576*I, 0.500000000 + 30.4248761*I, 0.500000000 + 32.9350616*I,
> 0.500000000 + 37.5861782*I, 0.500000000 + 40.9187190*I, 0.500000000 +
> 43.3270733*I, 0.500000000 + 48.0051509*I, 0.500000000 + 49.7738325*I]
>
> !
>
>
> On Jun 1, 4:13 pm, Anne Driver <[email protected]> wrote:
> > Hello,
> >
> > I am new to this list, and relatively new to Sage. I'm puzzled by the
> logic
> > of one part of Sage though.
> >
> > Although I don't have access to Mathematica at the minute on this
> computer,
> > I know if I compute the first zero, I get something like
> >
> > In[1] = ZetaZero[1] //N (to get a numerical value)
> > Out[1] = 1/2 + I*14.134...
> >
> > Trying this in Sage, I get:
> >
> > sage: lcalc.zeros(1)
> > [14.1347251]
> >
> > Why does Sage not do the sensible thing like Mathematica and return the
> > complex number 0.5 + I 14.1347251 ? It would seem much more logical.
> >
> > Of course, it is not proven that the real part is 1/2, so how would the
> case
> > be handled if a root was not found to have a real part of 1/2 ?
> >
> > Anne
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<sage-support%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to