Anonymous user
Numbers in base 10 that are palindromic in bases 2, 4, and 16: Difference between revisions
Numbers in base 10 that are palindromic in bases 2, 4, and 16 (view source)
Revision as of 20:28, 24 June 2021
, 2 years ago→{{header|REXX}}: re-aligned a REXX statement.
m (→{{header|REXX}}: added programming notes about the speed increase.) |
m (→{{header|REXX}}: re-aligned a REXX statement.) |
||
Line 175:
idx= 1 /*set the IDX (index) to unity. */
do j=1 by 2 to n-1 /*find int palindromes in bases 2,4,16.*/
if h\==reverse(h) then iterate /*Hex number not palindromic? Skip.*/ /* ◄■■■■■■■■ a filter. */
b= x2b( d2x(j) ) + 0 /*convert dec. # to hex, then to binary*/
|