File: cln_test.lua

package info (click to toggle)
luabind 0.9.1%2Bdfsg-5
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,460 kB
  • sloc: cpp: 13,761; makefile: 120; sh: 24; ansic: 11
file content (21 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

a = factorial(41)
b = factorial(42)

print('a = fac(41) = ' .. tostring(a))
print('b = fac(42) = ' .. tostring(b))
print('b / a = ' .. tostring(b / a))

c = a * 42

d = sqrt(cl_R(10))

print('d = sqrt(10) = ' .. tostring(d))

if c == b then print('equality operator test: ok') else print('equality operator test: failed') end

-- prints
-- a = fac(41) = 33452526613163807108170062053440751665152000000000
-- b = fac(42) = 1405006117752879898543142606244511569936384000000000
-- b / a = 42
-- d = sqrt(10) = 3.1622777