Default is bits, the digits= keyword argument its for decimal digits 
instead. 

Signature: pi.n(self, prec=None, digits=None, algorithm=None):
Docstring:
   Return a numerical approximation this symbolic expression as either
   a real or complex number with at least the requested number of bits
   or digits of precision.

   EXAMPLES:

      sage: sin(x).subs(x=5).n()
      -0.958924274663138
      sage: sin(x).subs(x=5).n(100)
      -0.95892427466313846889315440616
      sage: sin(x).subs(x=5).n(digits=50)
      -0.95892427466313846889315440615599397335246154396460




On Saturday, March 12, 2016 at 9:11:56 PM UTC+1, Dima Pasechnik wrote:
>
>
>
> On Saturday, March 12, 2016 at 7:47:46 PM UTC, Volker Braun wrote:
>>
>> Whats ambiguous?
>>
>>  (decimal) digits or bits?
>
> a part of my confusion comes from a puzzling (OSX-specific) error on 
> #18888.
>
> A Mathematica object has .n() and .N(), and they are not synonyms.
> (n() is Sage's method, N() is Mathematica's method).
>
> However it seems that on OSX N() acts as n(), I don't understand why. Some 
> case-insensitive stuff, I guess.
>
>  
>
>> The call signature is missing, thats a bug. Ideally it would be 
>> documented in an INPUT block.
>>
>>
>>
>>
>>
>> On Saturday, March 12, 2016 at 7:26:50 PM UTC+1, Dima Pasechnik wrote:
>>>
>>> sage: pi.n?
>>> Docstring:
>>>    Return a numerical approximation this symbolic expression as either
>>>    a real or complex number with at least the requested number of bits
>>>    or digits of precision.
>>>
>>> this is clearly ambiguous; can it be clarified?
>>> (it bites e.g. if one wants to create meaningful doctests, such as on 
>>> #18888)
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to