Skip to content

Add a type for decimal numbers #1

@hvbtup

Description

@hvbtup

A decimal type would be useful.
Decimal numbers cannot be serialized as float/double as the conversion will cause precision loss / rounding issues.
As of now, one has to convert decimal numbers to Strings and then use the UTF-8 type. This circumvents conversion issues, but it has a few drawbacks:

  • Waste of band-width, because each decimal digit takes one byte.
  • Loss of semantics (for example, a generic viewer program for files of RION objects could use highlighting to show numbers in a different color than strings if we had a decimal type.

Thus I think it could be useful to officially add a type for decimal numbers which are encoded as in
https://en.wikipedia.org/wiki/Densely_packed_decimal

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions