]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix powf().
authorMark Murray <markm@FreeBSD.org>
Mon, 6 Sep 2021 17:26:39 +0000 (18:26 +0100)
committerMark Murray <markm@FreeBSD.org>
Mon, 6 Sep 2021 17:51:31 +0000 (18:51 +0100)
commit292815eac623035493854f133200a4b1041fa246
tree5a4f093cf55e810b1a51b61898df5abf888649a9
parent8a004a98c2cdf4fdbb8f5eaaebc2f89c0919168c
Fix powf().

Summary:
From Steve Kargl:

Paul Zimmermann has identified a bug in Openlibm's powf(),
which is identical to FreeBSD's libm.  Both derived from
fdlibm. https://github.com/JuliaMath/openlibm/issues/212.

Consider

% cat h.c
int
main(void)
{
  float x, y, z;
  x =  0x1.ffffecp-1F;
  y = -0x1.000002p+27F;
  z =  0x1.557a86p115F;
  printf("%e %e %e <-- should be %e\n", x, y, powf(x,y), z);
  return 0;
}

% cc -o h -fno-builtin h.c -lm && ./h
9.999994e-01 -1.342177e+08 inf <-- should be 5.540807e+34

Reviewers: manu

Subscribers: imp, andrew, emaste

Differential Revision: https://reviews.freebsd.org/D31865
lib/msun/src/e_powf.c