velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Incze Lajos <in...@mail.matav.hu>
Subject Re: [PATCH] New "Arithmetic Engine"
Date Sun, 04 Jan 2004 14:48:24 GMT
> >Hm.  That's a problem.  What about
> >
> >5/2 = 2
> >
> >5/2.0 = 2.5
> >
> >?
> 
> -1
> I am not a committer but I don't like it. The original implementation 
> only used integers but that doesn't mean that it is correct. It make 
> much more sense to have 5/2 = 2.5 instead of 2.
> 

It is both correct and has use cases. Also, it corresponds to the
java arithmetics wrt integers and "real numbers". Sometimes, it makes
more sense to get 2.5 as a result of 5/2, then use real numbers,
sometimes it makes more sense to get 2 as a result of 5/2 (mostly,
when rendering a view), then you can use integers.

incze

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Mime
View raw message