[Mono-dev] [PATCH] Math.Truncate

Zoltan Varga vargaz at gmail.com
Tue Jun 20 13:23:35 EDT 2006


                                      Hi,

  Line number info emitted by mcs should be enough to identify the individiual
tests. If the line number info is not correct, we should be working on
fixing that, instead of basically adding the same info manually using unique
strings. That approach reminds me of c64 basic, where each line was
pretended by its line number.

              Zoltan

On 6/20/06, Sebastien Pouliot <sebastien.pouliot at gmail.com> wrote:
> Hey,
>
> Small comments before committing...
>
> +               Assert (Double.MaxValue == Math.Round
> (Double.MaxValue));
> +               Assert (Double.MinValue == Math.Round
> (Double.MinValue));
>
> You should add a small string to each assert, so we know exactly which
> one fails.
>
> +               Assert (Decimal.MaxValue == Math.Truncate
> (Decimal.MaxValue));
> +               Assert (Decimal.MaxValue == Math.Truncate
> (Decimal.MaxValue));
>
> I guess the second one should be MinValue ;-)
> and same comment about adding a string
>
> Thanks for the test cases!
>
> On Tue, 2006-06-20 at 17:49 +0200, Jb Evain wrote:
> > Hi,
> >
> > Here is a new version of the patch that is more correct.
> > It includes tests as well.
> >
> > Jb
> > On Jun 20, 2006, at 2:15 PM, Zoltan Varga wrote:
> >
> > >                           Hi,
> > >
> > >   I'm no math expert, but truncation is most likely not the same as
> > > rounding,
> > > so this patch would probably lead to hard to track down errors later.
> > >
> > >              Zoltan
> > >
> > > On 6/20/06, Jb Evain <mono at evain.net> wrote:
> > >> Hello,
> > >>
> > >> This patch implements the new methods Math.Truncate.
> > >> Is it ok?
> > >>
> > >> Jb
> > >>
> > >>
> > >>
> > >> _______________________________________________
> > >> Mono-devel-list mailing list
> > >> Mono-devel-list at lists.ximian.com
> > >> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> > >>
> > >>
> > >>
> > >>
> > > _______________________________________________
> > > Mono-devel-list mailing list
> > > Mono-devel-list at lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> --
> Sebastien Pouliot  <sebastien at ximian.com>
> Blog: http://pages.infinit.net/ctech/
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>



More information about the Mono-devel-list mailing list