-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
blockedThis is blocked by something elseThis is blocked by something else
Description
currently, the size of an integer is only limited by the available memory, which could lead to problems.
add a fixed size limit, generously over the limits required by the specifications.
- integer (including negative, positive and non-negative, non-positive)
- decimal
- also document this properly
- conversion double→integer
XSD required datatype ranges: https://www.w3.org/TR/xmlschema11-2/#partial-implementation
- for Decimal with
$i/10^k$ , 64-bit integer is enough for$i$ and for$k$ 1 Byte would be enough. ($i < 10^{16} < 2^{63}$ ) - Conversion from double to decimal needs at least 1024 bit integer to be lossless.
- boost fixed size 128 bit integer does not throw exceptions on overflow (most likely fallback to [__int128](https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html))
RDF4CPP should implement:
- arbitrary precision integer types:
__int128
andunsigned __int128
- decimals: i: 128 bit, k: 64 bit
- for conversion double→integer: temp 1024 bit integer, throw if 128 bit integer is exceeded
Metadata
Metadata
Assignees
Labels
blockedThis is blocked by something elseThis is blocked by something else