Talk:Trigonometric functions: Difference between revisions

m
→‎Notes on precise sin implemented in Rexx: corrected some misspellings and typos.
m (→‎Notes on precise sin implemented in Rexx: fixed an HTML tag, fixed some typos and spelling errors.)
m (→‎Notes on precise sin implemented in Rexx: corrected some misspellings and typos.)
Line 60:
: Also, I long ago discovered that most trig and hyperbolic functions of this type usually require at least four extra (decimal) digits to be used (but only for some values that are near asymptotic points and others near multiples or fractions of pi. So I added one more digits to be on the safe side. Since then, I made the addition to an even five for a few hyperbolic functions and then did the same to the trig functions, but used ten here (on Rosetta Code) for safety's sake. -- [[User:Gerard Schildberger|Gerard Schildberger]] 20:55, 22 June 2012 (UTC)
 
I discussed this topic 10 years ago on Vladimir ZabrovskyKhabarovsk's Album of (Rexx) algorithms which contains a wealth of code.
 
: Did you change the REXX variable SHOWDIGS to 30? If so, I don't receive the same results you post. I assume you've must have cut and pasted from your own copy of the REXX program as the output format is much different. I would like to know what your results are for the REXX example as shown in Rosetta Code.
Line 88:
.
.</lang>
 
This isn't probably the best forum to discuss these types of code (result) minutia when code is taken out of context or the modified code or driver code isn't shown to verify your results. I can be contacted via E-mail to iron out these details before large amounts of chatter are posted. -- [[User:Gerard Schildberger|Gerard Schildberger]] 20:55, 22 June 2012 (UTC)
<br>
Line 111 ⟶ 112:
<br>be prepared to over-specify the numeric digits (or just use the technique shown in the REXX example on the main page).
<br><br>The huge driver is mainly two statements with eight more to invoke the functions:
 
<lang rexx>showdigs=30 /*show only 30 digits of number. */
numeric digits showdigs+10</lang>
Line 164 ⟶ 166:
</pre>
What I want is that the first call gives me the 30 correct digits.
This can be done by internally (in sin) raise the precision and return theresultthe result rounded to the desired precision.
 
Note that external funtionsfunctions don't inherit the caller's precision,
so having an extra (optional) argument p is an option.
Also the possiblitypossibility of x in sin(x) is radians or degrees is a useful extension implemented in the ooRexx function package.
--[[User:Walterpachl|Walterpachl]] 07:13, 23 June 2012 (UTC)
 
----
 
To not only ask for solutions, here is my version of sin according to my specs:
SIN: procedure
Line 257 ⟶ 260:
 
: I went back and put the appropriate REXX header section comments in a box so it could be more easily read ''and'' catch one's attention. I don't know how to make it any more plainer or clearer than that. If one follows ''either'' of the two suggested techniques to accommodate the wanting of more accuracy, then all of the REXX example subroutines on the main page perform perfectly well with ''either'' technique and return precise results. To reiterate, if you want 30 "precise" digits, then specify '''numeric digits 40'''. -- [[User:Gerard Schildberger|Gerard Schildberger]] 19:49, 24 June 2012 (UTC)
 
 
== another thought on SIN ==
 
Thanks to Paul K.: &nbsp; &nbsp; "Mathematical puns are the first sine of madness.”
 
-- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 08:53, 13 May 2020 (UTC)