I've noticed that sometimes a double value is rendered strangely in log output. (Genode 18.05, x86_32) E.g.
unsigned N1 = 3300; unsigned N2 = 5000 - N1; double div1 = N1 / 1000.0; double div2 = N2 / 1000.0; log(N1,"/1000.=",div1,", ",N2,"/1000. =",div2); // ...
[init -> test] 3300/1000.=3.299999, 1700/1000. =1.6a0
I know the log facility is not the place for fancy math-mode, but it would be handy not to have to mentally parse out the extraneous "a". I could file an issue if this is deemed something worth fixing. Maybe there is a workaround short of linking with libc?
// Steve
Hello Steven,
On Mon, Jun 18, 2018 at 03:33:42PM -0500, Steven Harp wrote:
I've noticed that sometimes a double value is rendered strangely in log output. (Genode 18.05, x86_32) E.g.
unsigned N1 = 3300; unsigned N2 = 5000 - N1; double div1 = N1 / 1000.0; double div2 = N2 / 1000.0; log(N1,"/1000.=",div1,", ",N2,"/1000. =",div2);
// ...
[init -> test] 3300/1000.=3.299999, 1700/1000. =1.6a0
I know the log facility is not the place for fancy math-mode, but it would be handy not to have to mentally parse out the extraneous "a". I could file an issue if this is deemed something worth fixing. Maybe there is a workaround short of linking with libc?
I suggest you open an issue on GitHub as from first investigation this issue seems not easy to fix.
Greets