[phobos] phobos commit, revision 1833

Lars Tandle Kyllingstad lars at kyllingen.net
Thu Aug 12 00:51:07 PDT 2010


I would be very disappointed if I type sqrt(2) and get 1.

-Lars


On Thu, 2010-08-12 at 16:40 +1000, Daniel Murphy wrote:
> Do we really want the sqrt of a integer to return a real?
> I would expect it to return floor(sqrt(n)), in the same way that
> integer division does.
> What do other people think/expect?
> 
> 
> Daniel.
> 
> On Thu, Aug 12, 2010 at 12:43 PM, dsource.org <noreply at dsource.org>
> wrote:
>         phobos commit, revision 1833
>         
>         
>         user: dsimcha
>         
>         msg:
>         Bug 4455:  Taking the sqrt of an integer shouldn't require an
>         explicit cast.
>         
>         http://www.dsource.org/projects/phobos/changeset/1833
>         
>         _______________________________________________
>         phobos mailing list
>         phobos at puremagic.com
>         http://lists.puremagic.com/mailman/listinfo/phobos
> 
> 
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos




More information about the phobos mailing list