forked from M-Labs/nac3
nac3standalone: add tests for power
This commit is contained in:
parent
0059b389ae
commit
f4e9c2eb31
26
nac3standalone/demo/src/pow.py
Normal file
26
nac3standalone/demo/src/pow.py
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
@extern
|
||||||
|
def output_float64(f: float):
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
def run() -> int32:
|
||||||
|
output_float64(float(3 ** 1))
|
||||||
|
output_float64(float(3 ** 0))
|
||||||
|
output_float64(float(3 ** 19))
|
||||||
|
output_float64(1.0 ** -100)
|
||||||
|
output_float64(1.0 ** -2)
|
||||||
|
output_float64(1.0 ** 0)
|
||||||
|
output_float64(1.0 ** 1)
|
||||||
|
output_float64(1.0 ** 100)
|
||||||
|
output_float64(3.0 ** 0)
|
||||||
|
output_float64(3.0 ** 1)
|
||||||
|
output_float64(3.0 ** 2)
|
||||||
|
output_float64(3.0 ** -1)
|
||||||
|
output_float64(3.0 ** -2)
|
||||||
|
output_float64(3.0 ** -32767)
|
||||||
|
output_float64(3.0 ** -3.0)
|
||||||
|
output_float64(3.0 ** -0.0)
|
||||||
|
output_float64(3.0 ** 0.0)
|
||||||
|
output_float64(4.0 ** 0.5)
|
||||||
|
output_float64(4.0 ** -0.5)
|
||||||
|
return 0
|
Loading…
Reference in New Issue
Block a user