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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I can reproduce it on x86_64-linux with -m32 too:
f1: 0x0.000000014707e947d757fbf6f7p-16382
f2: 0x0.000000014707e946d257f2f674b9p-16382
but can't with -m64 nor when using glibc 2.35 strtof128 (in that case it works
fine both with -m32 and -m64):
#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <math.h>

int
main ()
{
  char buffer[48];
  _Float128 f1 = strtof128 ("1e-4941", NULL);
  _Float128 f2 = 1e-4941F128;
  strfromf128 (buffer, 45, "%a", f1);
  printf ("f1: %s\n", buffer);
  strfromf128 (buffer, 45, "%a", f2);
  printf ("f2: %s\n", buffer);
  return 0;
}

Reply via email to