[Libreoffice-bugs] [Bug 150923] FORMATTING: For some ranges of numbers, the TEXT (DEC2HEX () function gives strange results
https://bugs.documentfoundation.org/show_bug.cgi?id=150923 --- Comment #4 from Robert Gralak --- (In reply to Mike Kaganski from comment #2) > This is not a bug. > > First of all: what is your expectation using the "TEXT(DEC2HEX)"? The > TEXT(..., "#") function formats the passed number according to the numeric > format string; while DEC2HEX creates a *string* representing the number in > hexadecimal form. > (...) > > Closing NOTABUG. Use DEC2HEX by its own, without TEXT. Thank you for this detailed explanation. Looks like it was quite late since I didn't notice it myself. Now I can't remember why I used such a combination, for sure at some point there was a problem with getting the text format for the output and the TEXT function remained even when it was no longer needed. Thank you Mike (and others) again and sorry for the confusion :) -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 150923] FORMATTING: For some ranges of numbers, the TEXT (DEC2HEX () function gives strange results
https://bugs.documentfoundation.org/show_bug.cgi?id=150923 --- Comment #3 from Rafael Lima --- (In reply to Mike Kaganski from comment #2) > This is not a bug. > 2. Hexadecimal string "2E99" treated as decimal, converts to 2 * 10 ^ 99, > and output as Hi Mike, thanks for your explanation. I hadn't realized that 2E99 was being treated as scientific notation. You're correct... this is NAB. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 150923] FORMATTING: For some ranges of numbers, the TEXT (DEC2HEX () function gives strange results
https://bugs.documentfoundation.org/show_bug.cgi?id=150923 Mike Kaganski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |NOTABUG --- Comment #2 from Mike Kaganski --- This is not a bug. First of all: what is your expectation using the "TEXT(DEC2HEX)"? The TEXT(..., "#") function formats the passed number according to the numeric format string; while DEC2HEX creates a *string* representing the number in hexadecimal form. So this combination: =TEXT(DEC2HEX();"#") first converts to a string, and then tries to interpret the string as a number, to be converted to another string again. Now to the conversion of strings to numbers: any user input is attempted to be treated as a *decimal* number. So, 2E99 is treated as a decimal number in exponential (E) notation = 2 * 10 ^ 99 [1]. So: 1. Hexadecimal string "1" treated as decimal, converts to number 1, and then output as "1"; 2. Hexadecimal string "10" (with value of sixteen) is treated as decimal, converts to number10 (ten!), and output as "10", but it just coincides with what you expect; 2. Hexadecimal string "2E99" treated as decimal, converts to 2 * 10 ^ 99, and output as "2000"; 3. Hexadecimal string "1EA" cannot be interpreted as a number in any known format, and is treated as *string*, so output unmodified as "1EA". Closing NOTABUG. Use DEC2HEX by its own, without TEXT. [1] https://en.wikipedia.org/wiki/Scientific_notation#E_notation -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 150923] FORMATTING: For some ranges of numbers, the TEXT (DEC2HEX () function gives strange results
https://bugs.documentfoundation.org/show_bug.cgi?id=150923 Rafael Lima changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Rafael Lima --- Repro with Version: 7.3.5.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Ubuntu package version: 1:7.3.5-0ubuntu0.22.04.1 Calc: threaded And also with Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: 641d92a73e5b3d0e062e16ed4b42236e1a4796a5 CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Calc: threaded Indeed the ranges described by the OP show weird results. -- You are receiving this mail because: You are the assignee for the bug.