21 lines
226 B
Lua
21 lines
226 B
Lua
--region *.lua
|
|
--Date
|
|
--This file is automatically generated by the 【BabeLua】 plugin
|
|
|
|
a = 1;
|
|
b = 0.001;
|
|
c = 0;
|
|
|
|
|
|
|
|
while a-b > 0.0001*a do
|
|
c= (a+b)/2
|
|
b = math.sqrt( a*b )
|
|
a = c;
|
|
end
|
|
|
|
|
|
print(a,b)
|
|
|
|
--endregion
|