Self working ACAAN

Before watching the performance it is recommended to read the clarification below first. Craig Petty from Magic TV has a tutorial explaining the how, not the why. The information below enables you to understand what goes on while all steps are executed.
The video starts with 2 piles, each exactly 26 cards (52 in total, no jokers). Craig counts them while talking. The spectator selects a pile and takes an unknown number of cards out (14 in the performance). Thats the number in Any Card At Any Number. Next the 26-14=12 are put back on the table. Then Craig asks the spectator to choose a card from his pile (26 cards). That is the selected Any card (8). When the card is taken back he controls it to the bottom (convincing control, vid5 and 9 here) at position 26 (this is the key to the secret). Then the 26 cards are put on top of the 12 cards. Now there are 12+26=38 cards on the table, chosen card at position 26. The visual below shows the pile simplified, start order left (38 cards) new order at the right.

Craig's talk about a Vegas shuffle is an excuse to hide executing a predetermined reordening of the 38 cards using a cycle of taking the top/ bottom card together in pairs. What is really happening is that the new pile, as shown, starts with card 38 at the bottom, followed by card 1 on top (so new position of card 1 = 37), the card at position 37 will be paired with the card at position 2, and so on.

Now a pattern can be spotted

TOP half (1-19)                         BOTTOM half (20-38)
Start pos | New position          Start pos  | New pos.          
Card nr.1    N-1  = 38-1=37      Card nr.38   38  
Card nr.2    N-3  = 38-3=35      Card nr.36   36
And so on until                         And so on until
Card nr.19  N-37 = 38-37=1    Card nr.20    2 

1.We need to work with the top half (1-19) and the bottom half (20-38) separately.
2.Cards from the top half are odd in the new position/order (notice the blue).
3.Cards at bottom half are even in the new position/order (notice the red).
4.During the reordering the cards are 'woven' together. 
5.Chosen card is always at start position 26.

From a math perspective we need 2 formulas (19/20 turning point).
We need transformation counters that give us the new position of the cards.
Assume: i=start position, n=new position, N=total (38 cards).
Notice: chosen card always controlled to position 26 (=i)

Formulas

Top Half - if i ≤ (N/2)  N - (2i - 1) ,
e.g. start position 2 ≤ 19  38 - ((2 x 2)-1) = 35
Start pos 01/02/03/04/05/06/07/08/09/10/etc.
New pos 37/35/33/31/29/etc. (odd)

Bottom half - if i (N/2)  2 ( i - (N/2)1) ,
e.g. start position 26 > 19  2 x ( 26 - (38/2)) = 14
Start pos 20/21/22/23/24/25/26/27/28/etc.
New pos 02/04/06/08/10/12/14/16/etc. (even)

Note  52 cards - (26 + ( 12 left on the table ))=14.

What to do when someone takes out an odd number of cards, e.g. 15?

Middle of the pile is 37/2 = 18,5 
⇒ Top is 1-18, Bottom is 19-37 , examples:
Start pos 26  2 ( i - (N/2) )
= 2 (i-18,5) = 2i - 37 = 2x26 - 37 =15
Start pos 7 ⇒ N - ( 2i-1) = 37 - (2x7 - 1) = 37 - 13 =24
Notice: 52 - (26+11) = 15 

What if someone picks only 1 card? Just say: "that would be pick a card, take some more" or "thats no stack" or drop some cards extra.