Anonymous user
Roots of unity: Difference between revisions
m
→{{header|REXX}}: re-instated a glyph for the title.
m (→{{header|REXX}}: added a better way to calculate number of decimal digits precision.) |
m (→{{header|REXX}}: re-instated a glyph for the title.) |
||
Line 1,574:
pi2= pi + pi /*obtain the value of pi doubled. */
do #=start to abs(n) /*show unity roots (for a range or 1 K.*/
say right(# 'roots of unity', 40, "
do angle=0 by pi2/# for # /*compute the angle for each root. */
rp= adj( cos(angle) ) /*compute real part via COS function.*/
|