ATAN2 on 35S



#16

Can the 35s perform the ATAN2 function as a built in function? I have not found it and I am in need of it.


#17

Not as a built-in function.

You'll have to use several lines of code.

Edited: 14 Aug 2007, 4:35 p.m.

#18

You could construct a komplex number x+iy and apply ARG. This is what I do in my R > P implementation.


#19

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 - 
10
ARG
When I do that, it yield 56.309932. Am I not understanding something?

#20

Your calc is in DEG mode while you brain works in RAD ;-). Just do a ->RAD conversion.


#21

okay... that make sense.


#22

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).


#23

I suppose you have the remainder in mind. Have a look at Chapter 4-2.

(INT menu, 3Rmdr)


#24

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.


#25

That's just the usual modulo, same menu, 2INT/


#26

That does not work. See for example. 20:00 + 12:00 mod 24 = 08:00

If I enter the following on calculator:

20
ENTER
12
+
24
INTG 2
answer 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.


#27

It's INTG 3 (remainder)

#28

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...

21
ENTER
10
+
24
/
INTG 5
24
*

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.


#29

Quote:
Let say we have 21:00 + 10:00 mod 24 = 07:00

The 35S works this way...

21
ENTER
10
+
24
INTG 3 (Rmdr)

which yields 7.

-- KS


#30

Yes, that a few steps shorter than mine.


Forum Jump: