Always returns decimal value as integer

Hi, my parameter value is changed by conversion. You also convert the decimal return value to an integer. There is an error. Could you help me please. Thank you. 3.png below link

Please provide a reproducible example, preferably a saved runnable example on Gistlyn, otherwise please provide a stand-alone source code I can locally to reproduce the issue.

You can see console app below link

This is the behavior of Redis’s LUA script, you can debug it by saving your LUA script in a file

local incomingVal = ARGV[1]'hset', 'incomingVal:', 'strVal', incomingVal)'hset', 'incomingVal:', 'numVal', tonumber(incomingVal))

local a ='hget', 'incomingVal:', 'strVal')
local b ='hget', 'incomingVal:', 'numVal')

return {a, b, tonumber(b)}

Then run it with Redis command line utility:

$ redis-cli --eval decimal.lua 0.005

Which returns the same values as ServiceStack.Reids APIs, e.g:

1) "0.005"
2) "0.0050000000000000001"
3) (integer) 0

P.S .in future please don’t use rar files for submitting source code. For a single source file you can just include the source code in the post, e.g:

//Source Code

Otherwise for multiple source files you can upload it to a GitHub project or a Gist.