https://bugs.documentfoundation.org/show_bug.cgi?id=75915

--- Comment #14 from Takenori Yasuda <[email protected]> ---
This bug is still reproducible.

Version: 25.8.1.0.0+ (X86_64) / LibreOffice Community
Build ID: cf39db5b97e665c47271a5679518a2fa9941be74
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster;
VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded Jumbo

---

I believe the root cause of this bug lies in rounding errors during conversions
between twips and other measurement units.
The calculations proceed as follows:

   mm / mm_per_in / in_per_twip
 = (1.25 * 10) / 25.4 / (1 / 1440)
 = 12.50 / 25.4 * 1440
~= 708.6...
-> rounded to 709 twips

   twip * in_per_twip * mm_per_in
 = 709 * (1 / 1440) * 25.4
 = 709 / 1440 * 25.4
 = 12.505...
-> rounded to 12.51 mm

Note:
For more details, please refer to Bug 126601, Comment 8, where I investigated
similar rounding behavior.


Similar rounding errors may also occur when converting between other units, not
just twips.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to