## REXX, 24 bytes

    arg n p
    say format(n,,p)

Since REXX always uses text representation of numbers, correct rounding of numbers is free.

[Try it online!](https://tio.tryitonline.nz/nexus/rexx#@59YlK6Qp1DAVZxYqZCWX5SbWKKRp6NToPn//39DEz0jI1MFIwA)