Floating point arithmetic

Need some help around how can I handle floating-point values to and from a stateful smart contract. Like stateful smart contract can make appropriate calculations for particular ASA according to that ASA`s decimal config and build the accurate inner txn. similarly while sending ASA with decimal precision to escrow account through app call.