Module Name: src Committed By: eadler Date: Sat Mar 10 09:44:47 UTC 2018
Modified Files: src/lib/libm/src: e_atan2.c Log Message: Fix signed overflow in atan2 As a component of atan2(y, x), the case of x == 1.0 is farmed out to atan(y). The current implementation of this comparison is vulnerable to signed integer underflow (that is, undefined behavior), and it's performed in a somewhat more complicated way than it need be. Change it to not be quite so cute, rather directly comparing the high/low bits of x to the specific IEEE-754 bit pattern that encodes 1.0. ok martin@ pgoyette@ maya@ obtained from FreeBSD To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libm/src/e_atan2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.