![]() |
Math Question
IF
Code:
A = 2(TAN(F*F)) |
so
A = 2(TAN(F Squared) A = Tan(F squared) + Tan (F squared) A/Tan = (f squared) + (f squared) A/Tan = 2(f squared) A/(2 Tan) = F squared square root (A/(2 tan)) = F Could be wrong, coz it's a long while since I last did algebra though. |
*Sigh* I feel so inadequate. :lick:
|
F = squareroot(inversetan(a/2);
My work: Code:
a = 2tan(F*F); |
Me too.. F = SQUAREROOT(INVERSETAN(A/2))
@peterska2. The inverse of TAN is INVERSETAN not divide tan:p Code:
A = 2(TAN(F*F)) |
I knew it was probably wrong, but it's a long while since I last did algebra.
|
Thanks guys :)
I was never too good at algebra... is inverse tangent the same as arc tangent? in other words, would: PHP Code:
|
Yes. Arc tan is the inverse of tan for php.
But the return is in radians. So if you want it in degrees, you will need to use rad2deg. E.G. PHP Code:
|
$A should be in degrees. $f should be a decimal
|
just a fyi you cant divide normal trig fnct (sin, cos, tan) by both sides like normal you need to take the inverse (^-1) to do the equalitive property been awhile but thought i'd throw that in
|
Quote:
|
Quote:
I wish our calculators were as easy to program with as PHP, it would have made math class so much easier... |
I'm using:
$FA = sqrt(rad2deg(atan($MFh/2))); and getting '3.56' as the answer when $MFh is set to .45. I should be getting "36 degrees". I think the decimal place may be off? |
My other equation isn't working right either...
I have the two variables, and depending on which one the user gives, it should solve for the other. but it seems that the answers don't work the other way: for example if I set $FA and get an answer for $MFh, then use that answer to solve for $FA again, the answer i get isn't the number I started with. the two equations are: PHP Code:
PHP Code:
|
I guess this has gone from a general math question, to a PHP syntax issue. Should it be moved to a different forum?
|
AFAIK, in php both TAN and ATAN work in radians, so using rad2deg will screw up the answer.
|
Quote:
What should it be then? if $MF needs to be a decimal, and $FA is in degrees? |
All times are GMT. The time now is 04:55 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|