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

--- Comment #5 from Marc Adams <madams846 at hotmail dot com> ---
(In reply to Thomas Koenig from comment #3)
> Hm, strange.. I get
> 
>  x1/x2   %DDf  
> 
> This is with
> 
> GNU C Library (Ubuntu GLIBC 2.39-0ubuntu8.4) stable release version 2.39.
> 
> with
> 
> gcc (GCC) 16.0.0 20250530 (experimental)
> 
> Unrelated / configuration error on my part?

You can avoid the printf-decimal issue on ubuntu by converting to double:

#include <stdio.h>  
#include <fenv.h>
int   main()   {
        fesetround( FE_UPWARD );
        _Decimal128   x1 =  9825,  x2 =  10000 ;
        printf(" x1/x2     %f  ",  (double)( x1 / x2 )  );
        return   0 ;
}

Reply via email to