Jump to content

Question

Posted

local input=gg.prompt({"📩input first value။📩"},{"9223372036854775000"})
local input1=gg.prompt({"📩input second value။📩"})
mpy = tonumber(input[1]) * tonumber(input1[1])
gg.alert('📃result📃; "'..mpy..'" ', '📝copy📝')
gg.copyText(mpy)

2 answers to this question

Recommended Posts

  • 0
Posted

Make first operand floating-point by multiplying 1.0 by it, that way all calculations will be with floating-point values and you will get approximate result.

mpy = 1.0 * tonumber(input[1]) * tonumber(input1[1])

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.