For example: I want the hundredth digit of the close of SPY on 2/17/2012 = 136.41
This method worked as expected:
a) 136.41 * 100 = 13641.33 ... shift hundredth digit 2 places to left, revealing additional precision
b) mod(13641.33,1) = remainder of (13641.33/1) = 0.33 ... frac() and int() functions would also be useful for these
c) 13641.33 - 0.33 = 13641.00 ... clean up the right side
d) 13641.00 / 10 = 1364.10 ... shift digits 1 place to right
e) mod(1364.10,1) = remainder of (1364.10/1) = 0.10
f) 0.10 x 10 = 1.00 ... shift digit 1 place to left
*Here is another version that I thought would work, but for some reason this method did not produce the results I expected. In some cases it rounded the hundredth digit up and in other cases it rounded the hundredth digit down.
a) 136.41 * 10 = 1364.133
b) mod(1364.133,1) = remainder of (1364.133/1) = 0.133
c) 0.133 x 10 = 1.33
d) mod(1.33,1) = 0.33
e) 1.33 - 0.33 = 1.00
*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.