It seems that RPC calls for getting JSON information on blocks return "value" fields in bitcoins, not in satoshis.
This means that there is a conversion from integer to float somewhere, which is disturbing since it may introduce rounding errors (see context below).
Is there any way to get the integer satoshi amounts directly in the JSON?
Otherwise, is it completely safe to just multiply the float value by 10^8 and take the integer part?
Is there a better way to directly obtain the integer satoshi value?
Let me give some context.
A typical concern is that, for instance, most systems have no float of value (exactly) 0.1; they generally have a (tiny) difference.
On my machine, I obtain:
python3.6 -c 'print("%.20f"%0.1)' 0.10000000000000000555 python3.6 -c 'print(0.1+0.1+0.1==0.3)' False
This is generally safe, but in my context this raises messy issues, so dealing only with integers is appealing.