[Bug libstdc++/107815] 20_util/to_chars/float128_c++23.cc FAILs

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 28 09:39:52 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107815

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Or better yet
#include <stdlib.h>
#include <stdio.h>

int
main ()
{
  char *end;
  const char *p = "6e-4966";
  long double l = strtold (p, &end);
  if (l != __LDBL_DENORM_MIN__ || end != p + 7)
    printf ("%Le %s\n", l, end);
  p = "1e-4965";
  l = strtold (p, &end);
  if (l != 2.0L * __LDBL_DENORM_MIN__ || end != p + 7)
    printf ("%Le %s\n", l, end);
  p = "2e-4965";
  l = strtold (p, &end);
  if (l != 3.0L * __LDBL_DENORM_MIN__ || end != p + 7)
    printf ("%Le %s\n", l, end);
  return 0;
}
so that we know if it is just the denorm_min() case or also other denormals.


More information about the Gcc-bugs mailing list