Talk:Trigonometric functions: Difference between revisions
Content added Content deleted
m (→Notes on precise sin implemented in Rexx: added whitespace to comments. -- ~~~~) |
m (→Notes on precise sin implemented in Rexx: expanded on some comments. -- ~~~~) |
||
Line 105: | Line 105: | ||
<br>source code is ripped from a working example. This is the main reason the number of shown digits was increased from |
<br>source code is ripped from a working example. This is the main reason the number of shown digits was increased from |
||
<br>6 to 30. People should plainly see that the example as coded works perfectly. If another constructed version doesn't |
<br>6 to 30. People should plainly see that the example as coded works perfectly. If another constructed version doesn't |
||
<br>give the expected results, it might be time to re-read the prologue. Or better yet, use the prologue REXX code. |
<br>give the expected results, it might be time to re-read the prologue. Or better yet, use the prologue REXX code. |
||
<br><br>It's important to note that '''numeric digits nnn''' is not what precision you ''want'', but what precision the |
|||
<br>REXX code ''uses''. One should always specify more than what is liked. Programmers most often forget that negative |
|||
<br>numbers consume an "extra" digit, and it's always better to be safe than sorry. If one wants 30 digit accuracy, then |
|||
<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: |
<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. */ |
<lang rexx>showdigs=30 /*show only 30 digits of number. */ |