ATAN2 on 35S - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: ATAN2 on 35S (/thread-121567.html) |
ATAN2 on 35S - Vincze - 08-14-2007 Can the 35s perform the ATAN2 function as a built in function? I have not found it and I am in need of it.
Re: ATAN2 on 35S - Gene Wright - 08-14-2007 Not as a built-in function.
You'll have to use several lines of code. Edited: 14 Aug 2007, 4:35 p.m.
Re: ATAN2 on 35S - Thomas Radtke - 08-14-2007 You could construct a komplex number x+iy and apply ARG. This is what I do in my R > P implementation.
Re: ATAN2 on 35S - Vincze - 08-14-2007 I don't think I follow you. For example, if X = 10 and Y = 15, ATAN2 of those should be 0.982794.
So you say to do following in RPN: i15 - ENTER -When I do that, it yield 56.309932. Am I not understanding something? Re: ATAN2 on 35S - Thomas Radtke - 08-14-2007 Your calc is in DEG mode while you brain works in RAD ;-). Just do a ->RAD conversion.
Re: ATAN2 on 35S - Vincze - 08-14-2007 okay... that make sense.
MOD on 35S - Vincze - 08-14-2007 Sorry, but I have one more question. Can 35s do MOD (Modular arithmetic)? Such as a float be x and I solve for MOD(x,2*PI).
Re: MOD on 35S - Thomas Radtke - 08-14-2007 I suppose you have the remainder in mind. Have a look at Chapter 4-2.
(INT menu, 3Rmdr)
Re: MOD on 35S - Vincze - 08-14-2007 No, more like lets use simple clock example. Let say start time is 20:00 on 24 hour clock, and you need to add 5 hours to that, but you wish to have wrap around math, so with normal math you state 20:00 + 5:00 = 25:00, but that does not make sense on clock. With modular math, you would say 20:00 + 5:00 mod 24 = 1:00, meaning if you start at 8pm, and you need to add 5 hours to it, you would finish at 1am. In Excel the formula would be =mod(Start + End, 24). This used in aviation to work out degrees and the like.
I will look at chapter you state and see if that give me a clue Edited: 14 Aug 2007, 5:35 p.m.
Re: MOD on 35S - Thomas Radtke - 08-14-2007 That's just the usual modulo, same menu, 2INT/
Re: MOD on 35S - Vincze - 08-14-2007 That does not work. See for example. 20:00 + 12:00 mod 24 = 08:00
If I enter the following on calculator: 20answer is 1 which is not correct. Time is easy to deal with, but when you dealing numbers that wrap around when reaching the modulus of 2 * PI, it a little harder to deal with. For calculation that I am doing, I need to simulate the Mod(x,y) function.
Edited: 14 Aug 2007, 7:48 p.m.
Re: MOD on 35S - Don Shepherd - 08-14-2007 It's INTG 3 (remainder)
Re: MOD on 35S - Vincze - 08-14-2007 I think I figure out, at least with clock. Here is what I do. Let say we have 21:00 + 10:00 mod 24 = 07:00 35S work this way... which yield 7.
I have to now try this on other calculation that use strange mod and see if this will be correct. I guess I could make short program that could do this. Edited: 14 Aug 2007, 8:17 p.m.
Re: MOD on 35S - Karl Schneider - 08-15-2007 Quote: The 35S works this way...
21 which yields 7.
-- KS
Re: MOD on 35S - Vincze - 08-15-2007 Yes, that a few steps shorter than mine.
|