Create a ring of successive halves

halves  start (number), num_halves (int)

Create a ring containing the results of successive halving of the start value. If num_halves is negative, will return a ring of doubles.

Introduced in v2.10

Examples

# Example 1

(halves 60, 2) 



#=> (ring 60, 30)



# Example 2

(halves 120, 3)



#=> (ring 120, 60, 30)



# Example 3

(halves 120, 5)



#=> (ring 120, 60, 30, 15, 7.5)



# Example 4

(halves 30, -5)



#=> (ring 30, 60, 120, 240, 480)