mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Bug report: fcvt seems dysfunctional
@ 2022-09-06  9:27 Gabriel Ravier
  2022-09-06 10:12 ` [musl] ecvt(0, 0, ...) is broken Gabriel Ravier
  0 siblings, 1 reply; 10+ messages in thread
From: Gabriel Ravier @ 2022-09-06  9:27 UTC (permalink / raw)
  To: musl

Executing something like `fcvt(0.01, 1, &decpt, &sign)` under musl 
results in a return value of "00", decpt == 1 and sign == 0.

glibc instead returns an empty string, decpt == -1 and sign == 0.

I believe glibc's behavior is the correct one as mandated by POSIX.2004 
because it specifies that the high-order digit shall be non-zero unless 
the value is 0, which is not the case here, meaning that musl cannot 
return a string containing '0' as the first character.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-09-07 13:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06  9:27 [musl] Bug report: fcvt seems dysfunctional Gabriel Ravier
2022-09-06 10:12 ` [musl] ecvt(0, 0, ...) is broken Gabriel Ravier
2022-09-06 12:13   ` Joakim Sindholt
2022-09-06 12:21     ` Gabriel Ravier
2022-09-06 14:17       ` Rich Felker
2022-09-06 18:48         ` Markus Wichmann
2022-09-06 19:19           ` Rich Felker
2022-09-07  3:39             ` Markus Wichmann
2022-09-07  3:51               ` Jeffrey Walton
2022-09-07 13:44                 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).