# Author: @JOhn_Stuart Les Way

## [precision error] compute percentage out of two large int64

Hi all, I have 2 large int64 values, A and B. One of them, namely B, is close to math.MaxInt64. I want to know what percentage is A compared to B. Namely I want to compute (A / B) * 100. This percentage must be a float64 value....

## big.Int efficiency – big difference, how come?

func factorialA(n int64) *big.Int { var fact = new(big.Int) fact.MulRange(1, n) return fact } func factorialB(n int) *big.Int { var result = big.NewInt(1) for i := 2; i <= n; i++ { result = result.Mul(result,...

## Red-black tree – insertion case 5

Hi all, When adding to a red black tree, in the 5th and last case: new node is red, parent is red,...

## Help me format small but ugly code

func (n *Node) updateHeight() { if n == nil { return } leftHeight := -1 if n.Left != nil { leftHeight = n.Left.Heigth } rightHeight := -1 if n.Right != nil { rightHeight = n.Right.Heigth } n.Heigth = 1 + leftHeight if n.Heigth...