rename jar.$target to java.test.$target
[liba.git] / python / test / a.py
blob962ab9cd26969898a214ec1b9c6c4e44c2a5f048
1 #!/usr/bin/env python
2 import os, sys
4 base = os.path.dirname(__file__)
5 path = os.path.dirname(base)
6 sys.path.insert(0, path)
7 if len(sys.argv) > 1:
8 sys.stdout = open(sys.argv[1], "w")
10 import liba # type: ignore
12 print(liba.hash_bkdr(b"0123456789"))
13 print(liba.hash_sdbm(b"0123456789"))
14 print(liba.sqrt_u64(7), liba.sqrt_u32(7))
15 print(liba.sqrt_u64([4, 8]), liba.sqrt_u32([4, 8]))
16 print(liba.rsqrt_f64(4), liba.rsqrt_f32(4))
17 print(liba.rsqrt_f64([4, 8]), liba.rsqrt_f32([4, 8]))