乘法的補數算法,也有人稱印度乘法
這個原理是這樣 95x88
= 95x(100-12)
= 95x100-95x12
= 95x100-(100-5)x12
= (95-12)x100+5x12
適用 2 位數乘 2 位數接近 100 的乘法,若補數相乘超過 100,不會比較快
同樣原理亦適用 4 位數乘 4 位數接近 10000 的乘法,若補數相乘太大,一樣不會比較快
例如: 9998x9992
= 前四位數 9998-8,後四位數 2x8
= 99900016
ifup eth0 = nmcli con up eth0 ifdown eth0 = nmcli con down eth0 ifup, ifdown command still available in NetworkManager-initscripts-updown pa...
沒有留言:
張貼留言