This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/70299] pow(long double, int) gives more imprecise result than pow(long double,long double) in c++03 mode


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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Without libstdc++ dependencies:

inline long double pil(long double x, int n) { return __builtin_powil(x, n); }
inline long double pl(long double x, long double n) { return __builtin_powl(x,
n); }

int main()
{
  __builtin_printf("pow(long double, int) :        %.21Le\n", pil(10.L,-4823));
  __builtin_printf("pow(long double, long double): %.21Le\n",
pl(10.L,-4823.L));
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]