lunar_wave/test_vectors/fma.lua

26 lines
350 B
Lua
Raw Normal View History

-- This one fails :( I haven't implemented closures properly yet.
2023-09-28 05:55:16 +00:00
local ii = "bogus"
local function add (aa, bb)
return aa + bb
end
local function mul (cc, dd)
return cc * dd
end
local function fma (ee, ff, gg)
return add (mul (ee, ff), gg)
end
2023-09-28 05:55:16 +00:00
local function run ()
local hh = fma (10, 11, 12)
print (hh)
end
run ()
print (ii)
return hh