diff options
author | Eike Rathke <erack@redhat.com> | 2020-12-17 20:44:43 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2020-12-18 11:00:57 +0100 |
commit | ead1cdd23f5379f5cd8f69d5e73f410a67896db2 (patch) | |
tree | 77397c0a7b5b3fc16ad4ae6da3d24eefd7ffdee5 /include | |
parent | 6b161f615712f6daa11f66d0dfe45eef0877c860 (diff) |
Check intermediate for not to be rounded value, tdf#138360 follow-up
This is a combination of 3 commits.
Add sal_uInt64 fields to sal_math_Double
We may need them later, and at least don't have a confusing
inf_parts or nan_parts struct name but just parts as well.
Ife0cf279c47d2815aa2a1483223397b147e9d776
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107924
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Replace log2() call with parts.exponent-1023, tdf#138360 follow-up
... to save some cycles as we anyway need only the integer value
of the exponent and even exactly this value for the number of
possible decimals.
I8d462f53cadde6a95d57d1342d8487fbfa001ae9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107928
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Check intermediate for not to be rounded value, tdf#138360 follow-up
I98cc25267e7a10c34179bab50d19f49436e1c48c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107929
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Change-Id: I98cc25267e7a10c34179bab50d19f49436e1c48c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107931
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sal/mathconf.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sal/mathconf.h b/include/sal/mathconf.h index 687f6e3da133..11bd32c35de0 100644 --- a/include/sal/mathconf.h +++ b/include/sal/mathconf.h @@ -104,6 +104,13 @@ union sal_math_Double unsigned msw :32; unsigned lsw :32; } w32_parts; + struct + { + sal_uInt64 sign : 1; + sal_uInt64 exponent :11; + sal_uInt64 fraction :52; + } parts; + sal_uInt64 intrep; double value; }; @@ -130,6 +137,13 @@ union sal_math_Double unsigned lsw :32; unsigned msw :32; } w32_parts; + struct + { + sal_uInt64 fraction :52; + sal_uInt64 exponent :11; + sal_uInt64 sign : 1; + } parts; + sal_uInt64 intrep; double value; }; |