On Friday, June 8, 2018 at 6:23:51 PM UTC+9, Samuel Lelievre wrote:
>
>
>
> Fri 2018-06-08 06:21:45 UTC, Dima Pasechnik:
> >
> > ceil() is a standard Python function.
> > Thus, Sagemath has to live with it.
>
> If we look at object methods rather than functions
> in the global namespace, it is already the case that
> both ceil and ceiling are available, with one of them
> an alias to the other.
>
> Try this for example:
>
>     sage: a = 0.1
>     sage: a.cei<TAB>
>
> where <TAB> denotes hitting the TAB key.
> You will see that autocompletion suggests a.ceil and a.ceiling.
>

Right.
 

>
> Then if you do
>
>     sage: a.ceil?
>     sage: a.ceiling?
>
> you will see they have the same documentation.
>

Right.
 

>
> The source code reveals that in this case ceil is
> implemented, and ceiling is an alias to ceil:
>
>
> https://github.com/sagemath/sage/blob/master/src/sage/rings/real_mpfr.pyx#L2866
>
> https://github.com/sagemath/sage/blob/master/src/sage/rings/real_mpfr.pyx#L2897
>
> You could likewise explore other types of numbers in Sage.
>
> Regarding the function in the global namespace,
> we could add ceiling as an alias to ceil.
>

As Dima said, python and other programming languages only have ceil(), as 
apparently they prefer short names. Precisely python only has math.ceil()

What I like to see in Sage is that ceiling() is implemented and ceil() is 
an alias, so that we can live with both.

If no one objects to this switch, I will try to make a patch. 

Thanks.

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

Reply via email to