http://learn.cemetech.net/index.php?title=TI-BASIC:R_Pr&feed=atom&action=historyTI-BASIC:R Pr - Revision history2024-03-29T07:27:12ZRevision history for this page on the wikiMediaWiki 1.34.0http://learn.cemetech.net/index.php?title=TI-BASIC:R_Pr&diff=1207&oldid=prevMaintenance script: Initial automated import2016-02-24T18:40:08Z<p>Initial automated import</p>
<p><b>New page</b></p><div>{{Template:TI-BASIC:Command<br />
|picture=RTOPR.GIF<br />
|summary=R►Pr( calculates the radius component (in polar coordinates) given the Cartesian coordinates.<br />
|syntax=R►Pr(''x'',''y'')<br />
|location=Press:<br />
# 2nd ANGLE to access the angle menu.<br />
# 5 to select R►Pr(, or use arrows and ENTER.<br />
|compatibility=TI-83/84/+/SE<br />
|size=1 byte<br />
}}<br />
<br />
R►Pr( (Rectangular to polar radius) takes the (''x'',''y'') (Cartesian) coordinates, and gives the radius coordinate ''r'' of the same point in (''r'',''θ'') (polar) mode. The identity used for this conversion is ''r''² = ''x''²+''y''²<br />
<br />
R►Pr(3,4)<br />
5<br />
√(3²+4²)<br />
5<br />
R►Pr({6,5},{8,12})<br />
{10 13}<br />
<br />
The function works even when the equivalent √(''x''²+''y''²) fails due to overflow:<br />
<br />
R►Pr(3e99,4e99)<br />
5e99<br />
<br />
= Optimization =<br />
<br />
R►Pr( is the smallest way to implement the distance formula <math>d=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}</math>. Just pass it the values x,,1,,-x,,2,, and y,,1,, - y,,2,, as arguments:<br />
<br />
:√((5-2)²+(4-0)²)<br />
can be<br />
:R►Pr(5-2,4-0)<br />
<br />
= Error Conditions =<br />
<br />
* '''[[TI-BASIC:Errors#datatype|ERR:DATA TYPE]]''' is thrown if you input a complex argument.<br />
* '''[[TI-BASIC:Errors#dimmismatch|ERR:DIM MISMATCH]]''' is thrown if two list arguments have different dimensions.<br />
<br />
= Related Commands =<br />
<br />
* [[TI-BASIC:P_Rx|P►Rx(]]<br />
* [[TI-BASIC:P_Ry|P►Ry(]]<br />
* [[TI-BASIC:R_Ptheta|R►Pθ(]]<br />
* [[TI-BASIC:Abs|abs(]]<br />
* [[TI-BASIC:Square_Root|√(]][[Category:TI-BASIC]]<br />
[[Category:TIBD]]</div>Maintenance script