Need help understanding math.... - 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: Need help understanding math.... ( /thread-258117.html) |

Need help understanding math.... - cyrille de BrĂ©bisson - 12-09-2013
Hello,
I am trying to follow up on a question that I have had for a long time on the HP48 code for the complex acos and asin The comment says to test against 1/sqrt(2), but the code tests against 0.7!
It looks to me that the 2 cases are there to improve precision in upper and lower octants, and that having the midpoint a cyrille
* Q := y^2/(sqrt((|x|+1)^2 + y^2) + (|x|+1))
:: C%>%% 2DUP DUP %%*SWAP %%ABS DUP %%1+ DUPDUP %%* 4PICK %%+
Re: Need help understanding math.... - Han - 12-09-2013
Edited for legibility:
Quote: Re: Need help understanding math.... - cyrille de BrĂ©bisson - 12-09-2013
thanks, I tried 4 times but could not get it to take my CR properly!
cyrille
Re: Need help understanding math.... - Walter B - 12-09-2013
Once read that rats learn it with four times ;-) SCNR
Re: Need help understanding math.... - Jeff O. - 12-09-2013
You just need to enclose your formatted text between [pre] and [/pre] tags.
Re: Need help understanding math.... - Paul Dale - 12-09-2013
I've not put any effort into investigating this and am really just guessing, however I suspect that your intuition here is correct. That area of the sine and cosine functions is pretty smooth and well behaved -- essentially linear over the reals and I don't think it goes weird as one moves away from the real line. I'd guess it was a case of 0.7 being an existing constant that was near enough. Depending on how the comparison is coded, it might be very slightly faster too but unlikely enough to notice.
Re: Need help understanding math.... - David Hayden - 12-12-2013
I don't understand the comments in this code. What are Q, R, S, M, P, B, and C? Is RE1 the real part of stack level 1? RE2 is real part of stack level 2? IM is imaginary part of... both?
Just curious. Re: Need help understanding math.... - Raymond Del Tondo - 12-12-2013
Quote:Actually the constant is defined in that code slice, and not a call to a constant defined elsewhere, thus saving one pointer resolution time cycle.
I'm confident the common code for complex ASIN and ACOS dates back to the Paladin, so could simply be a LISARIF (Bill Wickes)
Re: Need help understanding math.... - Didier Lachieze - 12-13-2013
Quote:Some decoding for people who - like me - would need it: - Paladin: internal hp code name for the HP-28C
- LISARIF: "Life is Short and ROM is Full" a famous quote from Bill Wickes (see the original source)
Re: Need help understanding math.... - Thomas Klemm - 12-16-2013
cf. A little help understanding math....
HTH |