Re: Locale definitions, dots and commas
- From: "Martin (OpenGeoMap)" <martin opengeomap org>
- To: Dave Howorth <dhoworth mrc-lmb cam ac uk>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Locale definitions, dots and commas
- Date: Thu, 13 Mar 2008 17:09:28 +0100
Dave Howorth escribió:
Martin (OpenGeoMap) wrote:
I am building an intermediate unit system for engineeres in Gobject and
i hope publish this library soon.
With this system you always work in lineal measures in meters (double),
and you can input others (inches, centimeters)
input system - intermediate system -out system
you can input in a entry for example (22m, 22 m, 220cm,...) and
internally you have a double always in meters.
How do you deal with precision? 22 m is not the same as 22.000 m
Internally you always have doubles, but you show to the people only 3, 2
or 0 dezimals,...
You have 16 mantise numbers:
1234.567890123456
123456.7890123456
123456789.0123456
12345678901.23456
In DXF files for example you see always 16 numbers .
This is the double precision IEEE standard:
This is explained very well in GSL API:
http://linux.duke.edu/~mstenner/free-docs/gsl-ref-1.1/gsl-ref_38.html
The important here in mantain the double (16 numbers) in an intermediate
system. It doesn`t matter what you see in a gtk_entry (22.34555,
22.346,22.35,).
Regards.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]