ArcTan(x,y)?
04-09-2017, 09:50 AM
Post: #23
 JMB Member Posts: 98 Joined: Jan 2016
RE: ArcTan(x,y)?
(04-06-2017 03:30 PM)StephenG1CMZ Wrote:
(04-05-2017 10:41 PM)KeithB Wrote:  So if the limit of atan2(x,x) as x approaches 0 is 45, maybe that is what atan2() should return?

Clearly, discontinuities near 0 cannot be avoided - I have even seen it suggested online that one could scale values and use integer arithmetic to work around. I am beginning to wonder whether returning an error might be useful. But many Atan2 implementations do return 0, so changing to return 45 instead would introduce compatibility issues.

The PRIME function polar_coordinates, also works in a similar way:

polar_coordinates(1,1) returns: [1.41421356237 45]

polar_coordinates(0.001,0.001) returns: [1.41421356237ᴇ−3 45]

polar_coordinates(0,0) returns: [0 0]
 « Next Oldest | Next Newest »

 Messages In This Thread ArcTan(x,y)? - toml_12953 - 04-05-2017, 12:07 PM RE: ArcTan(x,y)? - Joe Horn - 04-05-2017, 12:20 PM RE: ArcTan(x,y)? - toml_12953 - 04-05-2017, 12:26 PM RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 03:00 PM RE: ArcTan(x,y)? - toml_12953 - 04-05-2017, 03:39 PM RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 06:22 PM RE: ArcTan(x,y)? - KeithB - 04-05-2017, 07:28 PM RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 07:47 PM RE: ArcTan(x,y)? - KeithB - 04-05-2017, 10:47 PM RE: ArcTan(x,y)? - DrD - 04-06-2017, 10:27 AM RE: ArcTan(x,y)? - StephenG1CMZ - 04-06-2017, 03:22 PM RE: ArcTan(x,y)? - KeithB - 04-05-2017, 07:33 PM RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 07:53 PM RE: ArcTan(x,y)? - KeithB - 04-05-2017, 08:10 PM RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 09:17 PM RE: ArcTan(x,y)? - jte - 04-05-2017, 09:08 PM RE: ArcTan(x,y)? - KeithB - 04-05-2017, 09:42 PM RE: ArcTan(x,y)? - StephenG1CMZ - 04-05-2017, 10:38 PM RE: ArcTan(x,y)? - KeithB - 04-05-2017, 10:41 PM RE: ArcTan(x,y)? - StephenG1CMZ - 04-06-2017, 03:30 PM RE: ArcTan(x,y)? - Han - 04-06-2017, 03:53 PM RE: ArcTan(x,y)? - JMB - 04-09-2017 09:50 AM RE: ArcTan(x,y)? - StephenG1CMZ - 04-09-2017, 03:47 PM RE: ArcTan(x,y)? - JMB - 04-09-2017, 08:00 PM RE: ArcTan(x,y)? - KeithB - 04-06-2017, 02:38 PM RE: ArcTan(x,y)? - StephenG1CMZ - 04-09-2017, 09:54 PM

User(s) browsing this thread: 1 Guest(s)