|
Message-ID: <5918d2a7-7b3-932b-2b4-b24390832244@esi.com.au> Date: Mon, 12 Aug 2024 13:56:18 +1000 (AEST) From: Damian McGuckin <damianm@....com.au> To: MUSL <musl@...ts.openwall.com> Subject: Re: catan(z) On Mon, 12 Aug 2024, Damian McGuckin wrote: > There is some argument that if you handle the special cases at infinity > separately (which I think MUSL should do but I do not have time at the > moment), then one can assume that because pi/2 is irrational, then one > should never have to deal with the end points in the chunk of code where > those two lines of code seen above should appear. I will have a chat > sometime with the guy who wrote that logic in a WG14 paper when I get a > really clear head and can line him up. Consider atan2(y, x) For any finite y and finite non-zero x floating point number arguments, i.e. rational numbers, the result of atan2(y, x) must be rational and so is never +/- pi (which is irrational and only occurs when the ration y/x is a mathematical infinity, not an overflowing infinity). So, we can ignore the endpoints as long as our special case handling takes care of the case of zero x. I think that is correct .... or is my brain still not working properly after too many late nights watching the Olympics. Thanks - Damian
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.