You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by ma...@gmx.com on 2006/02/07 10:22:12 UTC

[math]

Hi!
I have a problem with MathUtils.round();
As I've learned at school I round

8.4345 to 8.44 with 2 decimal places or
8.94345 to 8.944 with 3 decimal places.

If I use MathUtils.round()
the results will be
8.43 with MathUtils.round(8.4345,2) or
8.943 MathUtils.round(8.94345,2)

Has someone made the same experience?

Kind regards,

Markus

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


Re: [math]

Posted by ma...@gmx.com.
My way was wrong. 
Good to know!
Another lesson learned!

Thanks, Markus

> --- Ursprüngliche Nachricht ---
> Von: Dion Gillard <di...@gmail.com>
> An: Jakarta Commons Users List <co...@jakarta.apache.org>,
> paul@activemath.org
> Betreff: Re: [math]
> Datum: Tue, 7 Feb 2006 22:29:51 +1100
> 
> Paul,
> 
> the schools here in Australia are the same as yours.
> 
> On 2/7/06, Paul Libbrecht <pa...@activemath.org> wrote:
> > I haven't learned this at school...
> > 8.4345 is smaller than 8.435 hence should be written, with two decimals,
> > as 8.43.
> > 8.94345 is smaller than 8.9435 hence should be written, with three
> > decimals, as 8.943.
> > paul
> > PS: (I think what you seem to apply is that the 5 brings one up which
> > brings the next up etc... I don't think that this is valid)
> >
> >
> > majoko@gmx.com wrote:
> > > Hi!
> > > I have a problem with MathUtils.round();
> > > As I've learned at school I round
> > >
> > > 8.4345 to 8.44 with 2 decimal places or
> > > 8.94345 to 8.944 with 3 decimal places.
> > >
> > > If I use MathUtils.round()
> > > the results will be
> > > 8.43 with MathUtils.round(8.4345,2) or
> > > 8.943 MathUtils.round(8.94345,2)
> > >
> > > Has someone made the same experience?
> > >
> > > Kind regards,
> > >
> > > Markus
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
> 
> 
> --
> http://www.multitask.com.au/people/dion/
> "If I close my eyes it doesn't seem so dark." - SpongeBob SquarePants
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 

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


Re: [math]

Posted by Dion Gillard <di...@gmail.com>.
Paul,

the schools here in Australia are the same as yours.

On 2/7/06, Paul Libbrecht <pa...@activemath.org> wrote:
> I haven't learned this at school...
> 8.4345 is smaller than 8.435 hence should be written, with two decimals,
> as 8.43.
> 8.94345 is smaller than 8.9435 hence should be written, with three
> decimals, as 8.943.
> paul
> PS: (I think what you seem to apply is that the 5 brings one up which
> brings the next up etc... I don't think that this is valid)
>
>
> majoko@gmx.com wrote:
> > Hi!
> > I have a problem with MathUtils.round();
> > As I've learned at school I round
> >
> > 8.4345 to 8.44 with 2 decimal places or
> > 8.94345 to 8.944 with 3 decimal places.
> >
> > If I use MathUtils.round()
> > the results will be
> > 8.43 with MathUtils.round(8.4345,2) or
> > 8.943 MathUtils.round(8.94345,2)
> >
> > Has someone made the same experience?
> >
> > Kind regards,
> >
> > Markus
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


--
http://www.multitask.com.au/people/dion/
"If I close my eyes it doesn't seem so dark." - SpongeBob SquarePants

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


Re: [math]

Posted by Paul Libbrecht <pa...@activemath.org>.
I haven't learned this at school...
8.4345 is smaller than 8.435 hence should be written, with two decimals, 
as 8.43.
8.94345 is smaller than 8.9435 hence should be written, with three 
decimals, as 8.943.
paul
PS: (I think what you seem to apply is that the 5 brings one up which 
brings the next up etc... I don't think that this is valid)


majoko@gmx.com wrote:
> Hi!
> I have a problem with MathUtils.round();
> As I've learned at school I round
>
> 8.4345 to 8.44 with 2 decimal places or
> 8.94345 to 8.944 with 3 decimal places.
>
> If I use MathUtils.round()
> the results will be
> 8.43 with MathUtils.round(8.4345,2) or
> 8.943 MathUtils.round(8.94345,2)
>
> Has someone made the same experience?
>
> Kind regards,
>
> Markus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>   


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