https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96016
--- Comment #3 from Andreas Schwab <sch...@linux-m68k.org> --- You are computing the sine of (double)ld. If you want the sine of a long double value, you need to use the sinl function, also use acosl(-1) to compute pi in long double precision.