Opened 6 years ago

Last modified 6 years ago

#1005 reopened enhancement

Support BCD numbers

Reported by: rambo Owned by: piotras
Priority: major Milestone: 8.09.10 Ragnaroek
Component: Midgard Core Version: 8.09 Ragnaroek
Keywords: Cc:

Description

(Slightly related to #92)

Floating point numbers by definition are inaccurate so for where true accuracy (financial data for example, in simplest form product prices...) is needed it would be good to have type="decimal" which would use the databases corresponding decimal type.

For languages that do not have proper decimal types (like PHP) these could be exposed as strings and the app developer is responsible for handling the rest.

Change History (6)

comment:1 follow-up: Changed 6 years ago by piotras

What language supports decimal? I think we should have fundamental float and double types. These could be represented differently with providers but the same in scope of objects and classes.

comment:2 Changed 6 years ago by piotras

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicates #92

comment:3 in reply to: ↑ 1 Changed 6 years ago by rambo

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Replying to piotras:

What language supports decimal? I think we should have fundamental float and double types. These could be represented differently with providers but the same in scope of objects and classes.

Python at least has decimal math support (http://docs.python.org/library/decimal.html). as for #94: Doubles have the same inherent accuracy problem as floats, just to a smaller degree, in some cases no such inaccuracy is acceptable. Thus reopening request for the Decimal type.

comment:4 Changed 6 years ago by bergie

  • Milestone changed from 8.09.5 Ragnaroek to 8.09.6 Ragnaroek

comment:5 Changed 6 years ago by jval

  • Priority changed from minor to major

The enhancement request here is justified. Even though there might not be current need for this, this is clearly a feature which really should exist in a storage library like Midgard. Therefore, raising priority to the normal level.

comment:6 Changed 6 years ago by piotras

  • Milestone changed from 8.09.6 Ragnaroek to 8.09.7 Ragnaroek
Note: See TracTickets for help on using tickets.