[BangPypers] Need Help : Setting Floating Precision Point as 2 in Python

Arulalan T arulalant at gmail.com
Tue Aug 24 15:24:40 CEST 2010


2010/8/24 Roshan Mathews <rmathews at gmail.com>

> On Tue, Aug 24, 2010 at 17:52, Arulalan T <arulalant at gmail.com> wrote:
> > This gives the what I need.
> > But I can not use this Decimal data type.
> >
> > In CDAT vcs module supports only the 'float data' type to represent the
> > latitude & logitude in map.
> >
> > so I need float value in 2 precision without changing the value. Not in
> > string. Not in Decimal.
> >
> Well, if you can't use Decimal, you won't be able to
> use Python, because a float won't work for you:
>
>    >>> 80.23
>    80.230000000000004
>
> Any reason why you can't use Decimal, or a string,
> or an integer?
>
>
In CDAT[1] vcs module supports only the 'float data' type to represent the
latitude & logitude in World map.
So I cant use Decimal or a string an integer. Only float.

Thanks to all.

[1] http://www2-pcmdi.llnl.gov/cdat/


> --
> http://roshan.mathews.in/
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Regards,
Arulalan.T

Kanchi Linux User Group Rocks !
http://kanchilug.wordpress.com

My Experiments In Linux are here
http://tuxcoder.wordpress.com


More information about the BangPypers mailing list