syntax:ccmd:c_for

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
syntax:ccmd:c_for [2013/07/15 03:50]
ormaaj [Bits analyzer] When performing recursive arithmetic it's more efficient to move an assignment out of the recursive expression so it's tail-recursive.
syntax:ccmd:c_for [2013/07/15 03:53]
ormaaj [Bits analyzer]
Line 140: Line 140:
 Why that one begins at 128 (highest value, on the left) and not 1 (lowest value, on the right)? It's easier to print from left to right... Why that one begins at 128 (highest value, on the left) and not 1 (lowest value, on the right)? It's easier to print from left to right...
  
-We arrive at 128 for ''​n''​ through the recursive arithmetic expression stored in ''​x'',​ which calculates the next-greatest power of 2 after ''​m''​. To show that it works, we use ksh93 to double-check the answer, because it has a built-in feature for ''​printf''​ to print a decimal ​representation of any number in an arbitrary base (up to 64 bits). Very few languages have that ability built-in, even things like Python.+We arrive at 128 for ''​n''​ through the recursive arithmetic expression stored in ''​x'',​ which calculates the next-greatest power of 2 after ''​m''​. To show that it works, we use ksh93 to double-check the answer, because it has a built-in feature for ''​printf''​ to print a representation of any number in an arbitrary base (up to 64). Very few languages have that ability built-in, even things like Python.
  
 ==== Up, down, up, down... ==== ==== Up, down, up, down... ====
  • syntax/ccmd/c_for.txt
  • Last modified: 2013/07/15 03:56
  • by ormaaj