Talk:Trigonometric functions: Difference between revisions

m
→‎Notes on precise sin implemented in Rexx: added section seperators. -- ~~~~
m (→‎Notes on precise sin implemented in Rexx: re-instated missing colon. -- ~~~~)
m (→‎Notes on precise sin implemented in Rexx: added section seperators. -- ~~~~)
Line 94:
but rather want to use the functions offered for their task.
 
<br>
---
 
-----
: The huge driver is mainly two statements with eight more to invoke the functions:
 
: <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 122 ⟶ 124:
<br>REXX example (on the main page) does that with the '''showdigs''' variable, as the section and REXX code comments
<br>clearly state. -- [[User:Gerard Schildberger|Gerard Schildberger]] 21:23, 23 June 2012 (UTC)
<br><br>
 
-----
 
I did not modify anything!
Line 205 ⟶ 209:
'028410270193852110555964462294895493038196'
--[[User:Walterpachl|Walterpachl]] 18:08, 23 June 2012 (UTC)
 
-----
 
The REXX program example on the main page was modeled after the PL/I and Fortran languages in that the (trig) function this is called is named by want the argument is specified as, that is, degrees or radians; radians being the default or "simple" or "pure" name, the degree version usually has a '''D''' appended to the function name. Once you make the programmer specify the type of argument for the none-default, there's more documentation involved and error checking.
<br>The REXX philosophy would be to take (in the above case) the 2nd argument and just use the first character as being significant (as the '''strip''', '''arg''', '''date''', '''time''', '''datatype''', '''verify''', '''trace''', and other BIFs do).
<br>So one could code: ''y=sin(z,'degrees')'' for instance.
<br>Also, the aforementioned BIFs also accept the option in lower and mixed case, not just uppercase.
<br>The nice thing about allowing the programmer to specify the units is that other units can be added besides degress, '''grads''' (and it variant spellings) and '''mils'''. -- [[User:Gerard Schildberger|Gerard Schildberger]] 22:18, 23 June 2012 (UTC)